Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

write out normalbuffer for ssao

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Farci   Members   

126
Like
0Likes
Like

Posted 29 July 2012 - 02:03 PM

Hello,

just a short question, a normal can point in any direction so it can cotain negativ values. So whats the best way to handle negativ values for an normalbuffer which will be used for ssao. (I'm writing the normals on rendertarget with 4 floats)
Or are these values saved as they are, even if they are negativ?

#2 Radikalizm   Members   

4794
Like
1Likes
Like

Posted 29 July 2012 - 02:26 PM

A common way to solve this problem is to convert the values in your normal vector from a range of [-1, 1] to a range of [0, 1] and back again when you do your ssao pass

You can do said conversion like this: n = (n + 1) / 2

The conversion back to your original range would then become: n = n * 2 - 1


I gets all your texture budgets!


#3 Farci   Members   

126
Like
0Likes
Like

Posted 29 July 2012 - 02:28 PM

ahh ok then this way, thought there might be an more classy way :)

thx for help




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.