Skip to content

Commit f780c89

Browse files
committed
UPBGE: Fix specular tansparency value with depth transparency.
The depth transparency was computed with the input transparency and not the current computed transparency which could be affected by the specular transparency. To fix this issue the input transparency passed to the GLSL function shade_alpha_depth is the final transparency.
1 parent a30e8e8 commit f780c89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/blender/gpu/intern/gpu_material.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1975,7 +1975,7 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr)
19751975
GPU_link(mat, "shade_alpha_depth",
19761976
GPU_builtin(GPU_VIEW_POSITION),
19771977
GPU_dynamic_texture_ptr(GPU_texture_global_depth_ptr(), GPU_DYNAMIC_SAMPLER_2DBUFFER, ma),
1978-
shi->alpha, GPU_uniform(&ma->depthtranspfactor), &shr->alpha);
1978+
shr->alpha, GPU_uniform(&ma->depthtranspfactor), &shr->alpha);
19791979
}
19801980

19811981
GPU_link(mat, "mtex_alpha_to_col", shr->combined, shr->alpha, &shr->combined);

0 commit comments

Comments
 (0)