Sign in to follow this  

HLSL semantics

This topic is 2848 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

float4 EyePositionWS : ViewPosition; This declaration in global scope means what? If I got this semantics are only used on variables transferred between the shaders but this one is only used in the vertex shader. Is it therefore a semantic at all? I couldn't find a built-in semantic called ViewPosition either. Whatever it is: How do I get to know the underlying vector space?

Share this post


Link to post
Share on other sites
it's a float4 type variable called EyePositionWS bound to the custom ViewPosition semantic. You would use GetParameterByName providing "EyePositionWS" or GetParameterBySemantic providing "ViewPosition" to get to this from your app.

Share this post


Link to post
Share on other sites
Semantics attached to constants have no inherent meaning to the runtime. They are meant to be interpreted by the application. Typically you'll use them with programs like RenderMonkey or Maya which load your custom shaders, and use the semantics and attributes to figure out what values to set for constants.

Share this post


Link to post
Share on other sites

This topic is 2848 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this