Jump to content

View more

Image of the Day

The beast has a mighty searchlight of evil! #screenshotsaturday https://t.co/bzKepOojDL
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

G-Buffer rendered texture missing values

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
3 replies to this topic

#1 gs2912   Members   

154
Like
0Likes
Like

Posted 11 March 2013 - 06:30 AM

Hey there, I'm trying to use positions in view space written to texture from a G-Buffer. Unfortunetly there are some heavy problems:

Testing the view space positions by coloring the output when the position is greater than a given value results in the same pictures for every value lesser than 1.0. Beyond that, the G-Buffer renders correctly but the positions in the pass using the texture from the G-Buffer seem to not have any value.

 

Here are some picture - I hope they will make my problem better understandable:

No_Error.png

Error.png

 

Does anybody has had some similliar issues or has a clue, what it could be?



#2 painofangels   Members   

102
Like
0Likes
Like

Posted 11 March 2013 - 08:22 AM

My guess is that you don't use floating-point textures to store the position in, so the value will be clamped to [0..1] for every component in the shader.

Try to define the texture-format in application-code with glTexImage2D( .., .., RGB_32F, .., .., .., .., GL_FLOAT, .. );



#3 gs2912   Members   

154
Like
0Likes
Like

Posted 11 March 2013 - 10:44 AM

My guess is that you don't use floating-point textures to store the position in, so the value will be clamped to [0..1] for every component in the shader.

Try to define the texture-format in application-code with glTexImage2D( .., .., RGB_32F, .., .., .., .., GL_FLOAT, .. );

 

That's the trick ... I used GL_RGBA before instead of GL_RGBA32F. Thank you very much, that helped :)



#4 theagentd   Members   

982
Like
0Likes
Like

Posted 11 March 2013 - 11:01 AM

Uh, shouldn't you be using GL_RGBA_16F instead of 32-bit floats? Should be faster and it's also supported by OGL 2 level hardware. Note that GL_RGB_16F uses the same amount of memory as GL_RGBA_16F due to padding.






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.