-
Interpolation with alpha during texture sampling
My problem is best explained with a picture:

By default OpenGL interpolates all four texture channels, which is why the sampled value gets darker. I'm wondering if there is an automatic way to weigh the interpolated color value based on the alpha. So if the left square is (0,0,0,.25) and the right square is (1,0,0,1), the sampled value between the two texels should be (((0,0,0)*.25 + (1,0,0)*1)/(.25+1), (.25+1)/2) = (.8, 0, 0, .625).
Last edited by Petwoip; 10-14-2012 at 07:59 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules