浏览代码

Use the correct sampler for density volumes

/main
Evgenii Golubev 6 年前
当前提交
d55f8b9e
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 3
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumeVoxelization.compute
  2. 1
      com.unity.render-pipelines.high-definition/HDRP/ShaderVariables.hlsl

3
com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumeVoxelization.compute


float halfTexelSize = 0.5f * rcp(mipSize);
voxelCenterUVW.z = clamp(voxelCenterUVW.z, offset + halfTexelSize, offset + rcpNumTextures - halfTexelSize);
return SAMPLE_TEXTURE3D_LOD(_VolumeMaskAtlas, s_trilinear_clamp_sampler, voxelCenterUVW, lod).a;
// Reminder: still no filtering across the the wrap in Z.
return SAMPLE_TEXTURE3D_LOD(_VolumeMaskAtlas, s_trilinear_repeat_sampler, voxelCenterUVW, lod).a;
}

1
com.unity.render-pipelines.high-definition/HDRP/ShaderVariables.hlsl


SAMPLER(s_linear_clamp_sampler);
SAMPLER(s_linear_repeat_sampler);
SAMPLER(s_trilinear_clamp_sampler);
SAMPLER(s_trilinear_repeat_sampler);
// ----------------------------------------------------------------------------

正在加载...
取消
保存