By a look at the intermediate targets in renderdoc, the down-scaling phase isn't "preserve energy" uniformly depending on the position. If I draw the same glyph at different (integer) positions, some of the down-scaled versions will look brighter than others. This results in brighter/darker blurs. My guess is that the down-scaling pass isn't sampling exactly between texels everywhere which is why some the down-scaled glyphs look different. The fact sampling isn't playing out exactly the same shouldn't be an issue if the same amount of "energy" (as in brightness) is preserved, but it looks like it isn't the case. we are dividing the size by two and the linear interpolation of the sampler should mean no under-sampling, but the (perceptual)energy preservation really only works if we are in linear space. So I wonder if the fact that we do this in srgb space instead of linear space is the reason the down-scaling perceptually doesn't produce the same amount of brightness depending on the position in the source. That said it's hard to be 100% sure by eyeballing intermediate results in renderdoc without being certain that the latter isn't making wrong assumptions about the color space of the intermediate texture. In general blurring in srgb is wrong. Probably not a big deal if it's consistently wrong, but it if the wrong-ness changes with positions, then it becomes a lot more noticeable.
Bug 1523495 Comment 4 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
By a look at the intermediate targets in renderdoc, the down-scaling phase doesn't "preserve energy" uniformly depending on the position. If I draw the same glyph at different (integer) positions, some of the down-scaled versions will look brighter than others. This results in brighter/darker blurs. My guess is that the down-scaling pass isn't sampling exactly between texels everywhere which is why some the down-scaled glyphs look different. The fact sampling isn't playing out exactly the same shouldn't be an issue if the same amount of "energy" (as in brightness) is preserved, but it looks like it isn't the case. we are dividing the size by two and the linear interpolation of the sampler should mean no under-sampling, but the (perceptual)energy preservation really only works if we are in linear space. So I wonder if the fact that we do this in srgb space instead of linear space is the reason the down-scaling perceptually doesn't produce the same amount of brightness depending on the position in the source. That said it's hard to be 100% sure by eyeballing intermediate results in renderdoc without being certain that the latter isn't making wrong assumptions about the color space of the intermediate texture. In general blurring in srgb is wrong. Probably not a big deal if it's consistently wrong, but it if the wrong-ness changes with positions, then it becomes a lot more noticeable.
By a look at the intermediate targets in renderdoc, the down-scaling phase doesn't "preserve energy" uniformly depending on the position. If I draw the same glyph at different (integer) positions, some of the down-scaled versions will look brighter than others. This results in brighter/darker blurs. My guess is that the down-scaling pass isn't sampling exactly between texels everywhere which is why some the down-scaled glyphs look different. The fact sampling isn't playing out exactly the same shouldn't be an issue if the same amount of "energy" (as in brightness) is preserved, but it looks like it isn't the case. we are dividing the size by two and the linear interpolation of the sampler should mean no under-sampling, but the (perceptual)energy preservation really only works if we are in linear space. So I wonder if the fact that we do this in srgb space instead of linear space is the reason the down-scaling perceptually doesn't produce the same amount of brightness depending on the position in the source. That said it's hard to be 100% sure by eyeballing intermediate results in renderdoc without being certain that the latter isn't making wrong assumptions about the color space of the intermediate texture. In general blurring in srgb is wrong. Probably not a big deal if it's consistently wrong, but if the wrong-ness changes with positions, then it becomes a lot more noticeable.