Jump to content

  • Log In with Google      Sign In   
  • Create Account


G-Buffer rendered texture missing values


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   -  Reputation: 150

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?



Sponsor:

#2 painofangels   Members   -  Reputation: 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   -  Reputation: 150

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   -  Reputation: 549

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.



PARTNERS