Files
dl/shader/include/tocubemap.glsl
T
2026-09-16 14:07:40 +08:00

11 lines
262 B
GLSL

vec3 tocubemap(vec3 vec)
{
// 世界坐标系 → 转换成标准 Cubemap Y-Up 坐标
// +X 右 (Right)
// -X 左 (Left)
// +Y 上 (Up)
// -Y 下 (Down)
// +Z 前 (Forward)
// -Z 后 (Backward)
return vec3(-vec.y, vec.z, vec.x);
}