forked from bartvdbraak/blender
Fix #32205: Holdout shader + transparent background stays black with Alpha = 1
It was read of initialized memory around holdout_weight in cases when holdout material is used. Seems that it should be assigned to result of shader_holdout_eval here. If Brecht could double check this it'll be great. This could potentially fix #32224: Holdout Error with CUDA Cycles Render
This commit is contained in:
parent
e00c7558bd
commit
7ffa42075e
@ -288,7 +288,7 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
|
|||||||
if(sd.flag & SD_HOLDOUT_MASK)
|
if(sd.flag & SD_HOLDOUT_MASK)
|
||||||
holdout_weight = make_float3(1.0f, 1.0f, 1.0f);
|
holdout_weight = make_float3(1.0f, 1.0f, 1.0f);
|
||||||
else
|
else
|
||||||
shader_holdout_eval(kg, &sd);
|
holdout_weight = shader_holdout_eval(kg, &sd);
|
||||||
|
|
||||||
/* any throughput is ok, should all be identical here */
|
/* any throughput is ok, should all be identical here */
|
||||||
L_transparent += average(holdout_weight*throughput);
|
L_transparent += average(holdout_weight*throughput);
|
||||||
@ -655,7 +655,7 @@ __device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sam
|
|||||||
if(sd.flag & SD_HOLDOUT_MASK)
|
if(sd.flag & SD_HOLDOUT_MASK)
|
||||||
holdout_weight = make_float3(1.0f, 1.0f, 1.0f);
|
holdout_weight = make_float3(1.0f, 1.0f, 1.0f);
|
||||||
else
|
else
|
||||||
shader_holdout_eval(kg, &sd);
|
holdout_weight = shader_holdout_eval(kg, &sd);
|
||||||
|
|
||||||
/* any throughput is ok, should all be identical here */
|
/* any throughput is ok, should all be identical here */
|
||||||
L_transparent += average(holdout_weight*throughput);
|
L_transparent += average(holdout_weight*throughput);
|
||||||
|
Loading…
Reference in New Issue
Block a user