1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Sanitize INF/NaN when copying last frame texture for SSIL/SSR.

This commit is contained in:
Skyth
2025-11-13 16:38:54 +03:00
parent e6aa06d3de
commit d27e4dab16
4 changed files with 14 additions and 3 deletions

View File

@@ -131,6 +131,7 @@ private:
COPY_FLAG_FORCE_LUMINANCE = (1 << 6),
COPY_FLAG_ALL_SOURCE = (1 << 7),
COPY_FLAG_ALPHA_TO_ONE = (1 << 8),
COPY_FLAG_SANITIZE_INF_NAN = (1 << 9),
};
struct CopyPushConstant {
@@ -323,7 +324,7 @@ public:
bool get_prefer_raster_effects() { return prefer_raster_effects; }
void copy_to_rect(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y = false, bool p_force_luminance = false, bool p_all_source = false, bool p_8_bit_dst = false, bool p_alpha_to_one = false);
void copy_to_rect(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y = false, bool p_force_luminance = false, bool p_all_source = false, bool p_8_bit_dst = false, bool p_alpha_to_one = false, bool p_sanitize_inf_nan = false);
void copy_cubemap_to_panorama(RID p_source_cube, RID p_dest_panorama, const Size2i &p_panorama_size, float p_lod, bool p_is_array);
void copy_depth_to_rect(RID p_source_rd_texture, RID p_dest_framebuffer, const Rect2i &p_rect, bool p_flip_y = false);
void copy_depth_to_rect_and_linearize(RID p_source_rd_texture, RID p_dest_texture, const Rect2i &p_rect, bool p_flip_y, float p_z_near, float p_z_far);