Skip to content

Commit

Permalink
UPBGE: Don't make mist enable uniform constant.
Browse files Browse the repository at this point in the history
This uniform is frequently changed between the viewport settings and
in game settings, to avoid recompiling the materials only for it
and has this uniform is a more a flag than a value: this uniform
back to dynamic uniform.

Fix issue: #609.
  • Loading branch information
panzergame committed Oct 15, 2017
1 parent 2fc4872 commit 9a77819
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/blender/gpu/intern/gpu_material.c
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,7 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr)

if (!(ma->mode & MA_NOMIST)) {
GPU_link(mat, "shade_mist_factor", GPU_builtin(GPU_VIEW_POSITION),
GPU_select_uniform(&GPUWorld.mistenabled, GPU_DYNAMIC_MIST_ENABLE, NULL, ma),
GPU_dynamic_uniform(&GPUWorld.mistenabled, GPU_DYNAMIC_MIST_ENABLE, NULL),
GPU_select_uniform(&GPUWorld.miststart, GPU_DYNAMIC_MIST_START, NULL, ma),
GPU_select_uniform(&GPUWorld.mistdistance, GPU_DYNAMIC_MIST_DISTANCE, NULL, ma),
GPU_select_uniform(&GPUWorld.mistype, GPU_DYNAMIC_MIST_TYPE, NULL, ma),
Expand Down

0 comments on commit 9a77819

Please sign in to comment.