Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


harshman_chris

Member Since 13 Mar 2009
Offline Last Active Jun 08 2013 11:39 AM

Posts I've Made

In Topic: Motion Blur with FBO

11 April 2013 - 08:09 PM

That very much seems to be the issue, if averaging 4 images that should be different doesn't produce a blurred result. Can you actually somehow verify that the 4 samplers have different textures attached?

 

Yes I use various tools to check this, I believe the issue is because I am using 4 frames that are too close together so the effect is not noticeable.


In Topic: Motion Blur with FBO

11 April 2013 - 02:36 PM

Okay, since you can't actually read from an FBO but only use an FBO to render to a texture and then read that texture, here's the question: do you set up the active textures, bindings and uniforms correctly? How this should go is like this:

 

set active texture to N

bind your texture[N] to GL_TEXTURE_2D

glUniform1i(uniform N location, N)

 

N loops through 1...4, obviously. What this sounds like is you forgetting to call the gluniform1i - all the uniforms samplers are texture unit 0 unless you specify otherwise.

 

And please, do "uniform sampler2D Blur1, Blur2, Blur3, Blur4;" instead of what you do now. And to be extra sure, always set the alpha to something.

 

None of those are the issue, what I need is how to blend the 4 frames together properly so it appears blurred, rather than just making the scene lighter or darker.


In Topic: Motion Blur with FBO

11 April 2013 - 01:00 PM

What do these 4 frames contain?

 

The current frame and the previous three frames


In Topic: Delta Interpolation Issues

04 April 2013 - 01:30 PM

I was going to post more info, but then I solved it. There was an issue with my game that was messing up my delta.


In Topic: Delta Interpolation Issues

04 April 2013 - 12:52 PM

Do you have a fixed vsync? If your desktop is higher end, then make sure you're not running at 120fps. You probably already checked this, but if your delta is higher on your desktop than on your laptop, then there is some inconsistancy other than the speed difference of the processors. Clocks are clocks and (whithin reason) they all click at 1ms intervals. Look at CLOCKS_PER_SEC to be sure. On second thought, what ARE you using to get your Delta?

 

I use QueryPerformanceCounter and QueryPerformanceFrequency and delta is calulated like this:

 

delta = (float)((currentTime.QuadPart-lastTime.QuadPart) / PCFreq);

I am also using OpenGL, and not DirectX

 

I am pretty sure it has to do something with the float values being 'messed up' when they are so small.


PARTNERS