浏览代码

HDRP: Fix issue with forward and preprocessor + update changelog

/main
sebastienlagarde 6 年前
当前提交
be149b78
共有 3 个文件被更改,包括 6 次插入11 次删除
  1. 2
      com.unity.render-pipelines.high-definition/CHANGELOG.md
  2. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPreprocessShaders.cs
  3. 7
      com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Lit/LitShaderPreprocessor.cs

2
com.unity.render-pipelines.high-definition/CHANGELOG.md


- Change code in area light with LTC for Lit shader. Magnitude is now take from FGD texture instead of a separate texture
- Improve camera relative rendering: We now apply camera translation on the model matrix, so before the TransformObjectToWorld(). Note: unity_WorldToObject and unity_ObjectToWorld must never be used directly.
- Rename positionWS to positionRWS (Camera relative world position) at a lot of places (mainly in interpolator and FragInputs). In case of custom shader user will be required to update their code.
- Rename positionWS, capturePositionWS, proxyPositionWS, influencePositionWS to positionRWS, capturePositionRWS, proxyPositionRWS, influencePositionRWS (Camera relative world position) in LightDefinition struct.
- Fix issue with forward opaque lit shader variant being removed by the shader preprocessor
## [2.0.4-preview]

8
com.unity.render-pipelines.high-definition/HDRP/Editor/BuildProcessors/HDRPreprocessShaders.cs


int inputShaderVariantCount = inputData.Count;
ShaderCompilerData workaround = inputData[0];
for (int i = 0; i < inputData.Count; ++i)
{
ShaderCompilerData input = inputData[i];

i--;
}
}
// Currently if a certain snippet is completely stripped (for example if you remove a whole pass) other passes might get broken
// To work around that, we make sure that we always have at least one variant.
// TODO: Remove this one it is fixed
if (inputData.Count == 0)
inputData.Add(workaround);
}
}
}

7
com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Lit/LitShaderPreprocessor.cs


return true;
}
if (!hdrpAsset.renderPipelineSettings.supportOnlyForward)
// TODO: add an option to say we are using only the deferred shader variant (for Lit)
//if (0)
if (isForwardPass && !inputData.shaderKeywordSet.IsEnabled(m_DebugDisplay))
return true;
//if (isForwardPass && !inputData.shaderKeywordSet.IsEnabled(m_DebugDisplay))
// return true;
}
}

正在加载...
取消
保存