Jump to content
  • Advertisement
Sign in to follow this  
zinking

Display Normals

This topic is 3315 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

RGB colors have range 0,255 but normal values could be negative float values if I directly out put the normal vector as color, what Happened to the final result I see are they automatically clamped?

Share this post


Link to post
Share on other sites
Advertisement
If you don't render to a target that supports the full float range than yes, your values get clamped to [0, 1]. So you would have to transform them to that range beforehand (value + 1 / 2).

Share this post


Link to post
Share on other sites
If you try to display all three colors at once it can be very difficult to
interpret what information is being conveyed.

I have found it useful in the past to display a single direction at a time when debugging. This lets you clearly see the directionality of the surface normal, and if you set things up to switch the axis that it displays to change every 1-2 seconds, then you get a very good picture of what is going on.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!