As there seems to be no info on the web:
In regards to performance in a GLSL Shader, which is faster?
Please comment why.
@Pixdigit if in doubt: Write a simple performance test.. If I have learned anything yet, - programming wise - it's that one's assumptions are wrong, anyways.
@Pixdigit I wanted to give more serious opinions, but the more I think about it, the more verbose, complex and off-topic it gets:
- compiler may optimize defines/consts differently,
- how is your program structured?
- focus should be readability/reasonaboutability,
- define and const have different use-cases so depends on your specific use-case
Yeah. It's best to write a simple example, maybe a performance test and make your own experiences.
Good luck! 🤞
Welcome to the 8th Layer of Madness
Most topics are related to Linux, Anime, Music, Software and maaaany more