stupid question about HLSL
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?
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.)
(I haven't read everything actually yet. I decided to start HLSL a few day ago.)
The compiler is backward compatible. Don't worry about it! Each newer version simply adds or modifies instructions.
You can provide the shader version to the compiler in the command line like this
fxc /T ps_2_0 ...
- Wolf
fxc /T ps_2_0 ...
- Wolf
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]
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]
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement