Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Fixed shader warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Jul 12, 2018
1 parent 796f0da commit d9356e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions BasicHLSLFX11/BasicHLSLFX11.fx
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ VS_OUTPUT RenderSceneVS( float4 vPos : POSITION,

// Compute simple directional lighting equation
float3 vTotalLightDiffuse = float3(0,0,0);
for(int i=0; i<nNumLights; i++ )
vTotalLightDiffuse += g_LightDiffuse[i] * max(0,dot(vNormalWorldSpace, g_LightDir[i]));
[unroll] for(int i=0; i<nNumLights; i++ )
vTotalLightDiffuse += g_LightDiffuse[i].rgb * max(0,dot(vNormalWorldSpace, g_LightDir[i]));

Output.Diffuse.rgb = g_MaterialDiffuseColor * vTotalLightDiffuse +
g_MaterialAmbientColor * g_LightAmbient;
Output.Diffuse.a = 1.0f;
Output.Diffuse.rgb = g_MaterialDiffuseColor.rgb * vTotalLightDiffuse +
g_MaterialAmbientColor.rgb * g_LightAmbient.rgb;
Output.Diffuse.a = g_MaterialDiffuseColor.a;

// Just copy the texture coordinate through
if( bTexture )
Expand Down

0 comments on commit d9356e9

Please sign in to comment.