Fix T92491: Cycles panoramic camera inside volume fails with near clipping
This commit is contained in:
parent
673984b222
commit
049510f425
Notes:
blender-bot
2023-02-14 11:21:43 +01:00
Referenced by issue #92491, Panoramic camera doesn't render when clip plane is inside a volume
|
@ -592,22 +592,26 @@ BoundBox Camera::viewplane_bounds_get()
|
|||
|
||||
if (camera_type == CAMERA_PANORAMA) {
|
||||
if (use_spherical_stereo == false) {
|
||||
bounds.grow(make_float3(cameratoworld.x.w, cameratoworld.y.w, cameratoworld.z.w));
|
||||
bounds.grow(make_float3(cameratoworld.x.w, cameratoworld.y.w, cameratoworld.z.w), nearclip);
|
||||
}
|
||||
else {
|
||||
float half_eye_distance = interocular_distance * 0.5f;
|
||||
|
||||
bounds.grow(make_float3(
|
||||
cameratoworld.x.w + half_eye_distance, cameratoworld.y.w, cameratoworld.z.w));
|
||||
bounds.grow(
|
||||
make_float3(cameratoworld.x.w + half_eye_distance, cameratoworld.y.w, cameratoworld.z.w),
|
||||
nearclip);
|
||||
|
||||
bounds.grow(make_float3(
|
||||
cameratoworld.z.w, cameratoworld.y.w + half_eye_distance, cameratoworld.z.w));
|
||||
bounds.grow(
|
||||
make_float3(cameratoworld.z.w, cameratoworld.y.w + half_eye_distance, cameratoworld.z.w),
|
||||
nearclip);
|
||||
|
||||
bounds.grow(make_float3(
|
||||
cameratoworld.x.w - half_eye_distance, cameratoworld.y.w, cameratoworld.z.w));
|
||||
bounds.grow(
|
||||
make_float3(cameratoworld.x.w - half_eye_distance, cameratoworld.y.w, cameratoworld.z.w),
|
||||
nearclip);
|
||||
|
||||
bounds.grow(make_float3(
|
||||
cameratoworld.x.w, cameratoworld.y.w - half_eye_distance, cameratoworld.z.w));
|
||||
bounds.grow(
|
||||
make_float3(cameratoworld.x.w, cameratoworld.y.w - half_eye_distance, cameratoworld.z.w),
|
||||
nearclip);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue