浏览代码

Flip the v texture coordinate rather than the u.

/4.1
Todd Stinson 4 年前
当前提交
b9fb0ac7
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 8
      Assets/Scripts/TestDepthImage.cs
  2. 2
      Assets/Shaders/EnvironmentDepthGradient.shader

8
Assets/Scripts/TestDepthImage.cs


{
case ScreenOrientation.LandscapeRight:
rectSize = new Vector2(maxDimension, minDimension);
rotation = 0.0f;
rotation = 180.0f;
rotation = 180.0f;
rotation = 0.0f;
rotation = 270.0f;
rotation = 90.0f;
rotation = 90.0f;
rotation = 270.0f;
break;
}
m_RawImage.rectTransform.sizeDelta = rectSize;

2
Assets/Shaders/EnvironmentDepthGradient.shader


float cosrot = cos(angle);
float sinrot = sin(angle);
float2 tmp = float2(0.5f - v.texcoord.x, v.texcoord.y - 0.5f);
float2 tmp = float2(v.texcoord.x - 0.5f, 0.5f - v.texcoord.y);
v2f o;
o.position = TransformObjectToHClip(v.position);

正在加载...
取消
保存