Hello
I couldn’t find any Typhoonlabs Shader Designer specific discussion forum, so I’m going to post this here for now.
My problem is: one of the uniforms, named SpecExp, does not work in my Blinn shader. I have added it to Uniform Variables panel (Id: 1, Type: float, Name: SpecExp, Values: 32.0) and it’s checked. When I run the shader, the model ends up being white as if SpecExp was zero, although it is NOT. Here’s my shader code:
uniform sampler2D TextureUnit0;
uniform float SpecExp;
varying vec4 Cs;
varying vec4 V_eye;
varying vec4 L_eye;
varying vec4 N_eye;
void main(void)
{
vec3 V = normalize(vec3(V_eye));
vec3 L = normalize(vec3(L_eye));
vec3 N = normalize(vec3(N_eye));
vec4 Cd = texture2D(TextureUnit0, gl_TexCoord[0].xy);
float diffuse = clamp(dot(L, N), 0.0, 1.0);
vec3 H = normalize(L + V);
float specular = clamp(pow(dot(N, H), SpecExp), 0.0, 1.0);
gl_FragColor = Cd*0.5 + (Cd*diffuse)*0.5 + (Cs*specular);
}
If I change the SpecExp within pow() statement to a float value such as 32.0, it works without problems. I have Windows XP SP2, ATI Radeon 9700 with 6.14.10.6512 drivers installed.
TIA.