浏览代码

Define correct behavior for tessellatoin and planar mapping displacement

/stochastic_alpha_test
sebastienlagarde 7 年前
当前提交
6174ec1c
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 3
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl
  2. 3
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitTessellation.hlsl

3
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl


// TODO: precompute these scaling factors!
float tilingScale = rcp(0.5 * abs(_BaseColorMap_ST.x) + 0.5 * abs(_BaseColorMap_ST.y));
height *= tilingScale;
#if _MAPPING_PLANAR
height *= rcp(_TexWorldScale);
#endif
#endif
return height;
}

3
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitTessellation.hlsl


float3 displ = height * normalWS;
// Applying scaling of the object if requested
// Note: In case of planar mapping there is no object scale as we do world space planar mapping (not object space planar mapping)
#ifndef _MAPPING_PLANAR
#endif
return displ;
}

正在加载...
取消
保存