• Advertisement
Sign in to follow this  

G-Buffer rendered texture missing values

This topic is 1776 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

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:

[attachment=14168:No_Error.png]

[attachment=14169:Error.png]

 

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

Share this post


Link to post
Share on other sites
Advertisement

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, .. );

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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.

Share this post


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

  • Advertisement