Jump to content
  • Advertisement
Sign in to follow this  
NamelessTwo

stupid question about HLSL

This topic is 5174 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 know that when HLSL when compiled can produce output specific code for the different hardware but does it support shaders version 1.0, 1.1, 1.3, 1.4?

Share this post


Link to post
Share on other sites
Advertisement
Either I do not understand what I'm reading but I cannot figure it out how is this support done.

(I haven't read everything actually yet. I decided to start HLSL a few day ago.)

Share this post


Link to post
Share on other sites
The compiler is backward compatible. Don't worry about it! Each newer version simply adds or modifies instructions.

Share this post


Link to post
Share on other sites
You can provide the shader version to the compiler in the command line like this

fxc /T ps_2_0 ...


- Wolf

Share this post


Link to post
Share on other sites
Does this mean that if I write a program that uses solely HLSL for all 3D stuff and I develop it targeting shader version 2.0 (lets assume that 6800 is not yet released) I still can target shader version 3.0 (an 1.1 also) without any need to modify the program?

What's going to be the difference (visual) between the same shader compiled for v. 2.0 and v. 3.0?

... or maybe I'm asking the wrong question :) I want to know things before I waste too much time figuring them by myself. How is going the HLSL programmer notice the difference between the capabilities of the different shader versions?

[Edited by - NamelessTwo on September 21, 2004 11:31:52 AM]

Share this post


Link to post
Share on other sites
use the PixelShaderVersion and VertexShaderVersion caps bits to tell what version your card supports. You can then load the appropriate shaders.
Or if you write a basic shader targetting model 1.1/1.4 to do all your fx then you dont have to worry coz obviously faster cards will run them fine and I also remember that 1.1/1.4 is faster than 2.0 anyway (unless u REALLLLLLY need shader functionality).

"There are no stupid questions, eric, only stupid people"
--Mr. Garrison from south park..

haha Im jk.

Share this post


Link to post
Share on other sites
Sign in to follow this  

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