![background image](http://html.mh-extra.com/html/texas-instruments/tvp4020-permedia-2/tvp4020-permedia-2_reference-manual_1097169087.webp)
Graphics Programming
TVP4020
Programmers Reference Manual
78
is LESS and the result is true then the fragment value is less than the
source value. The stencil operation controls the updating of the stencil
buffer, and is dependent on the result of the stencil and depth tests.
The table below shows the stencil functions available:
Mode
Comparison Function
0
Never
1
Less
2
Equal
3
Less or Equal
4
Greater
5
Not Equal
6
Greater or Equal
7
Always
Table 5.9
Stencil Comparison Modes
Some of these comparison modes are effectively redundant as P
ERMEDIA
only uses 1 bit stencil values. They have been included to ease software
compatibility with GLINT and possible future devices.
If the stencil test is enabled then the stencil buffer will be updated
depending on the outcome of
both the stencil and the depth tests (if the
depth test is disabled the depth result is set to pass). Refer to the tables
below and the definition of the StencilMode register in section §5.6.4 to
fully understand their relationship.
Stencil Test
Pass
Fail
Depth Test
Pass
dppass
sfail
Fail
dpfail
sfail
Table 5.10
Possible Update Operations for Stencil Planes
The entries dppass, dpfail and sfail are set to one of the update
operations below, source stencil is the value in the stencil buffer:
Update Method
Mode
Stencil Value
Keep
0
Source stencil
Zero
1
0
Replace
2
Reference stencil
Increment
3
Clamp (Source s 1) to 2
stencil width
- 1
Decrement
4
Clamp (Source stencil -1) to 0
5
~Source stencil
Table 5.11
Stencil Operations
Summary of Contents for TVP4020 PERMEDIA 2
Page 1: ...Texas Instruments TVP4020 PERMEDIA 2 Programmer s Reference Manual Issue 4 ...
Page 284: ...TVP4020 Programmers Reference Manual A Gouraud Shaded Triangle 275 ...
Page 292: ...TVP4020 Programmers Reference Manual Register Tables 283 ...
Page 314: ...TVP4020 Programmers Reference Manual Index 305 ...
Page 315: ...Index TVP4020 Programmers Reference Manual 306 Index ...
Page 323: ...Index TVP4020 Programmers Reference Manual 314 ...