Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 5,207 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: VS/PS in and output semantics [Re: jcl] #140706
07/21/07 09:04
07/21/07 09:04
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline OP
Expert
frazzle  Offline OP
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Thanks for the feedback but some semantics just won't work, maybe I'll have to do a recheck about it in the msdn section from MS ^^

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: VS/PS in and output semantics [Re: frazzle] #140707
07/21/07 12:06
07/21/07 12:06
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
Code:
float timer : TIME;


for example doesn't work. timer is always 0.

to redefine my question: is there a reason why conitec implements their "own syntax" via vecTime here? why not sticking with ": TIME". it's the same with matWorldViewProj resp. ": WORLDVIEWPROJ".

thanks, joey.

Re: VS/PS in and output semantics [Re: Joey] #140708
07/21/07 17:38
07/21/07 17:38
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
It doesn't work because you are declaring it in the wrong order. And because neither timer nor TIME are valid semantics. Try vecTime...


From MSDN:
Quote:

Syntax
Semantics are attached to function parameters like this:

[Parameter Modifiers]
ParameterType ParameterName [: Semantic] [= Initializers]


- List of semantics and their descriptions
- - Red: We do not use
- - Yellow: I'm pretty sure we don't use

- VS INPUT
BINORMAL[n] Binormal
BLENDINDICES[n] Blend indices
BLENDWEIGHT[n] Blend weights

COLOR[n] Diffuse and specular color
NORMAL[n] Normal vector
POSITION[n] Vertex position in object space
POSITIONT Transformed vertex position. POSITIONT tells the runtime that the vertex is transformed and that the vertex shader should not be executed.
PSIZE[n] Point size
TANGENT[n] Tangent - we use texcoord2
TESSFACTOR[n] Tessellation factor
TEXCOORD[n] Texture coordinates

- VS OUTPUT
COLOR[n] Diffuse or specular color.
FOG Vertex fog.
POSITION[n] Position of a vertex in homogenous space. Compute position in screen-space by dividing (x,y,z) by w.
PSIZE Point size.
TEXCOORD[n] Texture coordinates.

- PS INPUT
COLOR[n] Diffuse or specular color.
TEXCOORD[n] Texture coordinates.
VFACE Floating-point scalar that indicates a back-facing primitive.
VPOS (PS_3_0) Contains the current pixel (x,y) location.

- PS OUTPUT
COLOR[n] Ouput color.
DEPTH[n] Output depth.





TIME is just another semantic. ex:
float3 vecTime : TIME;

Then later in your shader you would reference TIME, NOT vecTime

...
Out.Tex = In.Tex * TIME.w;
...

Not sure what that above line would actually do, but it's just an example

Last edited by xXxGuitar511; 07/21/07 17:40.

xXxGuitar511
- Programmer
Re: VS/PS in and output semantics [Re: xXxGuitar511] #140709
07/22/07 17:49
07/22/07 17:49
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline OP
Expert
frazzle  Offline OP
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Thanks for the effort Guitar
I'll wait until jcl has made the final decision to conclude this thread.

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: VS/PS in and output semantics [Re: frazzle] #140710
07/23/07 08:33
07/23/07 08:33
Joined: Jul 2000
Posts: 28,051
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,051
Frankfurt
I conclude it herewith. The list by xxxGuitar is almost correct, only COLOR is not used for VS input. The automatically set VS input semantics are POSITION, NORMAL, TEXCOORD0..TEXCOORD2. All other semantics are up to you to use. Many of the vS -> PS semantics - like VFACE, VPOS - are only available when your card supports the 3.0 shader model.

Re: VS/PS in and output semantics [Re: jcl] #140711
07/23/07 09:04
07/23/07 09:04
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline OP
Expert
frazzle  Offline OP
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
Oke, thanks for the clear up

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Page 2 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1