Skip to content

Commit

Permalink
UPBGE: Fix parralax mapping without UV.
Browse files Browse the repository at this point in the history
Previoulsy if a parralax mapping was set but not using UV mapping when we was
using a non initialized node for parallax mapping. It created a crash.
  • Loading branch information
panzergame committed Jul 23, 2016
1 parent 8aa70f5 commit e8233f3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions source/blender/gpu/intern/gpu_material.c
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,7 @@ static void do_material_tex(GPUShadeInput *shi)
GPUNodeLink *texco_global, *texco_uv = NULL;
GPUNodeLink *newnor, *orn;
float one = 1.0f;
GPUNodeLink *parco;
GPUNodeLink *parco = NULL;
int rgbnor, talpha;
bool init_done = false;
float discard;
Expand Down Expand Up @@ -1295,9 +1295,6 @@ static void do_material_tex(GPUShadeInput *shi)
GPU_uniform(&discard),
&parco);
}
else {
parco = NULL;
}
}
}

Expand Down

1 comment on commit e8233f3

@youle31
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh. Thanks very much for the fix :)

Please sign in to comment.