Talk:OpenGL pixel shader: Difference between revisions

m
→‎Fragment shader compilation errors: Added signature to last comment.
(→‎Issues?: GLSL as a new language)
m (→‎Fragment shader compilation errors: Added signature to last comment.)
 
(3 intermediate revisions by 3 users not shown)
Line 9:
:::::: Yes, the point of this was simplicity, something like a "hello world" that lets you make sure you know how to use your build tools. That said, I want to phrase this distinction slightly differently (because you need to incorporate the coordinates otherwise you have no way of achieving different colors at different coordinates). Anyways, I'll try an update. Thanks. --[[User:Rdm|Rdm]] 14:56, 27 October 2011 (UTC)
: Shouldn't GLSL be added as a new [[:Category:GLSL|language]] and this task added to it? [[Special:Contributions/89.243.198.247|89.243.198.247]] 16:14, 8 January 2012 (UTC)
:: No.
:: I do not have anything against GLSL being added as a language (though given its constraints, I doubt many tasks could be addressed using GLSL). But the purpose of this task is to deploy a "Hello World"-ish GLSL program. And that's not something you can do from within GLSL. --[[User:Rdm|Rdm]] 22:35, 8 January 2012 (UTC)
 
==Fragment shader compilation errors==
 
When I completed and ran my recent Wren entry for this task (a C translation), I noticed that the triangle was being rendered in white - no colored pixels at all. I then ran the C and Go examples and the position was exactly the same!
 
It turned out that the fragment shaders in the C and Go examples which were written years ago were no longer compiling under the current versions of OpenGL/GLSL because they used implicit conversions in the rand() function to convert between integer and float literals. As soon as I added ".0" to the former all three examples ran fine.
 
So I've updated the examples (they should now run under any version) and included code in the Wren example to check for compilation or linker errors to avoid 'silent' failures occurring if the example is ever changed in future. --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 14:36, 8 September 2021 (UTC)
9,476

edits