Advertisement

Problems with directional lighting shader

Started by January 29, 2018 10:12 AM
12 comments, last by DividedByZero 7 years ago

Cool, thanks for that.

How would you go about re-normalising as above? From the diagram, how would you work out where the height of the red area should be?

 

All you need is a unit-length normal, you can just add


v_Normal = normalize(v_Normal);

to your fragment shader:)

Advertisement

LOL, you make it look so easy.

Can't thank you enough dude :)

This topic is closed to new replies.

Advertisement