forked from bartvdbraak/blender
Fix #33915: tweak self intersection epsilon for motion blur a bit further, still
had some cases where there were artifacts. Also fix rendering error with shutter time set to 0.
This commit is contained in:
parent
82e4484de2
commit
543e06ce0e
@ -929,7 +929,7 @@ __device_inline float3 ray_offset(float3 P, float3 Ng)
|
||||
const float epsilon_f = 1e-5f;
|
||||
/* ideally this should match epsilon_f, but instancing/mblur
|
||||
* precision makes it problematic */
|
||||
const float epsilon_test = 1e-1f;
|
||||
const float epsilon_test = 1.0f;
|
||||
const int epsilon_i = 32;
|
||||
|
||||
float3 res;
|
||||
|
@ -213,7 +213,7 @@ __device void camera_sample(KernelGlobals *kg, int x, int y, float filter_u, flo
|
||||
|
||||
#ifdef __CAMERA_MOTION__
|
||||
/* motion blur */
|
||||
if(kernel_data.cam.shuttertime == 0.0f)
|
||||
if(kernel_data.cam.shuttertime == -1.0f)
|
||||
ray->time = TIME_INVALID;
|
||||
else
|
||||
ray->time = 0.5f + 0.5f*(time - 0.5f)*kernel_data.cam.shuttertime;
|
||||
|
@ -216,9 +216,9 @@ void Camera::device_update(Device *device, DeviceScene *dscene, Scene *scene)
|
||||
|
||||
/* motion blur */
|
||||
#ifdef __CAMERA_MOTION__
|
||||
kcam->shuttertime = (need_motion == Scene::MOTION_BLUR) ? shuttertime: 0.0f;
|
||||
kcam->shuttertime = (need_motion == Scene::MOTION_BLUR) ? shuttertime: -1.0f;
|
||||
#else
|
||||
kcam->shuttertime = 0.0f;
|
||||
kcam->shuttertime = -1.0f;
|
||||
#endif
|
||||
|
||||
/* type */
|
||||
|
Loading…
Reference in New Issue
Block a user