Jump to content

  • Log In with Google      Sign In   
  • Create Account


EndlessDiemention

Member Since 15 Jun 2009
Offline Last Active Nov 29 2012 04:59 AM

Topics I've Started

Theory of FBOs

15 November 2012 - 04:53 AM

Hi!

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?

Game Engine trouble

15 June 2009 - 12:40 PM

Basically, I want to make and engine in C++. However, I also wanted to use windows forms, and the clr as well. This left me tring to use managed direct X, which I got working, but is completely different to normal direct X. Seeing as there aren't many resources on MDX, I then decided to put my engine into a DLL. I need the DLL to either (do both): - Put Direct X in a panel on the forum (I know in the Crysis Sandbox editor they magically do that somehow) - Put Direct X in a new window, using the ancient windows API. I have no idea how to do this. I cant seem to make the DLL popup a window, let alone in a panel on a form. Any help would be much appreciated as I cant continue without fixing this. Thankyou in advance.

PARTNERS