Jump to content
  • Advertisement
Sign in to follow this  
famous

HLSL semantics

This topic is 3159 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!