1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-04 17:04:49 +00:00

Added MeshEmitter node for particles in visual shader

This commit is contained in:
Yuri Roubinsky
2021-11-05 22:57:24 +03:00
parent 56cfebbe98
commit 80b563672b
8 changed files with 352 additions and 7 deletions

View File

@@ -36,6 +36,11 @@
#include "visual_shader_particle_nodes.h"
#include "visual_shader_sdf_nodes.h"
String make_unique_id(VisualShader::Type p_type, int p_id, const String &p_name) {
static const char *typepf[VisualShader::TYPE_MAX] = { "vtx", "frg", "lgt", "start", "process", "collide", "start_custom", "process_custom", "sky", "fog" };
return p_name + "_" + String(typepf[p_type]) + "_" + itos(p_id);
}
bool VisualShaderNode::is_simple_decl() const {
return simple_decl;
}
@@ -1829,6 +1834,7 @@ void VisualShader::_update_shader() const {
code += " vec3 __vec3_buff2;\n";
code += " float __scalar_buff1;\n";
code += " float __scalar_buff2;\n";
code += " int __scalar_ibuff;\n";
code += " vec3 __ndiff = normalize(__diff);\n\n";
}
if (has_start) {