|
From: Frank C <li...@si...> - 2004-06-04 07:25:47
|
On 2-Jun-04, at 2:15 PM, Joseph J. Strout wrote: > 2. Color/alpha modulation on textured geometry. Hmmm... There's a "TEMPORARY FIX" in ir_geom_trimesh_initialise that removes colour and transparency information from all trimeshes - specifically it notes: // If we are using a texture, pretend the vertices are opaque white. // This is to make it so that a textured TriMesh is affected by lighting, // but not by the color of the geometry. Now the question is; what is this supposed to fix? If this code is removed, colour and transparency blends with textures (as they do in the tribuffer path) which is a desirable effect IMHO... > QD3D does this when using the null shader; we should probably do the > same (and perhaps consider an object property later that extends this > behavior to phong/lambert-shaded objects). Removing the "fix" above results in opposite behaviour to QD3D however - lit objects modulate colours, unlit objects don't - but this is due by the rather lazy way Quesa "disables" lighting on objects affected by null shaders. i.e. it doesn't, but instead uses the GL_REPLACE blend mode. So what should be done here? This bug can basically be resolved by removing the "TEMPORARY FIX", but it won't match QD3D's behaviour - or - it can be left as is, and actually disable lights when rendering objects with a null shader while still modulating colours to match QD3D. The tribuffer path would need a similar fix to fully comply in this case. Personally I'd like to see colours modulated _all_ the time - QD3D be damned! ;) Frank. |