Re: Question with regards to componentAlpha

Thomas Roell <[email protected]> Sat, 14 Sep 2002 13:34:12 -0600 (MDT)
Newsgroups gmane.comp.xfree86.render
Message-ID <[email protected]>
In your message of 14 September 2002 you write:

> 
> Around 15 o'clock on Sep 13, Thomas Roell wrote:
> 
> > (VII)	dest.b = (source.b * mask.b) * 1 + dest.b * (1 - source.a * mask.b)
> > 	dest.g = (source.g * mask.g) * 1 + dest.g * (1 - source.a * mask.g)
> > 	dest.r = (source.r * mask.r) * 1 + dest.r * (1 - source.a * mask.r)
> > 	dest.a = (source.a * mask.a) * 1 + dest.a * (1 - source.a * mask.a)	
> This is the intended function.  If you find the spec wording unclear, 
> please suggest changes.

I you suggest using explicite formulas like I used in my example would
clarify things quite a bit.

> > Even worse, unless "source" or "mask" is a constant it is not implementable
> > in hardware reasonable (unless 2 passes are used).
> 
> I'm sorry your hardware doesn't permit acceleration of this function.  
> Some does.

Well, let's put it this way, "my hardware" is a wide range of hardware
(you might want to check out www.xig.com so see what I am referring
to). I am not aware of any piece of hardware that would allow me to do
this type of operation in a single pass directly. I would love to know
very much to which HW platform you are referring to.

> In a brief conversation with Tom Duff, it turns out that many lighting 
> effects use this function, in particular it is use to emulate stained 
> glass in Renderman (as seen in Young Sherlock Holmes).

I'm not to much arguing the usefullness of the operation, although it
seems to be overcomplicated and does not mach very well current
hardware. It is just very frustrating for somebody to actually
implement the extension using the spec as a reference and then running
into convoluted cases like this where IMHO the spec contradicts
itself.

- Thomas
-- 
	     Thomas Roell   /\	       Das Reh sprint hoch,
	     Xi Graphics   /  \/\ _     das Reh springt weit,
	 [email protected]	  /   /	 \ \	 was soll es tun,
			 / Oelch! \ \     es hat ja Zeit.