EEVEE-Next: More conservative shadow LOD selection
Ensure shadow-maps at non-zero LODs cover <1 screen texel. This still doesn't solve projective aliasing, though.
This commit is contained in:
@@ -132,7 +132,7 @@ void shadow_tag_usage_tilemap_punctual(
|
||||
lP = shadow_punctual_local_position_to_face_local(face_id, lP);
|
||||
ShadowCoordinates coord = shadow_punctual_coordinates(light, lP, face_id);
|
||||
|
||||
int lod = int(ceil(-log2(footprint_ratio) + tilemaps_buf[coord.tilemap_index].lod_bias));
|
||||
int lod = int(floor(-log2(footprint_ratio) + tilemaps_buf[coord.tilemap_index].lod_bias));
|
||||
lod += lod_bias;
|
||||
lod = clamp(lod, 0, SHADOW_TILEMAP_LOD);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user