This commit is contained in:
StarBeats 2026-02-05 21:13:37 +08:00
parent 965117b271
commit db6854d981
2 changed files with 156 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -26,6 +26,7 @@ Shader "Hidden/OIT/WBOITBlend"
{
v2f o;
float2 uv = float2((vertexID << 1) & 2, vertexID & 2);
// 如果 ZWrite Off在 gl 下 CCW 逆时针环绕dx 默认 CW 顺时针环绕,需要 uv.xy = uv.yx;
float4 pos = float4(uv * 2.0 - 1.0, UNITY_NEAR_CLIP_VALUE, 1.0);
#ifdef UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION
pos = ApplyPretransformRotation(pos);