Sign in to follow this  
Mantear

Basic GLSL questions

Recommended Posts

Greetings, I'm beginning to learn about shaders, and have some basic questions. 1) My desktop has a Radeon 9800 Pro and my laptop has a GeForce4 4200, which support different Shader Model versions. Where can I find information about the different SM versions? What each supports and doesn't support, etc. 2) Since my laptop doesn't support fragment shaders (via GLSL at least), how can I use vertex shaders? Most examples I see has the vertex shader passing information about color to the fragment shader. I've got a basic vertex shader now, but the colors are all wrong. Can a vertex shader be used without a fragment shader? 3) If I'm using shaders to basically replace the fixed-function pipeline, do I never want to enable lighting and textures via glEnable(GL_LIGHTING), etc? 4) Is there an example somewhere of simply replacing the FFP using shaders as a starting point? EDIT: 5) I run some "picking" code which re-renders the scene using color codes so I can determine what item the user selected. I only render this scene to the back buffer and never bring it to the front. However, when using the vertex shader, the colors "shift" whenever the picking scene is rendered. Why am I seeing the results of the picking scene rendering? Do I have to specify in the shader to render to the back buffer? Thanks! [Edited by - Mantear on September 9, 2006 1:45:36 PM]

Share this post


Link to post
Share on other sites
1. R9800 supports 2.0 shaders. GF4 1.1 VS and 1.3 PS.
2. VS can be used without PS. Just look at the fixed-function pipeline for pixel rasterizing and you'll know what data to pass from VS.
3. If you use shaders you don't need to enable lighting or texturing (texturing must be enabled for PS < 2.0).
4. I don't know. Maybe...
5. I don't know what's exactly the problem. Maybe some screenshots...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this