Jump to content
  • Advertisement
Sign in to follow this  
thoue

how to do billboarding in HLSL

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

Correct my if im wrong, but if i wanna do billboarding in HLSL i just have to pass the inverse in the view matrix then get data in it to apply rotaton to the vertecies. Now any clues how to do this ? Not the complet code but the logic. I know how to manupulate and set the .FX files.

Share this post


Link to post
Share on other sites
Advertisement
why would u want to? I find its better to use the ID3DXSprite interface then use ID3DXEffect to apply your shaders on transformed/lit verts.
Also think that would be faster.

If you pass the inverse of the view transform then you pretty much are operating in camera-space, unless Im much mistaken this is NOT what u want. Billboarding is just rotating a quad to face the camera, this can be done by simply keeping track of the angle between the camera and its lookat position (camera yaw) and assigning that value to the yaw of a billboard.
If u use Sprites you wont have to worry about that either I believe.

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!