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 Aug 11, 2024
1 parent 5ca8e69 commit 0be27a0
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 0be27a0

Please sign in to comment.