• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by waka324 · Jan 31, 2014 at 05:41 PM · rotationshadermatrixbillboard

Stop Billboard Texture Rotation in Triplanar Shader

Hello all!

I'm working on creating a new type of billboard shader that I haven't been able to find examples of.

Essentially, I want to create a sort of tri-planar (oriented to object space) billboard shader for a cloud system. This should help keep the illusion that the billboard is a cloud while rotating around it. I started with the shader here: http://en.wikibooks.org/wiki/Cg_Programming/Unity/Billboards and modified it to support additional sides. This part works, but I'm having issues when rotating around the axis of view.

Ie. When looking at the texture from the "Z" direction and rotating the billboard quad around "Z" the texture stays in place on the screen. This is also evident when looking "up" or "down" from the quad and rotating the camera around the "Y" axis. Obviously, this will break the illusion as well.

I tried a few different techniques to try and alter the texcoords to counter the Projection-Model rotation, but so far I haven't been able to find anything to get rid of it.

If needed I'll be posting the tri-planar shader later along with my attempts to counter the texture orientation.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Rotate a vertex about "u" Axis 1 Answer

Getting the forward position of an object in a vertex shader 0 Answers

Efficient way to keep a fixed rotation for sprite? 0 Answers

Simple Special effects 0 Answers

Triplanar surface shader not responding to Mesh.Colors 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges