DRW: View: Allow disabling view test by setting bound sphere radius to -1

This commit is contained in:
Clément Foucault
2023-01-18 14:50:18 +01:00
parent 534214e65c
commit c412d2dcfe

View File

@@ -38,7 +38,11 @@ void main()
Sphere inscribed_sphere = Sphere(bounds.bounding_sphere.xyz, bounds._inner_sphere_radius);
for (drw_view_id = 0; drw_view_id < view_len; drw_view_id++) {
if (intersect_view(inscribed_sphere) == true) {
if (drw_view_culling.bound_sphere.w == -1.0) {
/* View disabled. */
mask_visibility_bit(drw_view_id);
}
else if (intersect_view(inscribed_sphere) == true) {
/* Visible. */
}
else if (intersect_view(bounding_sphere) == false) {