Bug fixes

This commit is contained in:
SoulliesOfficial
2026-04-02 08:58:00 -04:00
parent 21e97d2397
commit c727ebbd71
171 changed files with 905841 additions and 1471446 deletions

View File

@@ -178,7 +178,12 @@ Shader "Soullies/DTM_RandomGridTube"
float u = angle * _TubeRadius;
// V is driven by World Z to maintain seamless tiling
float v = input.positionWS.z;
// 1. 获取管道局部Z轴在世界空间中的单位方向向量
float3 tubeForwardWS = TransformObjectToWorldDir(float3(0, 0, 1));
// 2. 将世界坐标投影到管道的正前方,替代原本写死的 World Z
// 这样无论管道怎么旋转V轴永远沿着管道的长度方向进行世界坐标级别的无缝平铺
float v = dot(input.positionWS, tubeForwardWS);
float2 cylindricalUV = float2(u, v);