浏览代码

Merge pull request #1461 from Unity-Technologies/sg/fix-screen-position

Fix ScreenPosition transformation
/main
GitHub 7 年前
当前提交
f0f49516
共有 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)
{

正在加载...
取消
保存