Colourization - NEC µPD72257 Preliminary User's Manual

Graphics controllers
Table of Contents

Advertisement

Chapter 8

8.5.9 Colourization

Figure 8-24
240
After a pixel has been found to be part of the geometry, its colour is calculated.
The Ravin Drawing Engine supports a very general colour calculation scheme.
This makes it possible to support several colour modes. It is an interpolation
between two colour registers DRWCOLOR1 and DRWCOLOR2. See below figure
for details. DRWCOLOR1 and DRWCOLOR2 are marked as A, B for more
clearness.
in 32 bit argb
out.a=(B.a-A.a)*in.a+A.a
out.r=(B.r-A.r)*in.r+A.r
out.g=(B.g-A.g)*in.g+A.g
out.b=(B.b-A.b)*in.b+A.b
out 32 bit ARGB
Colourization step, interpolation between the two colour registers A
(DRWCOLOR1) and B (DRWCOLOR2)
This general approach can be used to several different colour modes. These
modes can be applied to any colour or alpha channel of the input individually.
Operation
copy
replace with a constant value v
multiply with a constant value v
Colourize an alpha texture with the RGB value v
Invert a channel
Invert multiply with v
Interpolate between colour v and colour u
A = DRWCOLOR1, B = DRWCOLOR2
Preliminary User's Manual S19203EE1V3UM00
Drawing Engine
A color1 register argb
B color2 register argb
Settings for A and B
A=0, B=0xff
A=v, B=v
A=0, B=v
A.a=0, A.r=B.r, A.g=B.g, A.b=B.b,
B.a=0xff,B.r=v.r, B.g=v.g, B.b=v.b
A=0xff, B=0
A=v, B=0
A=v, B=u

Advertisement

Table of Contents
loading

This manual is also suitable for:

Μpd72256

Table of Contents