stupid question about HLSL

Started by
6 comments, last by NamelessTwo 19 years, 7 months ago
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?
Another nameless person in the virtual space...
Advertisement
There are no stupid questions.

Yes, it supports all those versions.
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.)
Another nameless person in the virtual space...
The compiler is backward compatible. Don't worry about it! Each newer version simply adds or modifies instructions.
No bombs, No guns, just an army of game creators...
You can provide the shader version to the compiler in the command line like this

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]
Another nameless person in the virtual space...
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.
________________
"I'm starting to think that maybe it's wrong to put someone who thinks they're a Vietnamese prostitute on a bull"       -- Stan from South Park
Lab74 Entertainment | Project Razor Online: the Future of Racing (flashsite preview)
Mr. Garrison is a genious! There is no doubt about it!

[Edited by - NamelessTwo on September 21, 2004 2:56:26 PM]
Another nameless person in the virtual space...

This topic is closed to new replies.

Advertisement