I'm trying to get a basic post screen shader system working. When I draw directly to the screen, I get around 300fps when just drawing one quad. When I put on a basic bloom filter, I have several issues.
First, the frame rate drops to around 30-60. So basically, I draw the scene to an FBO, then draw the FBO on a quad onto yet another FBO, whilst shading it. I repeat this 4 times: The first stage collects the full resolution scene image. This is then downscaled and blurred horisontally to another FBO. Next, it's blurred vertically onto another FBO. Finally, the full resolution image and the blurred one are passed to a final fragment shader which composits the two onto a quad on the viewport. I could do it in one go, but I wanted a really thick blur without way too many samples. Further, I intend to extend this system to do more complex things like HDR etc.etc.This is kinda my first shot at OpenGL - I'm using C#/OpenTK for it.
Also, when I downsize the FBO texture it results in Moire Patterns when there are a lot of lines on screen. Can you use mipmaps for FBOs? What do you normally do in this circumstance? Do you draw the scene twice to two differently sized FBOs?
Basically, I'm sure my research has gone terribly wrong somewhere since the framerate drops that much. Am I doing it (basically) right?
EndlessDiementionMember Since 15 Jun 2009
Offline Last Active Nov 29 2012 04:59 AM
- Group Members
- Active Posts 7
- Profile Views 1,300
- Submitted Links 0
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown