|
From: James W. W. <ja...@wr...> - 2004-09-14 21:23:14
|
Frank Condello <dev...@ch...> wrote: >This blendfunc is used to mimic QD3D's blending. To get a >transparent pixel you need to have an alpha of zero as well as RGB >values that add up to zero (premultiplied alpha). The idea is that >you can get additive blending and normal alpha blending by changing >the art, rather than doing it in code. This is one legacy I'd rather >do without to be honest... > >This is the source of many problems, including what you observed >above (i.e. you can't fade out an ARGB texture reasonably in code). >It also causes the problems with ARGB textures in fog - not that fog >works on _any_ transparent triangles at the moment ;) OK, thanks for the explanation. >IMHO, Quesa really needs an API that allows you to either explicitly >set the blend function for the underling 3D API, or have blend >function "aliases" that are translated for each API - kinda moot at >this point since OpenGL is the only API involved. Either that, or a >new type of Shader that does something similar - I'd love to see a >"MultipassShader" object that can reference one or more texture >shaders and apply them in layers with different blend functions and >UV transformations - that would at least allow Quesa to compete with >other scene graphs on the rendering side of things. The >one-texture-per-triangle limitation grows stale real fast... In the near term, would anyone object if I added a global option for blending function, such as an object property on the renderer? If it is OK, should the property specify 4 values, namely the source and destination blend factors for textures and for vertex colors, or just a single boolean flag indicating whether texture alpha is premultiplied? -- James W. Walker, ScriptPerfection Enterprises, Inc. <http://www.write-brain.com/> |