luke hutchinson | 14 Jan 2011 16:14
Picon

Re: Filtering


Hi,

Isn't the main problem the fact that each channel is filtered
separately, rather than the precision used for the filtering ?

    float
    extractValue(float2 pos) {
        float4 temp = tex2D(buffer, pos);
        return (temp.x * 16711680.0 + temp.y * 65280.0 + temp.z * 255.0)
* (1.0 / 16777215.0);
    }

This looks very much like reconstructing a depth value, but the same
issue applies to any 24-bit value stored in 3, 8-bit components.  Say
the filtering was applied just between two texels, (0x00,0xff,0xff) and
(0x01,0x00,0x00).  When interpreted as 24-bit values, there is only a
difference of 1 between them.  But a 50/50 blend between the two will
give something like (0x00,0x75,0x75) depending on the rounding; no where
near the two 24-bit values.

Luke

Gmane