浏览代码

Start integration from the near plane to avoid artifacts

/Yibing-Project-2
Evgenii Golubev 7 年前
当前提交
a4ca9f56
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 7
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/Volumetrics/Resources/VolumetricLighting.compute

7
ScriptableRenderPipeline/HDRenderPipeline/Lighting/Volumetrics/Resources/VolumetricLighting.compute


void FillVolumetricLightingBuffer(LightLoopContext context, uint featureFlags,
PositionInputs posInput, Ray ray)
{
BakeLightingData unused; // Unused, so define once
BakeLightingData unused; // Unused, so define once
float z0 = 0, t0 = 0; // Start at the origin of the ray
float de = rcp(VBUFFER_SLICE_COUNT); // Log-encoded distance between slices
float z0 = _VBufferDepthEncodingParams.x; // Start integration from the near plane
float t0 = ray.ratioLenToZ * z0;
float de = rcp(VBUFFER_SLICE_COUNT); // Log-encoded distance between slices
float3 totalRadiance = 0;
float opticalDepth = 0;

正在加载...
取消
保存