Cycles: Fix wrong SSS on scaled instanced objects
Was a mistake on searching refined position form ray and hit distance. Remember kids: SSS distance is in the object space!
This commit is contained in:
parent
70502578b1
commit
e82876589f
@ -292,7 +292,10 @@ ccl_device int subsurface_scatter_multi_intersect(
|
||||
|
||||
for(int hit = 0; hit < num_eval_hits; hit++) {
|
||||
/* Quickly retrieve P and Ng without setting up ShaderData. */
|
||||
float3 hit_P = ray->P + ss_isect->hits[hit].t * ray->D;
|
||||
float3 hit_P = triangle_refine_subsurface(kg,
|
||||
sd,
|
||||
&ss_isect->hits[hit],
|
||||
ray);
|
||||
float3 hit_Ng = ss_isect->Ng[hit];
|
||||
if(ss_isect->hits[hit].object != OBJECT_NONE) {
|
||||
object_normal_transform(kg, sd, &hit_Ng);
|
||||
|
Loading…
Reference in New Issue
Block a user