Merge pull request #55418 from Calinou/voxelgi-dynamic-map-use-16-bit-depth
Use 16-bit depth to improve dynamic VoxelGI performance
This commit is contained in:
commit
e432181dc3
1 changed files with 3 additions and 2 deletions
|
@ -2176,8 +2176,9 @@ void RendererSceneGIRD::VoxelGIInstance::update(bool p_update_light_instances, c
|
|||
dmap.texture = RD::get_singleton()->texture_create(dtf, RD::TextureView());
|
||||
|
||||
if (dynamic_maps.size() == 0) {
|
||||
//render depth for first one
|
||||
dtf.format = RD::get_singleton()->texture_is_format_supported_for_usage(RD::DATA_FORMAT_D32_SFLOAT, RD::TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) ? RD::DATA_FORMAT_D32_SFLOAT : RD::DATA_FORMAT_X8_D24_UNORM_PACK32;
|
||||
// Render depth for first one.
|
||||
// Use 16-bit depth when supported to improve performance.
|
||||
dtf.format = RD::get_singleton()->texture_is_format_supported_for_usage(RD::DATA_FORMAT_D16_UNORM, RD::TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) ? RD::DATA_FORMAT_D16_UNORM : RD::DATA_FORMAT_X8_D24_UNORM_PACK32;
|
||||
dtf.usage_bits = RD::TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
|
||||
dmap.fb_depth = RD::get_singleton()->texture_create(dtf, RD::TextureView());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue