Merge pull request #78490 from clayjohn/GLES3-particles-subemit
Add warnings and fallbacks for particles sub emitters when using the GL Compatibility rendering backend
This commit is contained in:
commit
cb73a6e9f9
6 changed files with 33 additions and 17 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue