Reading/writing z-Buffer
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
You're doing quite a lot inside the beginScene/endScene part, it's usually better to do things outside the render part. But besides that, I guess that you only draw the float values as colors without conversion, which won't help much. Simply because teh colors are interpreted as 8bit per color element.
I know, but this is just showcasing weird behavior of near/far clipping planes.hybrid wrote:You're doing quite a lot inside the beginScene/endScene part, it's usually better to do things outside the render part
Are you trying to say that when I call for example,hybrid wrote:thout conversion, which won't help much. Simply because teh colors are interpreted as 8bit per color element.
Code: Select all
float data[] = {0.124, 0.456, 0.432, 0.956};
glDrawPixels(2, 2, GL_DEPTH_COMPONENT, GL_FLOAT, data)