Sign in to follow this  
feiyurainy

a question about string and annotations in effect

Recommended Posts

I have learned the effect file now, but I cann't understand the "string" and "annotation" in effect very much, and how and when should I use these two types. Is there any tutorial that show how to use them? thank you

Share this post


Link to post
Share on other sites
Annotations are hints to the application as to what certain shader parameters are used for. For example, FX Composer and RenderMonkey both check the annotations of the .fx file to label parameters in their GUI's. A scalar parameter that has defined min and max values could have a slider associated with it, or a diffuse color could have a fancy color wheel associated with it by the main program.

You don't need annotations for shaders to work. But they're usefull when creating tools for artists to manipulate things.

As far as tutorials go, there aren't any. The Summer 2004 SDK docs have sections on standard annotations and semantics that you can look at. The docs are pretty understandable for the main kinds of objects an shader IDE would need to show artists and the docs will get better with time.

Annotations and semantics have been a gray area of shader development because there was no real standard. But hopefully with the latest SDK update, both Nvidia and ATI will adjust their shader tools to match the new standard. I think Nvidia just released (or is about to release) an updated version of FX Composer that adheres to the new standard. ATI will probably follow suit soon.

neneboricua

Share this post


Link to post
Share on other sites

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