Fix cycles motion blur + OSL + object texture coordinates issue.
This commit is contained in:
parent
f23b6be620
commit
f1745706ad
@ -80,7 +80,12 @@ bool OSLRenderServices::get_matrix(OSL::Matrix44 &result, OSL::TransformationPtr
|
||||
|
||||
if (object != ~0) {
|
||||
#ifdef __OBJECT_MOTION__
|
||||
Transform tfm = object_fetch_transform_motion_test(kg, object, time, NULL);
|
||||
Transform tfm;
|
||||
|
||||
if(time == sd->time)
|
||||
tfm = sd->ob_tfm;
|
||||
else
|
||||
tfm = object_fetch_transform_motion_test(kg, object, time, NULL);
|
||||
#else
|
||||
Transform tfm = object_fetch_transform(kg, object, OBJECT_TRANSFORM);
|
||||
#endif
|
||||
@ -106,7 +111,11 @@ bool OSLRenderServices::get_inverse_matrix(OSL::Matrix44 &result, OSL::Transform
|
||||
if (object != ~0) {
|
||||
#ifdef __OBJECT_MOTION__
|
||||
Transform itfm;
|
||||
object_fetch_transform_motion_test(kg, object, time, &itfm);
|
||||
|
||||
if(time == sd->time)
|
||||
itfm = sd->ob_itfm;
|
||||
else
|
||||
object_fetch_transform_motion_test(kg, object, time, &itfm);
|
||||
#else
|
||||
Transform itfm = object_fetch_transform(kg, object, OBJECT_INVERSE_TRANSFORM);
|
||||
#endif
|
||||
|
@ -106,6 +106,7 @@ static void shaderdata_to_shaderglobals(KernelGlobals *kg, ShaderData *sd,
|
||||
globals->dPdu = TO_VEC3(sd->dPdu);
|
||||
globals->dPdv = TO_VEC3(sd->dPdv);
|
||||
globals->surfacearea = (sd->object == ~0) ? 1.0f : object_surface_area(kg, sd->object);
|
||||
globals->time = sd->time;
|
||||
|
||||
/* booleans */
|
||||
globals->raytype = path_flag; /* todo: add our own ray types */
|
||||
|
Loading…
Reference in New Issue
Block a user