Vertex Shading in Opengl

Started by
5 comments, last by _walrus 21 years, 6 months ago
Hi I was just wondering if there are any good tutorials on implementing vertex/pixel shaders in opengl. Thanks
Advertisement
The ATI and NVIDIA developer sections should have info on those.




MatrixCubed
http://MatrixCubed.cjb.net

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]
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
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]
Muahha, that damn thing is like 10 pages long. *stares* Sooo...much...info...overload....
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.

This topic is closed to new replies.

Advertisement