Im neither an expert in GPU technology nor in shaders. But reading the OGL 2.0 shading languange specs, I wondered that there is full read access to textures but no possiblity for write access, or did I miss something? Isn’t it possible? Isn’t it possible in realtime? Or is it just another feature only I dream of?
Originally posted by Mexx:
I wondered that there is full read access to textures but no possiblity for write access, or did I miss something?
Just bind a texture are your rendering target. ATI has a couple of extensions that do this, so it’s not too far fetched to think that this could be incorporated into OpenGL 2.0 (outside the shader language).
Originally posted by m2:
… this could be incorporated into OpenGL 2.0 (outside the shader language).
I thought of write access inside the shader language for two reasons:
you can have a “shared memory” for your shaders. For example this makes it possible to have dynamic shadowed bumpmapping with only two render passes (for one directional light at least), or real dynamic self shadowing of terrain in one render pass (best but possible case).
when beeing able to write to a texture within the shader, the results can be written into the frame buffer (or maybe you can write into the framebuffer directly). For example this makes it possible to have curved surfaces which are calculated per pixel.
Maybe these things wouldn’t be that easy also if write access within a shader is possible, but I think they are possible.