Jump to content
  • Advertisement
Sign in to follow this  
Mantear

Basic GLSL questions

This topic is 4422 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
4) Is there an example somewhere of simply replacing the FFP using shaders as a starting point?

Yes get the "Orange Book" by randi rost. It covers FFP code examples in GLSL...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!