Merge branch 'blender-v5.0-release'
This commit is contained in:
@@ -234,7 +234,7 @@ static void blender_camera_from_object(BlenderCamera *bcam,
|
||||
float fstop = b_camera.dof().aperture_fstop();
|
||||
fstop = max(fstop, 1e-5f);
|
||||
|
||||
if (bcam->type == CAMERA_ORTHOGRAPHIC) {
|
||||
if (bcam->type == CAMERA_ORTHOGRAPHIC || bcam->type == CAMERA_CUSTOM) {
|
||||
bcam->aperturesize = 1.0f / (2.0f * fstop);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -68,6 +68,7 @@ shader camera(float focal_length = 50.0 [[ float min = 0.0, float sensitivity =
|
||||
float focal_distance;
|
||||
getattribute("cam:focal_distance", focal_distance);
|
||||
getattribute("cam:aperture_position", position);
|
||||
position *= focal_length * 1e-3;
|
||||
|
||||
point Pfocus = direction * focal_distance / direction.z;
|
||||
direction = normalize(Pfocus - position);
|
||||
|
||||
@@ -118,7 +118,7 @@ static void camera_foreach_id(ID *id, LibraryForeachIDData *data)
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, camera->dof_ob, IDWALK_CB_NOP);
|
||||
}
|
||||
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, camera->custom_shader, IDWALK_CB_NOP);
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, camera->custom_shader, IDWALK_CB_USER);
|
||||
}
|
||||
|
||||
static void camera_foreach_path(ID *id, BPathForeachPathData *bpath_data)
|
||||
|
||||
Reference in New Issue
Block a user