Inconvenience: Errors upon unused shader uniforms
Posted: Sat Aug 25, 2018 4:36 pm
Hey Love2D Team. I LOVE Love2D, first of all, and want to convey my gratitude to those who design and maintain it!
My issue has to do with errors thrown upon Love2D discovering unused shader uniforms. It occurs in cases where either the uniform is defined (and updated from the main program) and not used anywhere in the shader body, but also when it IS used in the shader body, only not contributing to the final output. The uniform data must contribute to the output or else Love2D throws the error. I've repeatedly found this to be frustrating as it is common to explore various ideas while writing shaders, sometimes requiring temporary commenting-out of variables, lines of code, etc. Is there a reason the shader system has been designed this way? Could this behavior be removed for future releases? Or perhaps made into an option configurable in conf.lua?
Chris
My issue has to do with errors thrown upon Love2D discovering unused shader uniforms. It occurs in cases where either the uniform is defined (and updated from the main program) and not used anywhere in the shader body, but also when it IS used in the shader body, only not contributing to the final output. The uniform data must contribute to the output or else Love2D throws the error. I've repeatedly found this to be frustrating as it is common to explore various ideas while writing shaders, sometimes requiring temporary commenting-out of variables, lines of code, etc. Is there a reason the shader system has been designed this way? Could this behavior be removed for future releases? Or perhaps made into an option configurable in conf.lua?
Chris