diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-11-12 19:21:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-12 19:21:49 +0300 |
commit | 9da86c2fb73205869adf5a7449f5e4246d845db9 (patch) | |
tree | d08f0b4b7d9e59cadbd67ba47ad7127b5a59e506 /scene | |
parent | 0ba215642dcbc9e7386f2e02173e6884d0003c55 (diff) | |
parent | d0fbc467a674344a26963151945d40ab19c0e1af (diff) |
Merge pull request #54920 from Chaosus/vs_fix_crash
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/visual_shader_nodes.cpp | 12 | ||||
-rw-r--r-- | scene/resources/visual_shader_particle_nodes.cpp | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index 111cd088f1..951870fe34 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -497,7 +497,7 @@ String VisualShaderNodeTexture::get_input_port_default_hint(int p_port) const { Vector<VisualShader::DefaultTextureParam> VisualShaderNodeTexture::get_default_texture_parameters(VisualShader::Type p_type, int p_id) const { VisualShader::DefaultTextureParam dtp; dtp.name = make_unique_id(p_type, p_id, "tex"); - dtp.params[0] = texture; + dtp.params.push_back(texture); Vector<VisualShader::DefaultTextureParam> ret; ret.push_back(dtp); return ret; @@ -895,7 +895,7 @@ String VisualShaderNodeCurveTexture::generate_code(Shader::Mode p_mode, VisualSh Vector<VisualShader::DefaultTextureParam> VisualShaderNodeCurveTexture::get_default_texture_parameters(VisualShader::Type p_type, int p_id) const { VisualShader::DefaultTextureParam dtp; dtp.name = make_unique_id(p_type, p_id, "curve"); - dtp.params[0] = texture; + dtp.params.push_back(texture); Vector<VisualShader::DefaultTextureParam> ret; ret.push_back(dtp); return ret; @@ -980,7 +980,7 @@ String VisualShaderNodeCurveXYZTexture::generate_code(Shader::Mode p_mode, Visua Vector<VisualShader::DefaultTextureParam> VisualShaderNodeCurveXYZTexture::get_default_texture_parameters(VisualShader::Type p_type, int p_id) const { VisualShader::DefaultTextureParam dtp; dtp.name = make_unique_id(p_type, p_id, "curve3d"); - dtp.params[0] = texture; + dtp.params.push_back(texture); Vector<VisualShader::DefaultTextureParam> ret; ret.push_back(dtp); return ret; @@ -1162,7 +1162,7 @@ String VisualShaderNodeTexture2DArray::get_input_port_name(int p_port) const { Vector<VisualShader::DefaultTextureParam> VisualShaderNodeTexture2DArray::get_default_texture_parameters(VisualShader::Type p_type, int p_id) const { VisualShader::DefaultTextureParam dtp; dtp.name = make_unique_id(p_type, p_id, "tex3d"); - dtp.params[0] = texture_array; + dtp.params.push_back(texture_array); Vector<VisualShader::DefaultTextureParam> ret; ret.push_back(dtp); return ret; @@ -1219,7 +1219,7 @@ String VisualShaderNodeTexture3D::get_input_port_name(int p_port) const { Vector<VisualShader::DefaultTextureParam> VisualShaderNodeTexture3D::get_default_texture_parameters(VisualShader::Type p_type, int p_id) const { VisualShader::DefaultTextureParam dtp; dtp.name = make_unique_id(p_type, p_id, "tex3d"); - dtp.params[0] = texture; + dtp.params.push_back(texture); Vector<VisualShader::DefaultTextureParam> ret; ret.push_back(dtp); return ret; @@ -1318,7 +1318,7 @@ bool VisualShaderNodeCubemap::is_output_port_expandable(int p_port) const { Vector<VisualShader::DefaultTextureParam> VisualShaderNodeCubemap::get_default_texture_parameters(VisualShader::Type p_type, int p_id) const { VisualShader::DefaultTextureParam dtp; dtp.name = make_unique_id(p_type, p_id, "cube"); - dtp.params[0] = cube_map; + dtp.params.push_back(cube_map); Vector<VisualShader::DefaultTextureParam> ret; ret.push_back(dtp); return ret; diff --git a/scene/resources/visual_shader_particle_nodes.cpp b/scene/resources/visual_shader_particle_nodes.cpp index c8f6e9182f..7dd4eed15b 100644 --- a/scene/resources/visual_shader_particle_nodes.cpp +++ b/scene/resources/visual_shader_particle_nodes.cpp @@ -351,11 +351,11 @@ String VisualShaderNodeParticleMeshEmitter::generate_code(Shader::Mode p_mode, V Vector<VisualShader::DefaultTextureParam> VisualShaderNodeParticleMeshEmitter::get_default_texture_parameters(VisualShader::Type p_type, int p_id) const { VisualShader::DefaultTextureParam dtp_vx; dtp_vx.name = make_unique_id(p_type, p_id, "mesh_vx"); - dtp_vx.params[0] = position_texture; + dtp_vx.params.push_back(position_texture); VisualShader::DefaultTextureParam dtp_nm; dtp_nm.name = make_unique_id(p_type, p_id, "mesh_nm"); - dtp_nm.params[0] = normal_texture; + dtp_nm.params.push_back(normal_texture); Vector<VisualShader::DefaultTextureParam> ret; ret.push_back(dtp_vx); |