- // Note that if you do _not_ set this, and do not sample on
- // whole pixels (ie. you request linear filtering), it is undefined
- // whether that filtering happen in linear gamma or not.
- // It _could_ be (for instance in the case where the input is sRGB
- // and your GPU applies gamma expansion before filtering), but you
- // have no such guarantee. For most uses, however, this will be fine.
- virtual bool needs_many_samples() const { return false; }
+ // There are two good reasons why you might want to set this:
+ //
+ // 1. You are sampling more than once from the input,
+ // in which case computing all the previous steps might
+ // be more expensive than going to a memory intermediate.
+ // 2. You rely on previous effects, possibly including gamma
+ // expansion, to happen pre-filtering instead of post-filtering.
+ // (This is only relevant if you actually need the filtering; if
+ // you sample on whole input pixels only, it makes no difference.)
+ //
+ // Note that in some cases, you might get post-filtered gamma expansion
+ // even when setting this option. More specifically, if you are the
+ // first effect in the chain, and the GPU is doing sRGB gamma
+ // expansion, it is undefined (from OpenGL's side) whether expansion
+ // happens pre- or post-filtering. For most uses, however,
+ // either will be fine.
+ virtual bool needs_texture_bounce() const { return false; }