c# - XNA Unexpected ')' Effect Compiler -
my xna hlsl compiler keeps telling have unexpected ')' @ end of subtraction. pixelshader:
float3 lightdir = normalize(lightdirection); float3 viewdir = normalize(input.view); float3 normal = input.normal; float diff = saturate(dot(input.normal, lightdir)); float3 reflect = normalize(2 * diff * normal - lightdir); float specular = pow(saturate(dot(reflect, viewdir)), specularintensity); return tex2d(colormapsampler, input.texcoord) * diffuseintensity * diffusecolor * diff + specularcolor * specular);
sometimes though randomly works there after @ spot "bugs" again.
return tex2d(colormapsampler, input.texcoord) * diffuseintensity * diffusecolor * diff + specularcolor * specular);
that's 1 opening brace , 2 closing braces; 1 of these should removed. i'm guessing it's first one?
Comments
Post a Comment