]> git.sesse.net Git - movit/commit - effect_chain_test.cpp
Allow storing values in intermediate framebuffers as sqrt(x).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 28 Feb 2016 00:53:55 +0000 (01:53 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 28 Feb 2016 01:02:31 +0000 (02:02 +0100)
commit2d3b64d51be3e8f38a8c224f558de4ceb222e799
tree467ebee94456d6e7f9e23e8b59930e06b05eb209
parent34776d3ed2565ee834405e575bf3bfc7f7933e36
Allow storing values in intermediate framebuffers as sqrt(x).

Together with GL_RGB10_A2, this would seem to be an even better tradeoff for
many chains than GL_SRGB8_ALPHA8 is, as long as you don't need intermediate
alpha. (We verify its accuracy with a unit test.)

This changes the API for specifying intermediate framebuffers, but that API
was never in a release, so it should be fine.

Also document a rather obscure problem where, if you can actually hold on to
non-linear values across a bounce buffer, you don't really want to store them
in sRGB encoding. (The square-root version actually avoids this problem.
I guess we could snoop on the type and do a similar thing if we see it's an
GL_SRGB* encoding, but it seems so obscure that we can ignore it for now.)
effect_chain.cpp
effect_chain.h
effect_chain_test.cpp
footer.frag
test_util.cpp
test_util.h
version.h