Add increased by 1 mip sdf texture resolution for GlobalSDF building
This commit is contained in:
@@ -660,8 +660,9 @@ bool GlobalSignDistanceFieldPass::Render(RenderContext& renderContext, GPUContex
|
|||||||
|
|
||||||
// Pick the SDF mip for the cascade
|
// Pick the SDF mip for the cascade
|
||||||
int32 mipLevelIndex = 1;
|
int32 mipLevelIndex = 1;
|
||||||
float worldUnitsPerVoxel = object.SDF->WorldUnitsPerVoxel * object.LocalToWorld.Scale.MaxValue() * 2;
|
float worldUnitsPerVoxel = object.SDF->WorldUnitsPerVoxel * object.LocalToWorld.Scale.MaxValue() * 4;
|
||||||
while (_voxelSize > worldUnitsPerVoxel && mipLevelIndex < object.SDF->Texture->MipLevels())
|
const int32 mipLevels = object.SDF->Texture->MipLevels();
|
||||||
|
while (_voxelSize > worldUnitsPerVoxel && mipLevelIndex < mipLevels)
|
||||||
{
|
{
|
||||||
mipLevelIndex++;
|
mipLevelIndex++;
|
||||||
worldUnitsPerVoxel *= 2.0f;
|
worldUnitsPerVoxel *= 2.0f;
|
||||||
|
|||||||
Reference in New Issue
Block a user