A region's color, through its mesh's material (the unlit shader multiplies the vertex color, white, by the diffuse color).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ShadowRegion), | intent(in) | :: | g |
the region (umbra, penumbra or antumbra) |
subroutine apply_color(g) type(ShadowRegion), intent(in) :: g !! the region (umbra, penumbra or antumbra) real(c_float) :: c(4) if (.not. c_associated(g%mesh)) return c = real(g%color, c_float) call check_status(mesh_set_material(g%mesh, c, c, [0.0_c_float, 0.0_c_float, 0.0_c_float, 1.0_c_float], & [0.0_c_float, 0.0_c_float, 0.0_c_float, 1.0_c_float], 0.0_c_float), 'shadow') end subroutine apply_color