forked from bartvdbraak/blender
More fixes related to #32900, motion blur with cuda sm 2.0 still disabled.
This commit is contained in:
parent
f7a584b841
commit
95963289c8
@ -443,13 +443,19 @@ __device_inline bool bvh_intersect_motion(KernelGlobals *kg, const Ray *ray, con
|
||||
|
||||
__device_inline bool scene_intersect(KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect)
|
||||
{
|
||||
/* todo: fix cuda sm 2.0 motion blur */
|
||||
#if defined(__OBJECT_MOTION__) && (!defined(__KERNEL_CUDA) || (__CUDA_ARCH__ >= 210))
|
||||
#ifdef __OBJECT_MOTION__
|
||||
#if !defined(__KERNEL_CUDA__) || (__CUDA_ARCH__ >= 210)
|
||||
if(kernel_data.bvh.have_motion)
|
||||
return bvh_intersect_motion(kg, ray, visibility, isect);
|
||||
else
|
||||
#endif
|
||||
return bvh_intersect(kg, ray, visibility, isect);
|
||||
#else
|
||||
/* todo: fix cuda sm 2.0 motion blur */
|
||||
return bvh_intersect(kg, ray, visibility, isect);
|
||||
#endif
|
||||
#else
|
||||
return bvh_intersect(kg, ray, visibility, isect);
|
||||
#endif
|
||||
}
|
||||
|
||||
__device_inline float3 ray_offset(float3 P, float3 Ng)
|
||||
|
@ -32,6 +32,10 @@ __device float3 direct_emissive_eval(KernelGlobals *kg, float rando,
|
||||
Ray ray;
|
||||
ray.D = ls->D;
|
||||
ray.P = ls->P;
|
||||
ray.t = 1.0f;
|
||||
#ifdef __OBJECT_MOTION__
|
||||
ray.time = time;
|
||||
#endif
|
||||
ray.dP.dx = make_float3(0.0f, 0.0f, 0.0f);
|
||||
ray.dP.dy = make_float3(0.0f, 0.0f, 0.0f);
|
||||
#ifdef __CAMERA_MOTION__
|
||||
|
@ -514,7 +514,9 @@ typedef struct KernelCamera {
|
||||
/* more matrices */
|
||||
Transform screentoworld;
|
||||
Transform rastertoworld;
|
||||
Transform ndctoworld;
|
||||
/* work around cuda sm 2.0 crash, this seems to
|
||||
* cross some limit in combination with motion
|
||||
* Transform ndctoworld; */
|
||||
Transform worldtoscreen;
|
||||
Transform worldtoraster;
|
||||
Transform worldtondc;
|
||||
|
@ -224,7 +224,7 @@ bool OSLRenderServices::get_matrix(OSL::Matrix44 &result, ustring from)
|
||||
KernelGlobals *kg = kernel_globals;
|
||||
|
||||
if (from == u_ndc) {
|
||||
Transform tfm = transform_transpose(kernel_data.cam.ndctoworld);
|
||||
Transform tfm = transform_transpose(transform_quick_inverse(kernel_data.cam.worldtondc));
|
||||
result = TO_MATRIX44(tfm);
|
||||
return true;
|
||||
}
|
||||
|
@ -162,7 +162,6 @@ void Camera::device_update(Device *device, DeviceScene *dscene, Scene *scene)
|
||||
/* store matrices */
|
||||
kcam->screentoworld = screentoworld;
|
||||
kcam->rastertoworld = rastertoworld;
|
||||
kcam->ndctoworld = ndctoworld;
|
||||
kcam->rastertocamera = rastertocamera;
|
||||
kcam->cameratoworld = cameratoworld;
|
||||
kcam->worldtoscreen = transform_inverse(screentoworld);
|
||||
|
Loading…
Reference in New Issue
Block a user