forked from bartvdbraak/blender
Fix T45232: Cycles bake artifacts with transparent textures
The issue was caused by uninitialized ray used for composite and AO evaluation. Can;t really think of "proper" ray configuration here, it's all a bit arbitrary but think initializing the ray in a way so we look at the surface in a negative normal direction is much better alternative to uninitialized ray. Open for alternative suggestions tho.
This commit is contained in:
parent
f62748f10a
commit
2633928e1d
@ -31,6 +31,13 @@ ccl_device void compute_light_pass(KernelGlobals *kg, ShaderData *sd, PathRadian
|
|||||||
float3 throughput = make_float3(1.0f, 1.0f, 1.0f);
|
float3 throughput = make_float3(1.0f, 1.0f, 1.0f);
|
||||||
bool is_sss_sample = is_sss;
|
bool is_sss_sample = is_sss;
|
||||||
|
|
||||||
|
ray.P = sd->P + sd->Ng;
|
||||||
|
ray.D = -sd->Ng;
|
||||||
|
ray.t = FLT_MAX;
|
||||||
|
#ifdef __CAMERA_MOTION__
|
||||||
|
ray.time = TIME_INVALID;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* init radiance */
|
/* init radiance */
|
||||||
path_radiance_init(&L_sample, kernel_data.film.use_light_pass);
|
path_radiance_init(&L_sample, kernel_data.film.use_light_pass);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user