You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Add warnings and fallbacks for particles sub emitters when using the GL Compatibility rendering backend
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
This commit is contained in:
@@ -229,7 +229,7 @@ void ParticleProcessMaterial::_update_shader() {
|
||||
}
|
||||
}
|
||||
|
||||
if (sub_emitter_mode != SUB_EMITTER_DISABLED) {
|
||||
if (sub_emitter_mode != SUB_EMITTER_DISABLED && !RenderingServer::get_singleton()->is_low_end()) {
|
||||
if (sub_emitter_mode == SUB_EMITTER_CONSTANT) {
|
||||
code += "uniform float sub_emitter_frequency;\n";
|
||||
}
|
||||
@@ -880,7 +880,7 @@ void ParticleProcessMaterial::_update_shader() {
|
||||
code += " }\n";
|
||||
}
|
||||
|
||||
if (sub_emitter_mode != SUB_EMITTER_DISABLED) {
|
||||
if (sub_emitter_mode != SUB_EMITTER_DISABLED && !RenderingServer::get_singleton()->is_low_end()) {
|
||||
code += " int emit_count = 0;\n";
|
||||
switch (sub_emitter_mode) {
|
||||
case SUB_EMITTER_CONSTANT: {
|
||||
@@ -1487,6 +1487,9 @@ void ParticleProcessMaterial::set_sub_emitter_mode(SubEmitterMode p_sub_emitter_
|
||||
sub_emitter_mode = p_sub_emitter_mode;
|
||||
_queue_shader_change();
|
||||
notify_property_list_changed();
|
||||
if (sub_emitter_mode != SUB_EMITTER_DISABLED && RenderingServer::get_singleton()->is_low_end()) {
|
||||
WARN_PRINT_ONCE_ED("Sub-emitter modes other than SUB_EMITTER_DISABLED are not supported in the GL Compatibility rendering backend.");
|
||||
}
|
||||
}
|
||||
|
||||
ParticleProcessMaterial::SubEmitterMode ParticleProcessMaterial::get_sub_emitter_mode() const {
|
||||
|
||||
Reference in New Issue
Block a user