shadow_switch(3G)
NAME
shadow_switch, inq_shadow_switch − enable/disable objects from casting shadows in radiosity and ray tracing renderings; inquire current shadow switch state
SYNOPSIS
C Syntax:
void shadow_switch(fildes,on);
int fildes,on;
void inq_shadow_switch(fildes,on);
int fildes,*on;
FORTRAN77 Syntax:
subroutine shadow_switch(fildes,on)
integer*4 fildes,on
subroutine inq_shadow_switch(fildes,on)
integer*4 fildes,on
Pascal Syntax:
procedure shadow_switch(fildes:integer;var on:integer);
procedure inq_shadow_switch(fildes:integer;var on:integer);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
Output Parameters
on Mask specifying which of the Starbase light sources will cause objects to cast shadows (value range: 0 through 0xffff (hex)).
Discussion
shadow_switch allows the user to choose which of the Starbase point lights in a global rendering will cause the objects they illuminate to cast shadows. Objects can be set up to cast shadows due to any combination of Starbase lights by constructing the on mask accordingly. shadow_switch can be used for both radiosity and ray tracing renderings.
The on mask for shadow_switch is constructed the same way as the on mask used in the light_switch command. The least significant bit (bit 0) in the on mask corresponds to the ambient light, while bits 1 through 16 correspond to point light sources 1 through 16 respectively. If a bit is set on (1), then shadows will be computed for the corresponding Starbase light in the rendered image. Note that the ambient light never causes shadows, so setting bit 0 has no effect.
Only the last setting of shadow_switch encountered during traversal of the model by render_scene is used by the global renderer; this setting is applied to all the objects in the scene.
NOTES
In ray tracing, shadows are cast for surfaces which face away from the light. Thus, one-sided objects that face toward a point being tested for shadowing can shadow that point. Objects culled from the tested point will not shadow.
shadow_switch has no effect on shadowing due to area light sources in radiosity renderings (see surf_light_model), nor does it affect standard Starbase renderings.
ERRORS
Invalid file descriptor.
DEFAULTS
on is 0; no lights cast shadows.
— July 12, 1991