How are the colors set up on the Colors parameter page intended to be used? How can they be accessed in the shader?
If this info lives somewhere I should have checked please let me know!
How are the colors set up on the Colors parameter page intended to be used? How can they be accessed in the shader?
If this info lives somewhere I should have checked please let me know!
You can set up color uniforms on that page. Uniforms are global variables for your shader code.
Any uniforms declared with the parameter fields on their respective pages (such as Vectors, Colors, Arrays, Matrices) are declared automatically for you in the shader by TouchDesigner. So yes, you can access them directly by name in your glsl code.
You can find this info on the page Write a GLSL POP, paragraph Uniforms:
And also see explanation here in the first paragraph, why a uniform is called a uniform:
https://wikis.khronos.org/opengl/Uniform_(GLSL)
You can see a uniform as an input value sent from the CPU to the GPU.