I look at some example code in a book that creates the effect of smoothing jitter, repeatedly rendering the scene (at different offsets) on an off-screen texture, then using this texture to repeatedly draw a quad in the main view with some mixture of the material created.
To accumulate the color "correctly", the code sets the color as follows:
glColor4f(f, f, f, 1);
where f is 1.0/number_of_samplesand then binds the external texture and its rendering.
Since textures come with their own color and alpha data, what is the effect (mathematically and intuitively) that allows you to pre-set the overall “color”?
Thank.
source
share