Jump to content
  • Advertisement
Sign in to follow this  
directNoob

RenderMonkey and GLSL: Input Semantics? Putting something into predefined gl_* Vars?

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

Hi. How is it possible to assign attributes to GLSL vars WITHOUT any input semantic?
attribute vec3 tangent;

How can GLSL or RenderMonkey know, how to assign the propper variable from the input stream to this variable? And, also in RenderMonkey, how can I assign any values to the variables like gl_light[] or similar? Thanks Alex

Share this post


Link to post
Share on other sites
Advertisement
RM will do the math on some models like the teapot to make tangent vectors, and bitangent vectors. You use

attribute vec3 rm_tangent;

IIRC it's rm_tangent or close to it. Then in the streaming data you select the tangent as an attribute for your vertices's.

If you want your own lightpos just make a uniform variable and put that in your vertex shader.

Share this post


Link to post
Share on other sites
The Render Monkey manual says to declare it as

attribute vec3 rm_Tangent;
attribute vec3 rm_Binormal;

Render Monkey recognizes these attributes and fills them.

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!