feat: updated godot version
This commit is contained in:
parent
0c508b0831
commit
42b028dbb5
4694 changed files with 236470 additions and 401376 deletions
|
|
@ -30,8 +30,6 @@
|
|||
|
||||
#include "compositor.h"
|
||||
|
||||
#include "core/object/callable_mp.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "servers/rendering/rendering_server.h"
|
||||
|
||||
/* Compositor Effect */
|
||||
|
|
@ -76,18 +74,14 @@ void CompositorEffect::_bind_methods() {
|
|||
}
|
||||
|
||||
void CompositorEffect::_validate_property(PropertyInfo &p_property) const {
|
||||
if (p_property.name == "access_resolved_color") {
|
||||
if (effect_callback_type == EFFECT_CALLBACK_TYPE_POST_TRANSPARENT) {
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
} else if (p_property.name == "access_resolved_depth") {
|
||||
if (effect_callback_type == EFFECT_CALLBACK_TYPE_POST_TRANSPARENT) {
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
} else if (p_property.name == "needs_separate_specular") {
|
||||
if (effect_callback_type != EFFECT_CALLBACK_TYPE_POST_SKY) {
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
if (p_property.name == "access_resolved_color" && effect_callback_type == EFFECT_CALLBACK_TYPE_POST_TRANSPARENT) {
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
if (p_property.name == "access_resolved_depth" && effect_callback_type == EFFECT_CALLBACK_TYPE_POST_TRANSPARENT) {
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
if (p_property.name == "needs_separate_specular" && effect_callback_type != EFFECT_CALLBACK_TYPE_POST_SKY) {
|
||||
p_property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +109,7 @@ void CompositorEffect::set_effect_callback_type(EffectCallbackType p_callback_ty
|
|||
if (rid.is_valid()) {
|
||||
RenderingServer *rs = RenderingServer::get_singleton();
|
||||
ERR_FAIL_NULL(rs);
|
||||
rs->compositor_effect_set_callback(rid, RSE::CompositorEffectCallbackType(effect_callback_type), callable_mp(this, &CompositorEffect::_call_render_callback));
|
||||
rs->compositor_effect_set_callback(rid, RenderingServer::CompositorEffectCallbackType(effect_callback_type), callable_mp(this, &CompositorEffect::_call_render_callback));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -128,7 +122,7 @@ void CompositorEffect::set_access_resolved_color(bool p_enabled) {
|
|||
if (rid.is_valid()) {
|
||||
RenderingServer *rs = RenderingServer::get_singleton();
|
||||
ERR_FAIL_NULL(rs);
|
||||
rs->compositor_effect_set_flag(rid, RSE::CompositorEffectFlags::COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_COLOR, access_resolved_color);
|
||||
rs->compositor_effect_set_flag(rid, RS::CompositorEffectFlags::COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_COLOR, access_resolved_color);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -141,7 +135,7 @@ void CompositorEffect::set_access_resolved_depth(bool p_enabled) {
|
|||
if (rid.is_valid()) {
|
||||
RenderingServer *rs = RenderingServer::get_singleton();
|
||||
ERR_FAIL_NULL(rs);
|
||||
rs->compositor_effect_set_flag(rid, RSE::CompositorEffectFlags::COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_DEPTH, access_resolved_depth);
|
||||
rs->compositor_effect_set_flag(rid, RS::CompositorEffectFlags::COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_DEPTH, access_resolved_depth);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +148,7 @@ void CompositorEffect::set_needs_motion_vectors(bool p_enabled) {
|
|||
if (rid.is_valid()) {
|
||||
RenderingServer *rs = RenderingServer::get_singleton();
|
||||
ERR_FAIL_NULL(rs);
|
||||
rs->compositor_effect_set_flag(rid, RSE::CompositorEffectFlags::COMPOSITOR_EFFECT_FLAG_NEEDS_MOTION_VECTORS, needs_motion_vectors);
|
||||
rs->compositor_effect_set_flag(rid, RS::CompositorEffectFlags::COMPOSITOR_EFFECT_FLAG_NEEDS_MOTION_VECTORS, needs_motion_vectors);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -167,7 +161,7 @@ void CompositorEffect::set_needs_normal_roughness(bool p_enabled) {
|
|||
if (rid.is_valid()) {
|
||||
RenderingServer *rs = RenderingServer::get_singleton();
|
||||
ERR_FAIL_NULL(rs);
|
||||
rs->compositor_effect_set_flag(rid, RSE::CompositorEffectFlags::COMPOSITOR_EFFECT_FLAG_NEEDS_ROUGHNESS, needs_normal_roughness);
|
||||
rs->compositor_effect_set_flag(rid, RS::CompositorEffectFlags::COMPOSITOR_EFFECT_FLAG_NEEDS_ROUGHNESS, needs_normal_roughness);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -180,7 +174,7 @@ void CompositorEffect::set_needs_separate_specular(bool p_enabled) {
|
|||
if (rid.is_valid()) {
|
||||
RenderingServer *rs = RenderingServer::get_singleton();
|
||||
ERR_FAIL_NULL(rs);
|
||||
rs->compositor_effect_set_flag(rid, RSE::CompositorEffectFlags::COMPOSITOR_EFFECT_FLAG_NEEDS_SEPARATE_SPECULAR, needs_separate_specular);
|
||||
rs->compositor_effect_set_flag(rid, RS::CompositorEffectFlags::COMPOSITOR_EFFECT_FLAG_NEEDS_SEPARATE_SPECULAR, needs_separate_specular);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -192,7 +186,7 @@ CompositorEffect::CompositorEffect() {
|
|||
RenderingServer *rs = RenderingServer::get_singleton();
|
||||
if (rs != nullptr) {
|
||||
rid = rs->compositor_effect_create();
|
||||
rs->compositor_effect_set_callback(rid, RSE::CompositorEffectCallbackType(effect_callback_type), callable_mp(this, &CompositorEffect::_call_render_callback));
|
||||
rs->compositor_effect_set_callback(rid, RenderingServer::CompositorEffectCallbackType(effect_callback_type), callable_mp(this, &CompositorEffect::_call_render_callback));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue