浏览代码

Compute the height for the triplanar POM

/Branch_Batching2
Evgenii Golubev 8 年前
当前提交
7e5f4994
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 12
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl

12
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl


if (isTriplanar)
{
float3 viewDirTS;
float planeHeight;
int numSteps;
// Perform a POM in each direction and modify appropriate texture coordinate

float2 offsetZY = ParallaxOcclusionMapping(lod, _PPDLodThreshold, numSteps, viewDirTS, maxHeight, ppdParam, height);
float2 offsetZY = ParallaxOcclusionMapping(lod, _PPDLodThreshold, numSteps, viewDirTS, maxHeight, ppdParam, planeHeight);
height = layerTexCoord.triplanarWeights.x * planeHeight;
float2 offsetXZ = ParallaxOcclusionMapping(lod, _PPDLodThreshold, numSteps, viewDirTS, maxHeight, ppdParam, height);
float2 offsetXZ = ParallaxOcclusionMapping(lod, _PPDLodThreshold, numSteps, viewDirTS, maxHeight, ppdParam, planeHeight);
height += layerTexCoord.triplanarWeights.y * planeHeight;
float2 offsetXY = ParallaxOcclusionMapping(lod, _PPDLodThreshold, numSteps, viewDirTS, maxHeight, ppdParam, height);
float2 offsetXY = ParallaxOcclusionMapping(lod, _PPDLodThreshold, numSteps, viewDirTS, maxHeight, ppdParam, planeHeight);
height = 0.0; // TODO
height += layerTexCoord.triplanarWeights.z * planeHeight;
}
else
{

正在加载...
取消
保存