Re:Show HN: The full source code and assets for my custom ga...
by corysama on Monday July 10, 2023 @07:02PM
(#36674193)
FYI: https://docs.gl/es2/glShaderSource takes an array of strings and just internally appends them together. So, rather than trying to #include common code for all my shaders, I just pass a common_code_string and a shader_specific_code_string every time.
[ Parent
| on HN ]
Re:Show HN: The full source code and assets for my custom ga...
by mknsri on Tuesday July 11, 2023 @12:49AM
(#36676533)
I could have definitely used that and I'm surprised I didn't realise it when researching how to include shader code. Luckily my setup required very little work and with my system I could share snippets between GLES and GL.