Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

_walrus

OpenGL Vertex Shading in Opengl

This topic is 5765 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

Hi I was just wondering if there are any good tutorials on implementing vertex/pixel shaders in opengl. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Thanks for the reply, i was looking through these and i noticed that they have different syntax for doing it. For instance from ati:

glShaderOp2EXT( GL_OP_ADD_EXT, halfwayVector, viewDirection, lightDirection);
glShaderOp2EXT( GL_OP_DOT3_EXT, factor, halfwayVector, halfwayVector);
glShaderOp1EXT( GL_OP_RECIP_SQRT_EXT, factor, factor);
glShaderOp2EXT( GL_OP_MUL_EXT, halfwayVector, factor, halfwayVector);

and from nvida's site:

DP3 R1.x, c[32], R0;
DP3 R1.y, c[33], R0;
MOV R1.w, c[38].x;

It means the same thing, but i'm kinda confussed as to which way is the standard. Is one specifed to the ATI Cards or will either method work? thanks for your help


[edited by - _walrus on October 1, 2002 11:37:10 PM]

Share this post


Link to post
Share on other sites
ARB_vertex_program
ARB_fragment_program
information can be gotten from here
http://oss.sgi.com/projects/ogl-sample/registry/

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
quote:
Original post by _walrus
I'm kinda confussed as to which way is the standard. Is one specifed to the ATI Cards or will either method work? thanks for your help


[edited by - _walrus on October 1, 2002 11:37:10 PM]

NV_vertex_program and EXT_vertex_shader are sort of legacy extensions: ATI supports EXT_vertex_shader but not NV_vertex_program and it's the opposite for NVidia.

Look into ARB_vertex_program. Both ATI and NVidia will support it on their boards and it's just as powerful as the other two extensions



[edited by - DannerGL on October 2, 2002 11:32:21 PM]

Share this post


Link to post
Share on other sites
Thanks DannerGL, thats exactly what i was looking for. It was just confusing to see several different processes of doing the same thing. I''ll look into the ARB_vertex_program. I''ve been playing around with this OpenGL Shader Builder on my Mac at work and i''ve written a simple diffuse lighting model....it''s great fun. thanks again for your help.

Share this post


Link to post
Share on other sites

  • 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!