diff --git a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx index 8ae355a64e..535191df7c 100644 --- a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx +++ b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx @@ -3124,7 +3124,7 @@ bind_clip_plane(const NodePath &plane, int plane_id) { LMatrix4 rel_mat = plane_mat * LMatrix4::convert_mat(CS_yup_left, CS_default); const PlaneNode *plane_node; DCAST_INTO_V(plane_node, plane.node()); - LPlane world_plane = plane_node->get_plane() * rel_mat; + LPlanef world_plane = LCAST(float, plane_node->get_plane() * rel_mat); HRESULT hr = _d3d_device->SetClipPlane(plane_id, world_plane.get_data()); if (FAILED(hr)) { diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx index 08620a02b0..7fdb716742 100755 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx @@ -4083,7 +4083,7 @@ bind_clip_plane(const NodePath &plane, int plane_id) { LMatrix4 rel_mat = plane_mat * LMatrix4::convert_mat(CS_yup_left, CS_default); const PlaneNode *plane_node; DCAST_INTO_V(plane_node, plane.node()); - LPlane world_plane = plane_node->get_plane() * rel_mat; + LPlanef world_plane = LCAST(float, plane_node->get_plane() * rel_mat); HRESULT hr = _d3d_device->SetClipPlane(plane_id, world_plane.get_data()); if (FAILED(hr)) {