浏览代码

HDRP Minor update (ident and test)

/main
sebastienlagarde 6 年前
当前提交
b0c2e2b3
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl
  2. 10
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/LitDataDisplacement.hlsl

2
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl


else
#endif
{
if ((lightData.envIndex & 1) == ENVCACHETYPE_CUBEMAP)
if (!IsEnvIndexTexture2D(lightData.envIndex)) // ENVCACHETYPE_CUBEMAP
{
R = GetSpecularDominantDir(bsdfData.normalWS, R, preLightData.iblPerceptualRoughness, ClampNdotV(preLightData.NdotV));
// When we are rough, we tend to see outward shifting of the reflection when at the boundary of the projection volume

10
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/LitDataDisplacement.hlsl


{
float3 objectScale = float3(1.0, 1.0, 1.0);
// TODO: This should be an uniform for the object, this code should be remove once we have it. - Workaround for now
// To handle object scaling with pixel displacement we need to multiply the view vector by the inverse scale.
// To Handle object scaling with vertex/tessellation displacement we must multiply displacement by object scale
// Currently we extract either the scale (ObjectToWorld) or the inverse scale (worldToObject) directly by taking the transform matrix
float4x4 worldTransform;
// TODO: This should be an uniform for the object, this code should be remove once we have it. - Workaround for now
// To handle object scaling with pixel displacement we need to multiply the view vector by the inverse scale.
// To Handle object scaling with vertex/tessellation displacement we must multiply displacement by object scale
// Currently we extract either the scale (ObjectToWorld) or the inverse scale (worldToObject) directly by taking the transform matrix
float4x4 worldTransform;
if (vertexDisplacement)
{
worldTransform = GetObjectToWorldMatrix();

正在加载...
取消
保存