1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Use negative mipmap LOD bias for sub-native bilinear 3D scale

This provides a benefit similar to FSR 1.0 (greater texture sharpness
at the cost of some graininess at sub-native resolution scales), but
without the added performance cost of FSR 1.0.
This commit is contained in:
Hugo Locurcio
2022-08-10 17:16:02 +02:00
parent cf95056c91
commit b06890c2b7
4 changed files with 8 additions and 5 deletions

View File

@@ -2459,8 +2459,7 @@ void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p
p_internal_width = p_width;
}
const float texture_mipmap_bias = -log2f(p_width / p_internal_width) + p_texture_mipmap_bias;
material_storage->sampler_rd_configure_custom(texture_mipmap_bias);
material_storage->sampler_rd_configure_custom(p_texture_mipmap_bias);
update_uniform_sets();
RenderBuffers *rb = render_buffers_owner.get_or_null(p_render_buffers);