This was what I had given up. Thanks to Ian Robinson and Protofall and TapamN and more!
Based on:"Practical Implementation of SH Lighting and HDR Rendering on PlayStation 2" GDC 2005
(http://research.tri-ace.com/)
Feature
- Everything is completed on PVR.
- It operates at a maximum of 30 fps.
PVR can only draw 32 * 32. Arrange them in order to create a frame. The drawing order is determined at the time of initialization.
KOS draws from the left side to the right side of the frame. Therefore, you can use the left side, which has already been drawn, as the texture of the polygon on the right side.
1. Render the frame into a 640 * 480 texture.
2. Extract the high-brightness part from the frame.
Reduce to 128 * 96, extract RGB (128-255) pixels by inversion / addition / inversion, then add the same texture to double the color. The RGB (0-255) pixels are complete.
3. Apply Gaussian blur.
Move to the right and use the previous texture. Apply a bilinear filter, shift it by 1 pixel, semi-transparently combine it, and apply a 3 * 3 Gaussian blur.
Reduce this and apply 3 * 3 blur again, and repeat to create three textures of different sizes.
4. Completion of bloom texture.
Make the three textures 128 * 96 size and add and synthesize. Use this for Bloom textures.
5. Tone mapping and final rendering
The color of the first 640 * 480 frame texture is doubled by additive synthesis, and RGB (0-127) is changed to RGB (0-255).
Bloom texture is added and synthesized from above, and it is completed.
Point
- PVR is not good at translucency. Use fewer tiles!
- Use user clips so as not to straddle tiles!
- Since it is not a Twiddled texture, do not perform bilinear filtering as much as possible!
Please, find a better way!