Re: [Paracomp-spec] RFC: Extension PC_COMP_ADD_EXT - an accumulation operator
Brought to you by:
shreekumar
|
From: Randall F. <ran...@co...> - 2008-05-29 23:56:47
|
Hello,
I understand the desire for this, and I think it should
be added as an extension, but it raises the question of a more
general mechanism for this (e.g. programmable operations). The
concern being that as this type of stuff evolved with gfx hw,
it may become obsolete faster here. This can be easily
implemented in CUDA in a more general form outside of the
rendering facility. I'll have to dig up the old PICA spec,
which allowed conceptual, multi-stage compositing that was
run-time compiled into flat operations. It could also be used
to implement these type of extensions as well and perhaps
extend better into programmable HW.
Thanks.
I need to write up the CEI extension sometime and send
it out for folks to look at.
Shree Kumar wrote:
> I'm proposing this extension on behalf of the Technical University of
> Budapest. Their proposal has three parts - an ADD operator, plus
> floating point and intensity datatypes. So I'm splitting their proposal
> into three parts.
>
> Motivation:
>
> Paracomp currently supports two compositing modes - PC_COMP_DEPTH &
> PC_COMP_ALPHA_SORT.
>
> PC_COMP_ALPHA_SORT offers just a single blending mode from the 9x9=81
> modes offered by OpenGL. Other blending modes also have importance in
> particular algorithms. For example, if the material at sample points
> have significant emission and are almost transparent (e.g. fire,
> emission nebulae, astrophysics simulations, etc.), then the contribution
> of sample points can be simply added without any previous depth sort.
> Note that the elimination of the previous depth sort is a significant
> advantage since it can simplify and speed up the implementation
> considerably. Such operation, called accumulation, would be specified by
> glBlendFunc(GL_ONE, GL_ONE) in OpenGL, and could be described by the
> following equation:
>
> (R,G,B,A) = (R1+R2, G1+G2, B1+B2, A2+A2)
>
> Rough Extension Proposal:
>
> Extend the API to include the ADD operation as follows:
>
> 1. pcContextCreateMaster accepts a new value for PC_COMPOSITE_TYPE -
> PC_COMP_ADD_EXT. The accumulation is order independent.
>
> 2. Add a new context property, PC_ALPHA_BEHAVIOUR. This property
> affects the add operator. This property can take two values
>
> a. PC_ALPHA_SEPARATE: Implements glBlendFunc(GL_ONE, GL_ONE).
>
> (Rs, Gs, Bs, As)+(Rd, Gd, Bd, Ad)=(Rs+Rd, Gs+Gd, Bs+Bd, As+Ad)
>
> Where + means saturated addition. This is useful when
> accumulation has to be performed for separate scalar values.
>
> b. PC_ALPHA_PREMULTIPLED: Color values are multiplied by alpha
> value before the compositing operation.
>
> (Rs, Gs, Bs, As)+(Rd, Gd, Bd, Ad)=(As*Rs+Ad*Rd, As*Gs+Ad*Gd,
> As*Bs+Ad*Bd, As*As+Ad*Ad)
>
> Where + means saturated addition. This is useful when more
> complicated compositing model is used with multiple compositing
> contexts. For example an alpha blending context takes the
> output of an intensity accumulation context as its input, or
> vice versa.
>
> 3. pcFrameBegin ignores the "order" parameter if COMPOSITE_TYPE is
> COMP_ADD_EXT, since the operation is order independent.
>
> Comments/questions welcome.
>
> Thanks in advance
> -- Shree
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Paracomp-spec mailing list
> Par...@li...
> https://lists.sourceforge.net/lists/listinfo/paracomp-spec
>
--
rjf.
-------------------------------------------------------------
| Quando omni flunkus moritati |
| Randall Frank ran...@co... |
-------------------------------------------------------------
|