View Full Version : Texture Access from Fragment Shader
02-28-2005, 12:29 PM
Hi, new to shaders so please bear with me. What I'm wondering is does the fragment shader have access to 3d textures, both to read and more importantly write to one? I am trying to modify the texture information depending on the fragment result, is this at all possible?
02-28-2005, 01:41 PM
Yes, you can access 1D, 2D, 3D, cubemap and rectangle textures in a fragment shader/program.
The only output from your shader is the fragment color, you cannot modify the texture from within the shader.
What you can do is setup your rendering to draw into a texture (using GL_EXT_framebuffer_object or WGL_ARB_pbuffer+WGL_ARB_render_texture) so that the output of your shader goes into a texture.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.