12
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WorldSpaceにおけるカメラの方向(UnityShader)

Posted at

カメラ空間への変換行列から取得できる

  • カメラ右方向: UNITY_MATRIX_V[0].xyz
  • カメラ上方向: UNITY_MATRIX_V[1].xyz
  • カメラ前方向: -UNITY_MATRIX_V[2].xyz

情報源

i-saintさんのブログ記事です(._.)
http://i-saint.hatenablog.com/entry/2015/03/18/194818

使用例

ビルボードの法線はカメラの方向を向いていることから、ビルボードのライティングに利用。
https://github.com/sugi-cho/BillboardStandardLit

Billboards.png

12
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?