forked from bartvdbraak/blender
Fix #36053: slow GPU render with panorama camera + depth of field.
This commit is contained in:
parent
990cad983b
commit
3a89f98a24
@ -166,6 +166,12 @@ __device void camera_sample_panorama(KernelGlobals *kg, float raster_x, float ra
|
||||
|
||||
ray->D = panorama_to_direction(kg, Pcamera.x, Pcamera.y);
|
||||
|
||||
/* indicates ray should not receive any light, outside of the lens */
|
||||
if(is_zero(ray->D)) {
|
||||
ray->t = 0.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
/* modify ray for depth of field */
|
||||
float aperturesize = kernel_data.cam.aperturesize;
|
||||
|
||||
@ -186,12 +192,6 @@ __device void camera_sample_panorama(KernelGlobals *kg, float raster_x, float ra
|
||||
ray->D = normalize(Pfocus - ray->P);
|
||||
}
|
||||
|
||||
/* indicates ray should not receive any light, outside of the lens */
|
||||
if(is_zero(ray->D)) {
|
||||
ray->t = 0.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
/* transform ray from camera to world */
|
||||
Transform cameratoworld = kernel_data.cam.cameratoworld;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user