Jump to content
  • Advertisement

Archived

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

Sunray

Shader programming

This topic is 5734 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 want to start learning programming pixel/vertex-shaders but it seems to be a jungle of extensions to me. It would be nice if someone could make this clear. =) What''s: · NV_vertex_program · EXT_vertex_shader · ARB_vertex_program · GL_ARB_fragment_program

Share this post


Link to post
Share on other sites
Advertisement
NV_vertex_program
nvidas own vertex program extension.

EXT_vertex_shader
ATIs proposal to an multivendor vertex program extension

ARB_vertex_program
The ARB approved Vertex program extension, now supported by atleast nVidia and ATI

GL_ARB_fragment_program
The ARB approved fragment program extension.. only supported by the latest ATI and nVidia cards ( ati from radeon9500, nvidia only GeforceFX)

Share this post


Link to post
Share on other sites
OK, thanks.

So GL_ARB_fragment_program is a pixel shader extension?
How do you program pixel shaders on a Gf4?

I guess this will be easier in OGL 2.0.

Share this post


Link to post
Share on other sites
You don''t coz they don''t support them in hardware

If you scroll down the topic list a bit theres a few threads about this (also check the Graphics Programming and Theory forum).

Share this post


Link to post
Share on other sites
I suggest you use Cg for shaders programming. It''s MUCH easier to use then the ASM language. Furthermore, if I''m not mistaken, Cg works on ATI cards too.

- Yuval

Share this post


Link to post
Share on other sites
Cg won''t run on anything except GeForceFX cards however. I continuously get "Do not support ARB_FRAGMENT" while trying to run them.

~Main

==
Colt "MainRoach" McAnlis
Programmer
www.badheat.com/sinewave

Share this post


Link to post
Share on other sites
quote:
Original post by duhroach
Cg won''t run on anything except GeForceFX cards however. I continuously get "Do not support ARB_FRAGMENT" while trying to run them.

~Main

==
Colt "MainRoach" McAnlis
Programmer
www.badheat.com/sinewave


That''s not true - Cg support ATI cards. You tried to run a Pixel Shader, which works only on GeForceFX and ATI Radeon 9700 cards. It doesn''t matter if you use the ARB_FRAGMENT extension, it won''t work in hardware on other cards then GeforceFX and ATI Radeon 9700. You can, however, use Vertex Shaders on other cards.

- Yuval

Share this post


Link to post
Share on other sites
I haven''t used cg, but i have heard that it comiples to optimized code for NV cards, running it on a supported radeon may be slower. I''m not sure if this is true but i have heard people talking about it on other forums

Share this post


Link to post
Share on other sites
quote:

You can, however, use Vertex Shaders on other cards.



If I can''t use the primary factor behind Cg, which namely is it''s ability to support vertex AND pixel shaders, and i''m limited to ONLY vertex shader use out of the language, then there''s no point in learning it. By definition, you can''t use the key features of the language, (Interplay between vertex/pixel programming) on anything less than the FX level cards (and whatever number ATI is up to now). Instead, Sit down and learn GL_VERTEX_PROGRAM_NVx because that''s all Cg Would be pumpign out for you anyhow.


~Main

==
Colt "MainRoach" McAnlis
Programmer
www.badheat.com/sinewave

Share this post


Link to post
Share on other sites
what target did you specify when compiling your cg stuff? id expect it to be clever enough and do most things with texture shaders und register combiners and they should work on pretty much every geforce.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!