Skip to content

Commit

Permalink
Aligning per pixel lighting shader with code style
Browse files Browse the repository at this point in the history
  • Loading branch information
colincornaby committed Nov 16, 2024
1 parent e0edcd0 commit 36c1fb8
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,11 @@ vertex ColorInOut pipelineVertexShader(Vertex in [[stage_in]],
position = (in.weight1 * position) + ((1.f - in.weight1) * position2);
}

if (perPixelLighting)
{
if (perPixelLighting) {
// send the world pos on to the pixel shader for lighting
out.worldPos = position;
out.normal = Ndirection;
}

if (perPixelLighting)
{

out.vtxColor = inColor;
} else {
out.vtxColor = calcLitMaterialColor(lights, inColor, materialLighting, position, Ndirection);
Expand Down

0 comments on commit 36c1fb8

Please sign in to comment.