Table of Contents Glide Programming Guide


Other Color Combine Options



Download 6.22 Mb.
Page35/106
Date03.02.2023
Size6.22 Mb.
#60547
1   ...   31   32   33   34   35   36   37   38   ...   106
GLIDEPGM

1Other Color Combine Options


The routine grAlphaControlsITRGBLighting() can be used to specify that if the high order bit of atexture is 1, then the constant color set by grConstantColorValue() is used instead of the iterated RGB values. This is useful if a portion of a texture is to appear to be illuminated from behind the surface, instead of by an external light source.
void grAlphaControlsITRGBLighting( FxBool enable )

When enabled, the normal color combine controls for local color (clocal) are overridden, and the most significant bit of texture alpha (atexture) selects between iterated vertex RGB and the constant color set by grConstantColorValue(). By default, this alpha controlled lighting mode is disabled. Table Color and Lighting.4 shows how clocal is determined.



  1. Table Color and Lighting.4 Overriding the local color when the high order bit of atexture is set.

You can get hybrid effect between smooth and flat shading by using grAlphaControlsITRGBLighting() to enable a technique whereby the high order bit of atexture is used to switch clocal between iterated RGB and the constant color. The state table below shows how the clocal value is determined.

When enable is

and the high order bit of atexture is

the local color clocal will be

FXTRUE

0

iterated RGB

FXTRUE

1


Download 6.22 Mb.

Share with your friends:
1   ...   31   32   33   34   35   36   37   38   ...   106




The database is protected by copyright ©ininet.org 2024
send message

    Main page