[MPlayer-users] Request for Bloom effect in Video Output
Каримов Родион
RodionKarimov at yandex.ru
Sat Dec 19 16:08:38 CET 2009
To Reimar Döffinger.
> FBOs are useless by themselves, either you have to copy the data from them
> which is uselessly slow in most implementations or you need support for
I mean GL_EXT_framebuffer_object - you render to such buffer with shader that cuts off colors, say, less than 0,8 and leaves only those, that a bigger. Its colorbuffer, if you don't know, is texture. Then you render with this texture in another FBO with shader that resizes image on x axis 2 times and applies Gaisian blur on x axis. Then you take this new texture and render with it in new FBO and apply the same procedure on y axis. Then you take this texture and texture with dark colors, render them in screen buffer, adding them and applying tone mapping, if needed - but it will work even without it. And it is not slow - it is working in games, where videocard and CPU doing much more work, than when playing film. On playing film videocard almost doing nothing, so this work will not affect performance, even on low level videocard - for example Radeon HD 2400.
> render-to-texture which last I checked was not even remotely "portable"
> (not a long time ago it was actually "you can use it if you use Linux and that
> specific Intel GPU that is too slow to do anything useful with it though").
If you mean P-buffers - they are, as far as I know, - portable, but to implement them is really very difficult process. But I'm not asking to use them, when there is FBO - they are working similarly on Windows and Linux, on all other platforms - also, but I did not checked it.
To Uoti Urpala.
No - to that you are meaning that this effect depends on absolute value of brightness of objects, it depends on their brightness relative to middle level of the scene.
>Wrong, all information about brightness levels exceeding a certain value
is typically lost when converting to the usual [0, 255] integer range (I
think that in this context it's better to explicitly mention that
integer range rather than use the more abstract [0, 1]). That lost
information is exactly what would have been needed for the effect.
You mean clamping to [ 0, 1 ] range - but I mean tone mapping to [ 0, 1 ] range. Tone mapping - if you don't know, it is operator that converts all points from [ 0, max_float ] to [ 0, 1 ] range, so that +infinity is represented by 1, and 0 by 0.
And even if the brightness simply clamped to [ 0, 1 ] range - in games, and films - faster of all - also, it is done so that maximal brightness not exceeds 1. So and with tone mapping and clamping, if it done correctly, relativity of objects brightnesses is preserved.
To Oliver Seitz.
I'm another one time saying - it is not must be enabled all times - of course in multiplication it would be useless and even harmful. And in some authors films, where director by the playing of light and color trying to make some impression - it is also will be harmful. But in some action or triller or sci-fi, where it is simply not done - where director even not thought about it - why not to enable it and increase realism of the scene?
More information about the MPlayer-users
mailing list