HLSL function reference

Started by
4 comments, last by _code_fly 19 years, 6 months ago
hi, I read through the HLSL shader lanuage section of the DirectX9.0 SDK help file and it did not seem to be the same as the actual syntax used. Just wondering if anyone can clarify what's going on and hopefully direct me to a link with the real language reference. cheers
Advertisement
er... whoops, it looks like I was wrong about the D3D9 help file.
I was confused by the following lines:

Quote:
Variables
Variables are declared as follows:

[static uniform extern shared volatile] [const]
type id [array_suffix] [: semantic] [= initializers] [annotations] [, id ...] ;


Which part of those lines confuse you?

static const float foo [1][2][3] : COLOR = 0.0f < float min = 0.0f; float max = 1.0f; >;

xyzzy
what is meant by [annotations] [, id ...] ; ??
While I'm not sure about the annotations part, the [, id...] part just means that you can have more than one variable of the same type declared in the same statement, for example:
float4 position, texcoord, colour;


-Auron
I thought that the annotations , might be
< float min = 0.0f; float max = 1.0f; >;

thanks for clarifying what [,id...]; meant.

This topic is closed to new replies.

Advertisement