You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
-Fixed matrix and vec+scalar multiplication issues, fixes #1143
This commit is contained in:
@@ -745,14 +745,9 @@ void ShaderGraphView::_create_node(int p_id) {
|
||||
|
||||
|
||||
} break; // mat4 x mat4
|
||||
case ShaderGraph::NODE_XFORM_VEC_MULT:
|
||||
case ShaderGraph::NODE_XFORM_VEC_INV_MULT: {
|
||||
|
||||
if (graph->node_get_type(type,p_id)==ShaderGraph::NODE_XFORM_VEC_INV_MULT)
|
||||
gn->set_title("XFVecMult");
|
||||
else
|
||||
gn->set_title("XFVecInvMult");
|
||||
case ShaderGraph::NODE_XFORM_VEC_MULT: {
|
||||
|
||||
gn->set_title("XFVecMult");
|
||||
|
||||
Button *button = memnew( Button("RotOnly"));
|
||||
button->set_toggle_mode(true);
|
||||
@@ -774,6 +769,32 @@ void ShaderGraphView::_create_node(int p_id) {
|
||||
gn->set_slot(1,true,ShaderGraph::SLOT_TYPE_XFORM,typecol[ShaderGraph::SLOT_TYPE_XFORM],true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC]);
|
||||
gn->set_slot(2,true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC],false,0,Color());
|
||||
|
||||
} break;
|
||||
case ShaderGraph::NODE_XFORM_VEC_INV_MULT: {
|
||||
|
||||
gn->set_title("XFVecInvMult");
|
||||
|
||||
|
||||
Button *button = memnew( Button("RotOnly"));
|
||||
button->set_toggle_mode(true);
|
||||
button->set_pressed(graph->xform_vec_mult_node_get_no_translation(type,p_id));
|
||||
button->connect("toggled",this,"_xform_inv_rev_changed",varray(p_id));
|
||||
|
||||
gn->add_child(button);
|
||||
|
||||
gn->add_child( memnew(Label("vec")));
|
||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||
hbc->add_constant_override("separation",0);
|
||||
hbc->add_child( memnew(Label("xf")));
|
||||
hbc->add_spacer();
|
||||
Label *l = memnew(Label("out"));
|
||||
l->set_align(Label::ALIGN_RIGHT);
|
||||
hbc->add_child( l);
|
||||
gn->add_child(hbc);
|
||||
|
||||
gn->set_slot(1,true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC],false,0,Color());
|
||||
gn->set_slot(2,true,ShaderGraph::SLOT_TYPE_XFORM,typecol[ShaderGraph::SLOT_TYPE_XFORM],true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC]);
|
||||
|
||||
|
||||
} break; // mat4 x vec3 inverse mult (with no-translation option)
|
||||
case ShaderGraph::NODE_SCALAR_FUNC: {
|
||||
|
||||
Reference in New Issue
Block a user