Jump to content
  • Advertisement

Archived

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

quack

Shader compatibility

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

I just started into shaders, really thinking they were gona be izzo. Anyways I have compatibility questions if a shader expert will help me out. I use two shaders in my program, I have an Ati9000. I read older cards only have 1 shader does that mean I can''t use two in my program on those? Will dx do some kinda d/l n'' swap thing? I figure since I have to call SetShader that dl''s it to the card so I can have as many as I want, or am I backward. Also does todays average card have shader support (>= 1.1)? thanks quack

Share this post


Link to post
Share on other sites
Advertisement
I remember no card that only have one shader, but it wouldn't make a difference either.

You can only use one shader/render state at a time

[edited by - noVum on August 15, 2003 2:34:09 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by quack
I use two shaders in my program, I have an Ati9000. I read older cards only have 1 shader does that mean I can''t use two in my program on those? Will dx do some kinda d/l n'' swap thing?


Not quite sure what you mean by that. Current PC APIs only let you run one vertex shader (aka program) and one pixel (aka fragment) shader at any one time. YOUR PROGRAM swaps between the active shader in much the same way you''d swap between render states. e.g.:


Set vertex shader: "lighting_and_wave vshader"
Set pixel shader: "shiny water"
Draw shiny-water-stuff

Set vertex shader: "lighting_and_skinning vshader"
Set pixel shader: "bump mapped pshader"
Draw lit-skinned-bumpy drowning man stuff



quote:
I figure since I have to call SetShader that dl''s it to the card so I can have as many as I want, or am I backward.



Nope, perfectly forward. See above.

quote:

Also does todays average card have shader support (>= 1.1)?



Vertex or pixel processing?

For 1.1, the answer is yes.


BTW: since you imply you''re using D3D, I''d definately recommend taking a look at Effects & Techniques in D3DX - they make life much easier for that sort of thing.

quote:
quack


moo

Share this post


Link to post
Share on other sites
Thanks, I thought perhaps a call to CreateVertexShader() setup the program on the cards memory. but I guess not if I can have as many as I want. So I figure the overhead of a call to SetVertexShader depends on the shadersize.

S1CA also for the questions you've answered for me in the past I've put you as special thanks in my latest project. If you would like a demo of It so far I can put something together so you can tell me what you think for my first DX IM project.


[edited by - quack on August 18, 2003 1:24:17 PM]

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!