浏览代码

Updated render queue definition

/Yibing-Project-2
Frédéric Vauchelles 7 年前
当前提交
147b2531
共有 4 个文件被更改,包括 8 次插入7 次删除
  1. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
  2. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderQueue.cs
  3. 3
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/BaseLitUI.cs
  4. 5
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/LitUI.cs

4
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


"Forward Transparent Display"
};
static readonly RenderQueueRange k_RenderQueue_PreRefraction = new RenderQueueRange { min = (int)HDRenderQueue.GeometryLast + 1, max = (int)HDRenderQueue.PreRefraction };
static readonly RenderQueueRange k_RenderQueue_Transparent = new RenderQueueRange { min = (int)HDRenderQueue.PreRefraction + 1, max = (int)HDRenderQueue.Last };
static readonly RenderQueueRange k_RenderQueue_PreRefraction = new RenderQueueRange { min = (int)HDRenderQueue.PreRefraction, max = (int)HDRenderQueue.Transparent - 1 };
static readonly RenderQueueRange k_RenderQueue_Transparent = new RenderQueueRange { min = (int)HDRenderQueue.Transparent, max = (int)HDRenderQueue.Overlay };
readonly HDRenderPipelineAsset m_Asset;

3
ScriptableRenderPipeline/HDRenderPipeline/HDRenderQueue.cs


GeometryLast = UnityEngine.Rendering.RenderQueue.GeometryLast,
PreRefraction = 2750,
Transparent = UnityEngine.Rendering.RenderQueue.Transparent,
Overlay = UnityEngine.Rendering.RenderQueue.Overlay,
Last = Overlay + 1000
Overlay = UnityEngine.Rendering.RenderQueue.Overlay
}
}

3
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/BaseLitUI.cs


TessellationMode tessMode = (TessellationMode)material.GetFloat(kTessellationMode);
SetKeyword(material, "_TESSELLATION_PHONG", tessMode == TessellationMode.Phong);
}
var isPrePass = material.HasProperty(kPreRefractionPass) && material.GetFloat(kPreRefractionPass) > 0.0;
SetKeyword(material, "_REFRACTION_ON", !isPrePass); // Refraction is not available for pre refraction (color buffer cannot be fetched)
}
static public void SetupBaseLitMaterialPass(Material material)

5
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Editor/LitUI.cs


SetKeyword(material, "_REFRACTION_THINPLANE", refractionModeValue == Lit.RefractionMode.ThinPlane);
SetKeyword(material, "_REFRACTION_THICKPLANE", refractionModeValue == Lit.RefractionMode.ThickPlane);
SetKeyword(material, "_REFRACTION_THICKSPHERE", refractionModeValue == Lit.RefractionMode.ThickSphere);
var hasRefraction = (!material.HasProperty(kPreRefractionPass)
|| material.GetFloat(kPreRefractionPass) <= 0.0)
&& refractionModeValue != Lit.RefractionMode.None;
SetKeyword(material, "_REFRACTION_ON", hasRefraction); // Refraction is not available for pre refraction (color buffer cannot be fetched)
}
}
} // namespace UnityEditor
正在加载...
取消
保存