Original Post
Is there any hacks or extensions or anything at all that lets you access the framebuffer (or depth-buffer) in GLSL. I had lots of shader plans, did all the tutorials about GLSL, then only read too late that you can't access the framebuffer. Now it seems 3/4 of my shader ideas are impossible: 1) Everyday basic transparent objects have per-channel transparencies - a piece of green cellophane is mostly opaque to red / blue, and mostly transparent to green. gl_FragColor = (gl_OldColor.xyz * material_alpha.xyz) + (lighting results etc); 2) Volumetric transparencies: Depth-sort faces, then, take the distance between old Z and new Z and alpha = pow(volume_alpha, ((gl_FragDepth - gl_OldDepth) / normalized_eye_vector.z)); gl_FragColor = gl_OldColor * volume_alpha; 3) Single-polygon sphere-shader, where depth is calculated from the coordinates. And many more. Framebuffer access must be coming in the future, right? I mean, this seems almost as important as having uniform and attribute values. During fixed transparency calcs the framebuffer pixel must be read from memory to the GPU anyway, and the depth must be read for depth-testing. One other thing - is there any way to access a VBO array of floats from GLSL (vertex), or any other large array apart from textures? Thanks.