From 66e98f8c70547cc84b5dbd83720a6e329f267913 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 3 Jul 2014 21:59:22 +0000 Subject: [PATCH] Allow passing matrices to GLSL shaders either via NodePath or directly as a Mat4 --- panda/src/display/graphicsStateGuardian.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 822753adec..1cbd3f49c6 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -1156,9 +1156,7 @@ fetch_specified_part(Shader::ShaderMatInput part, InternalName *name, LMatrix4 & return &t; } case Shader::SMO_mat_constant_x: { - const NodePath &np = _target_shader->get_shader_input_nodepath(name); - nassertr(!np.is_empty(), &LMatrix4::ident_mat()); - return &(np.node()->get_transform()->get_mat()); + return &_target_shader->get_shader_input_matrix(name, t); } case Shader::SMO_vec_constant_x: { const LVecBase4 &input = _target_shader->get_shader_input_vector(name);