Merge branch 'master' into refactor-mesh-sharp-face-generic

This commit is contained in:
Hans Goudey 2023-01-23 15:58:17 -06:00
commit 015f06dd4f
2 changed files with 5 additions and 0 deletions

View File

@ -131,9 +131,12 @@ void ShadowPass::ShadowView::setup(View &view, float3 light_direction, bool forc
float4 extruded_face = float4(UNPACK3(normal), math::dot(normal, corner_a));
/* Ensure the plane faces outwards */
bool flipped = false;
for (float3 corner : frustum_corners.vec) {
if (math::dot(float3(extruded_face), corner) > (extruded_face.w + 0.1)) {
BLI_assert(!flipped);
UNUSED_VARS_NDEBUG(flipped);
flipped = true;
extruded_face *= -1;
}
}

View File

@ -765,9 +765,11 @@ ImBuf *IMB_stereo3d_ImBuf(const ImageFormatData *im_format, ImBuf *ibuf_left, Im
if (is_float) {
imb_addrectfloatImBuf(ibuf_stereo, ibuf_left->channels);
ibuf_stereo->float_colorspace = ibuf_left->float_colorspace;
}
else {
imb_addrectImBuf(ibuf_stereo);
ibuf_stereo->rect_colorspace = ibuf_left->rect_colorspace;
}
ibuf_stereo->flags = ibuf_left->flags;