浏览代码

Fix a couple of issues with density volume texture mask.

/main
Raymond Graham 6 年前
当前提交
a04c87cd
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 2
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumeTextureAtlas.cs
  2. 2
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumeVoxelization.compute
  3. 2
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumetricLighting.cs

2
com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumeTextureAtlas.cs


{
if (textures.Contains(volumeTexture))
{
textures.Add(volumeTexture);
textures.Remove(volumeTexture);
needTextureUpdate = true;
}

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


// Express the voxel center in the local coordinate system of the box.
float3 voxelCenterBS = mul(voxelCenterWS - obb.center, transpose(obbFrame));
float3 voxelCenterUV = (voxelCenterBS / obbExtents) * 0.5 + 0.5;
float3 voxelCenterUV = (voxelCenterBS / obbExtents);
#if SOFT_VOXELIZATION
// We need to determine which is the face closest to 'voxelCenterBS'.

2
com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumetricLighting.cs


if (volumeAtlas != null)
{
volumeAtlasDimensions.x = volumeAtlas.width / volumeAtlas.depth; // 1 / number of textures
volumeAtlasDimensions.x = (float)volumeAtlas.width / volumeAtlas.depth; // 1 / number of textures
volumeAtlasDimensions.y = 1.0f / volumeAtlas.width;
volumeAtlasDimensions.z = volumeAtlas.width;
}

正在加载...
取消
保存