Renamed emit_particle
to emit_subparticle
shader function
This commit is contained in:
parent
8e514bbf6a
commit
ef941a6500
@ -646,7 +646,7 @@ void ParticlesMaterial::_update_shader() {
|
|||||||
code += " for(int i=0;i<emit_count;i++) {\n";
|
code += " for(int i=0;i<emit_count;i++) {\n";
|
||||||
code += " uint flags = FLAG_EMIT_POSITION|FLAG_EMIT_ROT_SCALE;\n";
|
code += " uint flags = FLAG_EMIT_POSITION|FLAG_EMIT_ROT_SCALE;\n";
|
||||||
code += " if (sub_emitter_keep_velocity) flags|=FLAG_EMIT_VELOCITY;\n";
|
code += " if (sub_emitter_keep_velocity) flags|=FLAG_EMIT_VELOCITY;\n";
|
||||||
code += " emit_particle(TRANSFORM,VELOCITY,vec4(0.0),vec4(0.0),flags);\n";
|
code += " emit_subparticle(TRANSFORM,VELOCITY,vec4(0.0),vec4(0.0),flags);\n";
|
||||||
code += " }";
|
code += " }";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8780,7 +8780,7 @@ RendererStorageRD::RendererStorageRD() {
|
|||||||
actions.renames["RESTART_VELOCITY"] = "restart_velocity";
|
actions.renames["RESTART_VELOCITY"] = "restart_velocity";
|
||||||
actions.renames["RESTART_COLOR"] = "restart_color";
|
actions.renames["RESTART_COLOR"] = "restart_color";
|
||||||
actions.renames["RESTART_CUSTOM"] = "restart_custom";
|
actions.renames["RESTART_CUSTOM"] = "restart_custom";
|
||||||
actions.renames["emit_particle"] = "emit_particle";
|
actions.renames["emit_subparticle"] = "emit_subparticle";
|
||||||
actions.renames["COLLIDED"] = "collided";
|
actions.renames["COLLIDED"] = "collided";
|
||||||
actions.renames["COLLISION_NORMAL"] = "collision_normal";
|
actions.renames["COLLISION_NORMAL"] = "collision_normal";
|
||||||
actions.renames["COLLISION_DEPTH"] = "collision_depth";
|
actions.renames["COLLISION_DEPTH"] = "collision_depth";
|
||||||
|
@ -173,7 +173,7 @@ uint hash(uint x) {
|
|||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool emit_particle(mat4 p_xform, vec3 p_velocity, vec4 p_color, vec4 p_custom, uint p_flags) {
|
bool emit_subparticle(mat4 p_xform, vec3 p_velocity, vec4 p_color, vec4 p_custom, uint p_flags) {
|
||||||
if (!params.can_emit) {
|
if (!params.can_emit) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,7 @@ ShaderTypes::ShaderTypes() {
|
|||||||
emit_vertex_func.arguments.push_back(ShaderLanguage::StageFunctionInfo::Argument("custom", ShaderLanguage::TYPE_VEC4));
|
emit_vertex_func.arguments.push_back(ShaderLanguage::StageFunctionInfo::Argument("custom", ShaderLanguage::TYPE_VEC4));
|
||||||
emit_vertex_func.arguments.push_back(ShaderLanguage::StageFunctionInfo::Argument("flags", ShaderLanguage::TYPE_UINT));
|
emit_vertex_func.arguments.push_back(ShaderLanguage::StageFunctionInfo::Argument("flags", ShaderLanguage::TYPE_UINT));
|
||||||
emit_vertex_func.return_type = ShaderLanguage::TYPE_BOOL; //whether it could emit
|
emit_vertex_func.return_type = ShaderLanguage::TYPE_BOOL; //whether it could emit
|
||||||
shader_modes[RS::SHADER_PARTICLES].functions["compute"].stage_functions["emit_particle"] = emit_vertex_func;
|
shader_modes[RS::SHADER_PARTICLES].functions["compute"].stage_functions["emit_subparticle"] = emit_vertex_func;
|
||||||
}
|
}
|
||||||
|
|
||||||
shader_modes[RS::SHADER_PARTICLES].modes.push_back("collision_use_scale");
|
shader_modes[RS::SHADER_PARTICLES].modes.push_back("collision_use_scale");
|
||||||
|
Loading…
Reference in New Issue
Block a user