浏览代码

Fix ScreenPosition transformation

/main
Matt Dean 7 年前
当前提交
887571b9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs

2
com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs


if (combinedRequirements.requiresScreenPosition)
{
var screenPosition = "ComputeScreenPos(mul(GetWorldToHClipMatrix(), mul(GetObjectToWorldMatrix(), v.vertex.xyz)), _ProjectionParams.x)";
var screenPosition = "ComputeScreenPos(mul(GetWorldToHClipMatrix(), mul(GetObjectToWorldMatrix(), v.vertex)), _ProjectionParams.x)";
vertexShader.AppendLine("float4 {0} = {1};", ShaderGeneratorNames.ScreenPosition, screenPosition);
if (graphModelRequirements.requiresScreenPosition)
{

正在加载...
取消
保存