We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Trying to tackle the steep learning curve of GLSL programming, I have read the following in the Processing doc about PShaders ( here).
Processing can send to the shader up to 8 different lights and their associated parameters. The full list of light uniforms that can be used to get this information in the shader are the following:
uniform int lightCount: number of active lights uniform vec4 lightPosition: position of each light uniform vec3 lightNormal: direction of each light (only relevant for directional and spot lights) uniform vec3 lightAmbient: ambient component of light color uniform vec3 lightDiffuse: diffuse component of light color uniform vec3 lightSpecular: specular component of light color uniform vec3 lightFalloff: light falloff coefficients uniform vec2 lightSpot: light spot parameters (cosine of light spot angle and concentration)
I don't quite understand that.
Does this means that in every PShader, they are predefined uniforms, that are 'automatically' filled by Processing ?
And, if so, how to use them ? By declaring uniforms of the same name and type in the shader's code ?
As you can see, I'm perplex about this one.. :) so any explanation would be cool as I'm trying to port some shader ( goal :