提交 b9a51318 编写于 作者: M mkkellogg

Updated comments for cubeToUV() function in shadow mapping shader.

上级 f4769083
......@@ -25,6 +25,25 @@
}
/**
* cubeToUV() maps a 3D direction vector suitable for cube texture mapping to a 2D
* vector suitable for 2D texture mapping. This code uses the following layout for the
* 2D texture:
*
* Y y
* xzXZ
*
* Y - Positive y direction
* y - Negative y direction
* X - Positive x direction
* x - Negative x direction
* Z - Positive z direction
* z - Negative z direction
*
* Alternate code for different layouts, more compact code arrangement, and seam
* skipping can be found here: https://gist.github.com/tschw/da10c43c467ce8afd0c4
*/
vec2 cubeToUV( vec3 v, float texelSizeX, float texelSizeY ) {
// Horizontal cross layout:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册