Skip to content

Commit

Permalink
Force normalize normal in fragment shader
Browse files Browse the repository at this point in the history
  • Loading branch information
Delt06 committed Jan 11, 2022
1 parent 552278f commit 69d629d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ half4 frag(const v2f input) : SV_Target
half3 normal_ws = input.normalWS;
#endif

normal_ws = NormalizeNormalPerPixel(normal_ws);
normal_ws = normalize(normal_ws);

const half3 light_direction_ws = normalize(main_light.direction);
const float3 position_ws = input.positionWSAndFogFactor.xyz;
const half3 view_direction_ws = SafeNormalize(GetCameraPositionWS() - position_ws);
Expand Down

0 comments on commit 69d629d

Please sign in to comment.