Merge pull request #63003 from Geometror/msaa-2d
This commit is contained in:
@@ -159,6 +159,7 @@ public:
|
||||
virtual void render_target_set_direct_to_screen(RID p_render_target, bool p_direct_to_screen) override {}
|
||||
virtual bool render_target_was_used(RID p_render_target) override { return false; }
|
||||
virtual void render_target_set_as_unused(RID p_render_target) override {}
|
||||
virtual void render_target_set_msaa(RID p_render_target, RS::ViewportMSAA p_msaa) override {}
|
||||
|
||||
virtual void render_target_request_clear(RID p_render_target, const Color &p_clear_color) override {}
|
||||
virtual bool render_target_is_clear_requested(RID p_render_target) override { return false; }
|
||||
|
||||
@@ -2484,7 +2484,7 @@ void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p
|
||||
rb->height = p_height;
|
||||
rb->fsr_sharpness = p_fsr_sharpness;
|
||||
rb->render_target = p_render_target;
|
||||
rb->msaa = p_msaa;
|
||||
rb->msaa_3d = p_msaa;
|
||||
rb->screen_space_aa = p_screen_space_aa;
|
||||
rb->use_taa = p_use_taa;
|
||||
rb->use_debanding = p_use_debanding;
|
||||
@@ -2509,7 +2509,7 @@ void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p
|
||||
tf.height = rb->internal_height; // If set to rb->width, msaa won't crash
|
||||
tf.array_layers = rb->view_count; // create a layer for every view
|
||||
tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | (_render_buffers_can_be_storage() ? RD::TEXTURE_USAGE_STORAGE_BIT : 0) | RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT;
|
||||
if (rb->msaa != RS::VIEWPORT_MSAA_DISABLED) {
|
||||
if (rb->msaa_3d != RS::VIEWPORT_MSAA_DISABLED) {
|
||||
tf.usage_bits |= RD::TEXTURE_USAGE_CAN_COPY_TO_BIT;
|
||||
}
|
||||
tf.usage_bits |= RD::TEXTURE_USAGE_INPUT_ATTACHMENT_BIT; // only needed when using subpasses in the mobile renderer
|
||||
@@ -2532,7 +2532,7 @@ void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p
|
||||
if (rb->view_count > 1) {
|
||||
tf.texture_type = RD::TEXTURE_TYPE_2D_ARRAY;
|
||||
}
|
||||
if (rb->msaa == RS::VIEWPORT_MSAA_DISABLED) {
|
||||
if (rb->msaa_3d == RS::VIEWPORT_MSAA_DISABLED) {
|
||||
tf.format = RD::get_singleton()->texture_is_format_supported_for_usage(RD::DATA_FORMAT_D24_UNORM_S8_UINT, (RD::TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT)) ? RD::DATA_FORMAT_D24_UNORM_S8_UINT : RD::DATA_FORMAT_D32_SFLOAT_S8_UINT;
|
||||
} else {
|
||||
tf.format = RD::DATA_FORMAT_R32_SFLOAT;
|
||||
@@ -2543,7 +2543,7 @@ void RendererSceneRenderRD::render_buffers_configure(RID p_render_buffers, RID p
|
||||
tf.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT;
|
||||
tf.array_layers = rb->view_count; // create a layer for every view
|
||||
|
||||
if (rb->msaa != RS::VIEWPORT_MSAA_DISABLED) {
|
||||
if (rb->msaa_3d != RS::VIEWPORT_MSAA_DISABLED) {
|
||||
tf.usage_bits |= RD::TEXTURE_USAGE_CAN_COPY_TO_BIT | RD::TEXTURE_USAGE_STORAGE_BIT;
|
||||
} else {
|
||||
tf.usage_bits |= RD::TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
|
||||
|
||||
@@ -456,7 +456,7 @@ private:
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
float fsr_sharpness = 0.2f;
|
||||
RS::ViewportMSAA msaa = RS::VIEWPORT_MSAA_DISABLED;
|
||||
RS::ViewportMSAA msaa_3d = RS::VIEWPORT_MSAA_DISABLED;
|
||||
RS::ViewportScreenSpaceAA screen_space_aa = RS::VIEWPORT_SCREEN_SPACE_AA_DISABLED;
|
||||
bool use_taa = false;
|
||||
bool use_debanding = false;
|
||||
@@ -1167,23 +1167,51 @@ public:
|
||||
virtual void decals_set_filter(RS::DecalFilter p_filter) override;
|
||||
virtual void light_projectors_set_filter(RS::LightProjectorFilter p_filter) override;
|
||||
|
||||
_FORCE_INLINE_ RS::ShadowQuality shadows_quality_get() const { return shadows_quality; }
|
||||
_FORCE_INLINE_ RS::ShadowQuality directional_shadow_quality_get() const { return directional_shadow_quality; }
|
||||
_FORCE_INLINE_ float shadows_quality_radius_get() const { return shadows_quality_radius; }
|
||||
_FORCE_INLINE_ float directional_shadow_quality_radius_get() const { return directional_shadow_quality_radius; }
|
||||
_FORCE_INLINE_ RS::ShadowQuality shadows_quality_get() const {
|
||||
return shadows_quality;
|
||||
}
|
||||
_FORCE_INLINE_ RS::ShadowQuality directional_shadow_quality_get() const {
|
||||
return directional_shadow_quality;
|
||||
}
|
||||
_FORCE_INLINE_ float shadows_quality_radius_get() const {
|
||||
return shadows_quality_radius;
|
||||
}
|
||||
_FORCE_INLINE_ float directional_shadow_quality_radius_get() const {
|
||||
return directional_shadow_quality_radius;
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ float *directional_penumbra_shadow_kernel_get() { return directional_penumbra_shadow_kernel; }
|
||||
_FORCE_INLINE_ float *directional_soft_shadow_kernel_get() { return directional_soft_shadow_kernel; }
|
||||
_FORCE_INLINE_ float *penumbra_shadow_kernel_get() { return penumbra_shadow_kernel; }
|
||||
_FORCE_INLINE_ float *soft_shadow_kernel_get() { return soft_shadow_kernel; }
|
||||
_FORCE_INLINE_ float *directional_penumbra_shadow_kernel_get() {
|
||||
return directional_penumbra_shadow_kernel;
|
||||
}
|
||||
_FORCE_INLINE_ float *directional_soft_shadow_kernel_get() {
|
||||
return directional_soft_shadow_kernel;
|
||||
}
|
||||
_FORCE_INLINE_ float *penumbra_shadow_kernel_get() {
|
||||
return penumbra_shadow_kernel;
|
||||
}
|
||||
_FORCE_INLINE_ float *soft_shadow_kernel_get() {
|
||||
return soft_shadow_kernel;
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ int directional_penumbra_shadow_samples_get() const { return directional_penumbra_shadow_samples; }
|
||||
_FORCE_INLINE_ int directional_soft_shadow_samples_get() const { return directional_soft_shadow_samples; }
|
||||
_FORCE_INLINE_ int penumbra_shadow_samples_get() const { return penumbra_shadow_samples; }
|
||||
_FORCE_INLINE_ int soft_shadow_samples_get() const { return soft_shadow_samples; }
|
||||
_FORCE_INLINE_ int directional_penumbra_shadow_samples_get() const {
|
||||
return directional_penumbra_shadow_samples;
|
||||
}
|
||||
_FORCE_INLINE_ int directional_soft_shadow_samples_get() const {
|
||||
return directional_soft_shadow_samples;
|
||||
}
|
||||
_FORCE_INLINE_ int penumbra_shadow_samples_get() const {
|
||||
return penumbra_shadow_samples;
|
||||
}
|
||||
_FORCE_INLINE_ int soft_shadow_samples_get() const {
|
||||
return soft_shadow_samples;
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ RS::LightProjectorFilter light_projectors_get_filter() const { return light_projectors_filter; }
|
||||
_FORCE_INLINE_ RS::DecalFilter decals_get_filter() const { return decals_filter; }
|
||||
_FORCE_INLINE_ RS::LightProjectorFilter light_projectors_get_filter() const {
|
||||
return light_projectors_filter;
|
||||
}
|
||||
_FORCE_INLINE_ RS::DecalFilter decals_get_filter() const {
|
||||
return decals_filter;
|
||||
}
|
||||
|
||||
int get_roughness_layers() const;
|
||||
bool is_using_radiance_cubemap_array() const;
|
||||
|
||||
@@ -2121,6 +2121,10 @@ void TextureStorage::_clear_render_target(RenderTarget *rt) {
|
||||
RD::get_singleton()->free(rt->color);
|
||||
}
|
||||
|
||||
if (rt->color_multisample.is_valid()) {
|
||||
RD::get_singleton()->free(rt->color_multisample);
|
||||
}
|
||||
|
||||
if (rt->backbuffer.is_valid()) {
|
||||
RD::get_singleton()->free(rt->backbuffer);
|
||||
rt->backbuffer = RID();
|
||||
@@ -2132,6 +2136,7 @@ void TextureStorage::_clear_render_target(RenderTarget *rt) {
|
||||
|
||||
rt->framebuffer = RID();
|
||||
rt->color = RID();
|
||||
rt->color_multisample = RID();
|
||||
}
|
||||
|
||||
void TextureStorage::_update_render_target(RenderTarget *rt) {
|
||||
@@ -2153,30 +2158,50 @@ void TextureStorage::_update_render_target(RenderTarget *rt) {
|
||||
rt->color_format_srgb = RD::DATA_FORMAT_R8G8B8A8_SRGB;
|
||||
rt->image_format = rt->is_transparent ? Image::FORMAT_RGBA8 : Image::FORMAT_RGB8;
|
||||
|
||||
RD::TextureFormat rd_format;
|
||||
RD::TextureFormat rd_color_attachment_format;
|
||||
RD::TextureView rd_view;
|
||||
{ //attempt register
|
||||
rd_format.format = rt->color_format;
|
||||
rd_format.width = rt->size.width;
|
||||
rd_format.height = rt->size.height;
|
||||
rd_format.depth = 1;
|
||||
rd_format.array_layers = rt->view_count; // for stereo we create two (or more) layers, need to see if we can make fallback work like this too if we don't have multiview
|
||||
rd_format.mipmaps = 1;
|
||||
if (rd_format.array_layers > 1) { // why are we not using rt->texture_type ??
|
||||
rd_format.texture_type = RD::TEXTURE_TYPE_2D_ARRAY;
|
||||
rd_color_attachment_format.format = rt->color_format;
|
||||
rd_color_attachment_format.width = rt->size.width;
|
||||
rd_color_attachment_format.height = rt->size.height;
|
||||
rd_color_attachment_format.depth = 1;
|
||||
rd_color_attachment_format.array_layers = rt->view_count; // for stereo we create two (or more) layers, need to see if we can make fallback work like this too if we don't have multiview
|
||||
rd_color_attachment_format.mipmaps = 1;
|
||||
if (rd_color_attachment_format.array_layers > 1) { // why are we not using rt->texture_type ??
|
||||
rd_color_attachment_format.texture_type = RD::TEXTURE_TYPE_2D_ARRAY;
|
||||
} else {
|
||||
rd_format.texture_type = RD::TEXTURE_TYPE_2D;
|
||||
rd_color_attachment_format.texture_type = RD::TEXTURE_TYPE_2D;
|
||||
}
|
||||
rd_color_attachment_format.samples = RD::TEXTURE_SAMPLES_1;
|
||||
rd_color_attachment_format.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_CAN_COPY_FROM_BIT;
|
||||
rd_color_attachment_format.shareable_formats.push_back(rt->color_format);
|
||||
rd_color_attachment_format.shareable_formats.push_back(rt->color_format_srgb);
|
||||
if (rt->msaa != RS::VIEWPORT_MSAA_DISABLED) {
|
||||
rd_color_attachment_format.is_resolve_buffer = true;
|
||||
}
|
||||
rd_format.samples = RD::TEXTURE_SAMPLES_1;
|
||||
rd_format.usage_bits = RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_CAN_COPY_FROM_BIT;
|
||||
rd_format.shareable_formats.push_back(rt->color_format);
|
||||
rd_format.shareable_formats.push_back(rt->color_format_srgb);
|
||||
}
|
||||
|
||||
rt->color = RD::get_singleton()->texture_create(rd_format, rd_view);
|
||||
rt->color = RD::get_singleton()->texture_create(rd_color_attachment_format, rd_view);
|
||||
ERR_FAIL_COND(rt->color.is_null());
|
||||
|
||||
Vector<RID> fb_textures;
|
||||
|
||||
if (rt->msaa != RS::VIEWPORT_MSAA_DISABLED) {
|
||||
// Use the texture format of the color attachment for the multisample color attachment.
|
||||
RD::TextureFormat rd_color_multisample_format = rd_color_attachment_format;
|
||||
const RD::TextureSamples texture_samples[RS::VIEWPORT_MSAA_MAX] = {
|
||||
RD::TEXTURE_SAMPLES_1,
|
||||
RD::TEXTURE_SAMPLES_2,
|
||||
RD::TEXTURE_SAMPLES_4,
|
||||
RD::TEXTURE_SAMPLES_8,
|
||||
};
|
||||
rd_color_multisample_format.samples = texture_samples[rt->msaa];
|
||||
RD::TextureView rd_view_multisample;
|
||||
rd_color_multisample_format.is_resolve_buffer = false;
|
||||
rt->color_multisample = RD::get_singleton()->texture_create(rd_color_multisample_format, rd_view_multisample);
|
||||
fb_textures.push_back(rt->color_multisample);
|
||||
ERR_FAIL_COND(rt->color_multisample.is_null());
|
||||
}
|
||||
fb_textures.push_back(rt->color);
|
||||
rt->framebuffer = RD::get_singleton()->framebuffer_create(fb_textures, RenderingDevice::INVALID_ID, rt->view_count);
|
||||
if (rt->framebuffer.is_null()) {
|
||||
@@ -2335,6 +2360,17 @@ void TextureStorage::render_target_set_as_unused(RID p_render_target) {
|
||||
rt->was_used = false;
|
||||
}
|
||||
|
||||
void TextureStorage::render_target_set_msaa(RID p_render_target, RS::ViewportMSAA p_msaa) {
|
||||
RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
|
||||
ERR_FAIL_COND(!rt);
|
||||
if (p_msaa == rt->msaa) {
|
||||
return;
|
||||
}
|
||||
|
||||
rt->msaa = p_msaa;
|
||||
_update_render_target(rt);
|
||||
}
|
||||
|
||||
Size2 TextureStorage::render_target_get_size(RID p_render_target) {
|
||||
RenderTarget *rt = render_target_owner.get_or_null(p_render_target);
|
||||
ERR_FAIL_COND_V(!rt, Size2());
|
||||
|
||||
@@ -254,6 +254,9 @@ private:
|
||||
uint32_t view_count;
|
||||
RID framebuffer;
|
||||
RID color;
|
||||
RID color_multisample; // Needed when MSAA is enabled.
|
||||
|
||||
RS::ViewportMSAA msaa = RS::VIEWPORT_MSAA_DISABLED;
|
||||
|
||||
//used for retrieving from CPU
|
||||
RD::DataFormat color_format = RD::DATA_FORMAT_R4G4_UNORM_PACK8;
|
||||
@@ -556,6 +559,7 @@ public:
|
||||
virtual void render_target_set_direct_to_screen(RID p_render_target, bool p_direct_to_screen) override;
|
||||
virtual bool render_target_was_used(RID p_render_target) override;
|
||||
virtual void render_target_set_as_unused(RID p_render_target) override;
|
||||
virtual void render_target_set_msaa(RID p_render_target, RS::ViewportMSAA p_msaa) override;
|
||||
|
||||
void render_target_copy_to_back_buffer(RID p_render_target, const Rect2i &p_region, bool p_gen_mipmaps);
|
||||
void render_target_clear_back_buffer(RID p_render_target, const Rect2i &p_region, const Color &p_color);
|
||||
|
||||
@@ -177,7 +177,7 @@ void RendererViewport::_configure_3d_render_buffers(Viewport *p_viewport) {
|
||||
// to compensate for the loss of sharpness.
|
||||
const float texture_mipmap_bias = log2f(MIN(scaling_3d_scale, 1.0)) + p_viewport->texture_mipmap_bias;
|
||||
|
||||
RSG::scene->render_buffers_configure(p_viewport->render_buffers, p_viewport->render_target, render_width, render_height, width, height, p_viewport->fsr_sharpness, texture_mipmap_bias, p_viewport->msaa, p_viewport->screen_space_aa, p_viewport->use_taa, p_viewport->use_debanding, p_viewport->get_view_count());
|
||||
RSG::scene->render_buffers_configure(p_viewport->render_buffers, p_viewport->render_target, render_width, render_height, width, height, p_viewport->fsr_sharpness, texture_mipmap_bias, p_viewport->msaa_3d, p_viewport->screen_space_aa, p_viewport->use_taa, p_viewport->use_debanding, p_viewport->get_view_count());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1076,14 +1076,25 @@ void RendererViewport::viewport_set_positional_shadow_atlas_quadrant_subdivision
|
||||
RSG::scene->shadow_atlas_set_quadrant_subdivision(viewport->shadow_atlas, p_quadrant, p_subdiv);
|
||||
}
|
||||
|
||||
void RendererViewport::viewport_set_msaa(RID p_viewport, RS::ViewportMSAA p_msaa) {
|
||||
void RendererViewport::viewport_set_msaa_2d(RID p_viewport, RS::ViewportMSAA p_msaa) {
|
||||
Viewport *viewport = viewport_owner.get_or_null(p_viewport);
|
||||
ERR_FAIL_COND(!viewport);
|
||||
|
||||
if (viewport->msaa == p_msaa) {
|
||||
if (viewport->msaa_2d == p_msaa) {
|
||||
return;
|
||||
}
|
||||
viewport->msaa = p_msaa;
|
||||
viewport->msaa_2d = p_msaa;
|
||||
RSG::texture_storage->render_target_set_msaa(viewport->render_target, p_msaa);
|
||||
}
|
||||
|
||||
void RendererViewport::viewport_set_msaa_3d(RID p_viewport, RS::ViewportMSAA p_msaa) {
|
||||
Viewport *viewport = viewport_owner.get_or_null(p_viewport);
|
||||
ERR_FAIL_COND(!viewport);
|
||||
|
||||
if (viewport->msaa_3d == p_msaa) {
|
||||
return;
|
||||
}
|
||||
viewport->msaa_3d = p_msaa;
|
||||
_configure_3d_render_buffers(viewport);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,8 @@ public:
|
||||
RID render_target_texture;
|
||||
RID render_buffers;
|
||||
|
||||
RS::ViewportMSAA msaa = RenderingServer::VIEWPORT_MSAA_DISABLED;
|
||||
RS::ViewportMSAA msaa_2d = RenderingServer::VIEWPORT_MSAA_DISABLED;
|
||||
RS::ViewportMSAA msaa_3d = RenderingServer::VIEWPORT_MSAA_DISABLED;
|
||||
RS::ViewportScreenSpaceAA screen_space_aa = RenderingServer::VIEWPORT_SCREEN_SPACE_AA_DISABLED;
|
||||
bool use_taa = false;
|
||||
bool use_debanding = false;
|
||||
@@ -157,7 +158,6 @@ public:
|
||||
measure_render_time = false;
|
||||
|
||||
debug_draw = RS::VIEWPORT_DEBUG_DRAW_DISABLED;
|
||||
msaa = RS::VIEWPORT_MSAA_DISABLED;
|
||||
screen_space_aa = RS::VIEWPORT_SCREEN_SPACE_AA_DISABLED;
|
||||
use_debanding = false;
|
||||
use_occlusion_culling = false;
|
||||
@@ -250,7 +250,8 @@ public:
|
||||
void viewport_set_positional_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits = true);
|
||||
void viewport_set_positional_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv);
|
||||
|
||||
void viewport_set_msaa(RID p_viewport, RS::ViewportMSAA p_msaa);
|
||||
void viewport_set_msaa_2d(RID p_viewport, RS::ViewportMSAA p_msaa);
|
||||
void viewport_set_msaa_3d(RID p_viewport, RS::ViewportMSAA p_msaa);
|
||||
void viewport_set_screen_space_aa(RID p_viewport, RS::ViewportScreenSpaceAA p_mode);
|
||||
void viewport_set_use_taa(RID p_viewport, bool p_use_taa);
|
||||
void viewport_set_use_debanding(RID p_viewport, bool p_use_debanding);
|
||||
|
||||
@@ -462,6 +462,7 @@ public:
|
||||
TextureSamples samples;
|
||||
uint32_t usage_bits;
|
||||
Vector<DataFormat> shareable_formats;
|
||||
bool is_resolve_buffer = false;
|
||||
|
||||
TextureFormat() {
|
||||
format = DATA_FORMAT_R8_UNORM;
|
||||
|
||||
@@ -619,7 +619,8 @@ public:
|
||||
FUNC3(viewport_set_positional_shadow_atlas_size, RID, int, bool)
|
||||
FUNC3(viewport_set_sdf_oversize_and_scale, RID, ViewportSDFOversize, ViewportSDFScale)
|
||||
FUNC3(viewport_set_positional_shadow_atlas_quadrant_subdivision, RID, int, int)
|
||||
FUNC2(viewport_set_msaa, RID, ViewportMSAA)
|
||||
FUNC2(viewport_set_msaa_2d, RID, ViewportMSAA)
|
||||
FUNC2(viewport_set_msaa_3d, RID, ViewportMSAA)
|
||||
FUNC2(viewport_set_screen_space_aa, RID, ViewportScreenSpaceAA)
|
||||
FUNC2(viewport_set_use_taa, RID, bool)
|
||||
FUNC2(viewport_set_use_debanding, RID, bool)
|
||||
|
||||
@@ -133,6 +133,7 @@ public:
|
||||
virtual void render_target_set_direct_to_screen(RID p_render_target, bool p_direct_to_screen) = 0;
|
||||
virtual bool render_target_was_used(RID p_render_target) = 0;
|
||||
virtual void render_target_set_as_unused(RID p_render_target) = 0;
|
||||
virtual void render_target_set_msaa(RID p_render_target, RS::ViewportMSAA p_msaa) = 0;
|
||||
|
||||
virtual void render_target_request_clear(RID p_render_target, const Color &p_clear_color) = 0;
|
||||
virtual bool render_target_is_clear_requested(RID p_render_target) = 0;
|
||||
|
||||
@@ -2204,7 +2204,8 @@ void RenderingServer::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_positional_shadow_atlas_size", "viewport", "size", "use_16_bits"), &RenderingServer::viewport_set_positional_shadow_atlas_size, DEFVAL(false));
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_positional_shadow_atlas_quadrant_subdivision", "viewport", "quadrant", "subdivision"), &RenderingServer::viewport_set_positional_shadow_atlas_quadrant_subdivision);
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_msaa", "viewport", "msaa"), &RenderingServer::viewport_set_msaa);
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_msaa_3d", "viewport", "msaa"), &RenderingServer::viewport_set_msaa_3d);
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_msaa_2d", "viewport", "msaa"), &RenderingServer::viewport_set_msaa_2d);
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_screen_space_aa", "viewport", "mode"), &RenderingServer::viewport_set_screen_space_aa);
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_use_taa", "viewport", "enable"), &RenderingServer::viewport_set_use_taa);
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_use_debanding", "viewport", "enable"), &RenderingServer::viewport_set_use_debanding);
|
||||
|
||||
@@ -874,7 +874,8 @@ public:
|
||||
VIEWPORT_MSAA_MAX,
|
||||
};
|
||||
|
||||
virtual void viewport_set_msaa(RID p_viewport, ViewportMSAA p_msaa) = 0;
|
||||
virtual void viewport_set_msaa_3d(RID p_viewport, ViewportMSAA p_msaa) = 0;
|
||||
virtual void viewport_set_msaa_2d(RID p_viewport, ViewportMSAA p_msaa) = 0;
|
||||
|
||||
enum ViewportScreenSpaceAA {
|
||||
VIEWPORT_SCREEN_SPACE_AA_DISABLED,
|
||||
|
||||
Reference in New Issue
Block a user