Shaders in OGL

Started by
2 comments, last by Silly_con 20 years, 6 months ago
I want to program pixel and vertex shaders in opengl, but I only can find info about do it in d3d, where I have to start ?
Advertisement
www.cgshaders.org
Sometimes movement is a result of a kick in the ass!
You have various possibilities. Either you program lowlevel shaders, in ASM, or you use a high level shading language.

In the former case, take a look at the following extensions:
ARB_vertex_shader
ARB_fragment_shader

for high level shader languages (definitely better suited for beginners, and probably the future of programmable 3D), you can currently use nVidia''s Cg. It will also work on non-nVidia cards, BTW. If you''re interested in learning Cg, there is a nice book called "The Cg tutorial" available (search Amazon).

In the near future, Cg will be replaced by GLSLang, an OpenGL shader language which will be included into the OpenGL 2.0 core, and available as extension from OpenGL 1.5 on. The specs are already available, but currently implementations are restricted to highend 3D cards. It won''t take very long until it is available on consumer level cards.
quote: Cg will be replaced by GLSLang, an OpenGL shader language which will be included into the OpenGL 2.0 core


I''d just like to add that GLSLang (and it''s DX equivilent HLSL) is basically the same as Cg but some keywords and function names may be different. So if you learn Cg now it''s not gonna be useless knowledege if you end up using GLSlang.

This topic is closed to new replies.

Advertisement