Fix shadows from Boo models having the material mods applied from their parent.

This commit is contained in:
Dario 2021-05-11 22:09:54 -03:00
parent a6773ebd31
commit 2192523ed2
2 changed files with 3 additions and 33 deletions

View File

@ -94,7 +94,9 @@
"name": "bobomb_buddy_geo"
},
{
"materialMod": null,
"materialMod": {
"refractionFactor": 0.9750000238418579
},
"name": "boo_castle_geo"
},
{

View File

@ -252,10 +252,6 @@ void geo_layout_cmd_node_root(void) {
gGeoViews[i] = NULL;
}
#ifdef GFX_ENABLE_GRAPH_NODE_MODS
gfx_register_graph_node_layout(graphNode, gCurGraphNodeIndex);
#endif
register_scene_graph_node(&graphNode->node);
gGeoLayoutCommand += 0x0C << CMD_SIZE_SHIFT;
@ -271,10 +267,6 @@ void geo_layout_cmd_node_ortho_projection(void) {
graphNode = init_graph_node_ortho_projection(gGraphNodePool, NULL, scale);
#ifdef GFX_ENABLE_GRAPH_NODE_MODS
gfx_register_graph_node_layout(graphNode, gCurGraphNodeIndex);
#endif
register_scene_graph_node(&graphNode->node);
gGeoLayoutCommand += 0x04 << CMD_SIZE_SHIFT;
@ -303,10 +295,6 @@ void geo_layout_cmd_node_perspective(void) {
graphNode = init_graph_node_perspective(gGraphNodePool, NULL, (f32) fov, near, far, frustumFunc, 0);
#ifdef GFX_ENABLE_GRAPH_NODE_MODS
gfx_register_graph_node_layout(graphNode, gCurGraphNodeIndex);
#endif
register_scene_graph_node(&graphNode->fnNode.node);
gGeoLayoutCommand += 0x08 << CMD_SIZE_SHIFT;
@ -344,10 +332,6 @@ void geo_layout_cmd_node_master_list(void) {
graphNode = init_graph_node_master_list(gGraphNodePool, NULL, cur_geo_cmd_u8(0x01));
#ifdef GFX_ENABLE_GRAPH_NODE_MODS
gfx_register_graph_node_layout(graphNode, gCurGraphNodeIndex);
#endif
register_scene_graph_node(&graphNode->node);
gGeoLayoutCommand += 0x04 << CMD_SIZE_SHIFT;
@ -366,10 +350,6 @@ void geo_layout_cmd_node_level_of_detail(void) {
graphNode = init_graph_node_render_range(gGraphNodePool, NULL, minDistance, maxDistance);
#ifdef GFX_ENABLE_GRAPH_NODE_MODS
gfx_register_graph_node_layout(graphNode, gCurGraphNodeIndex);
#endif
register_scene_graph_node(&graphNode->node);
gGeoLayoutCommand += 0x08 << CMD_SIZE_SHIFT;
@ -425,10 +405,6 @@ void geo_layout_cmd_node_camera(void) {
graphNode = init_graph_node_camera(gGraphNodePool, NULL, pos, focus,
(GraphNodeFunc) cur_geo_cmd_ptr(0x10), cur_geo_cmd_s16(0x02));
#ifdef GFX_ENABLE_GRAPH_NODE_MODS
gfx_register_graph_node_layout(graphNode, gCurGraphNodeIndex);
#endif
register_scene_graph_node(&graphNode->fnNode.node);
gGeoViews[0] = &graphNode->fnNode.node;
@ -737,10 +713,6 @@ void geo_layout_cmd_node_shadow(void) {
graphNode = init_graph_node_shadow(gGraphNodePool, NULL, shadowScale, shadowSolidity, shadowType);
#ifdef GFX_ENABLE_GRAPH_NODE_MODS
gfx_register_graph_node_layout(graphNode, gCurGraphNodeIndex);
#endif
register_scene_graph_node(&graphNode->node);
gGeoLayoutCommand += 0x08 << CMD_SIZE_SHIFT;
@ -796,10 +768,6 @@ void geo_layout_cmd_node_background(void) {
(GraphNodeFunc) cur_geo_cmd_ptr(0x04), // asm function
0);
#ifdef GFX_ENABLE_GRAPH_NODE_MODS
gfx_register_graph_node_layout(graphNode, gCurGraphNodeIndex);
#endif
register_scene_graph_node(&graphNode->fnNode.node);
gGeoLayoutCommand += 0x08 << CMD_SIZE_SHIFT;