Re: [Algorithms] Filtering
Brought to you by:
vexxed72
From: luke h. <hut...@gm...> - 2011-01-14 15:14:17
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJNMGg+AAoJEPycJhJ2o4QYNkMP/j409k6gKn6d/PfWBVQ/Q3LL Ei8vk+wO08uF/KFbYB5P+d/XwMHwXPpZ9TMbb/V9Q/oYZAekPjhBvbCkklMOSF3T REYGePtu/BM1UUUO+nkkTqkdU8/2R0mqkBy38TOcrlTZ1wNBqIu3gIoHHLCI8aXu gxlyqbEaxUkSzpHHhq6sjPI9l8onUvNxryGst8o7imcUFEIevKADxB2sIYoqZtlb YrXeh4k8gPYnYvLRELJlkYK+6yvI1cRMw03JI8OE+0mcVwKeX6GnMrj7hmjmmImz lC3bTS61E89iXUmxLap46j9wuOGSKmZ5/Bf+QxD6Bs8pk8O2uYsgd34tSjQPNeIg HOQ0AxvIf8VbOjgC61H6hKtveZY2tkwDVp/0dGhkpITVbvzsV8G24v1gMSlVyJV2 nxYDbkmTzHj7jNpiejWLfYcAM4Vnr7Ilv3DgsouIH4zGzN0vk79WRt19fpfeTovc uyUIRMwHMrehIX4rQCDYEF3D9/CvXVOHaz7rJ4TFsXX0yjZ74ReON+cUNHmNT/U5 j8ZGXBmHIr10CMnU7twxp9QZSylfwOmutTzReVwlKQD/7vrZhZVRXIyocUKbGr9c D5ISBiUcCOLGuJg4BXqJfUuSYyiYPPunjy4I16qY2157eE81varKtGE6uuc8Y9CY MBnk133qKbpTWBQ5HhqH =Kwg3 -----END PGP SIGNATURE----- |