You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Merge pull request #114180 from BastiaanOlij/fix_pcvr_msaa2d
Skip MSAA2D when OpenXR is used
This commit is contained in:
@@ -3493,12 +3493,16 @@ void TextureStorage::update_decal_buffer(const PagedArray<RID> &p_decals, const
|
|||||||
/* RENDER TARGET API */
|
/* RENDER TARGET API */
|
||||||
|
|
||||||
RID TextureStorage::RenderTarget::get_framebuffer() {
|
RID TextureStorage::RenderTarget::get_framebuffer() {
|
||||||
// Note that if we're using an overridden color buffer, we're likely cycling through a texture chain.
|
// We can't resolve into our overridden buffer as it won't be marked as a resolve buffer.
|
||||||
// this is where our framebuffer cache comes in clutch..
|
// This is only applicable when OpenXR is used and 2D rendering is skipped.
|
||||||
|
|
||||||
if (msaa != RS::VIEWPORT_MSAA_DISABLED) {
|
if (msaa != RS::VIEWPORT_MSAA_DISABLED && overridden.color.is_null()) {
|
||||||
return FramebufferCacheRD::get_singleton()->get_cache_multiview(view_count, color_multisample, overridden.color.is_valid() ? overridden.color : color);
|
// Render into our MSAA buffer and resolve into our color buffer.
|
||||||
|
return FramebufferCacheRD::get_singleton()->get_cache_multiview(view_count, color_multisample, color);
|
||||||
} else {
|
} else {
|
||||||
|
// Note that if we're using an overridden color buffer, we're likely cycling through a texture chain.
|
||||||
|
// this is where our framebuffer cache comes in clutch..
|
||||||
|
|
||||||
return FramebufferCacheRD::get_singleton()->get_cache_multiview(view_count, overridden.color.is_valid() ? overridden.color : color);
|
return FramebufferCacheRD::get_singleton()->get_cache_multiview(view_count, overridden.color.is_valid() ? overridden.color : color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user