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

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -