Soft flat floor reflections?

Hi,

My 3D engine currently supports flat mirror reflections. Such as floors or a mirror on the wall.

I would like to generate soft reflections (or blurry) for the floor.

Anyone have ideas on how to acheive this effect?

Is it possible to apply a blur filter to the current image buffer on the video card?

Ok, I asked the question to quickly. I found the following OpenGL commands.

glReadPixels
glDrawPixels

Anyone can tell me why I shouldn’t use these methods to read the frame buffer, apply a blur, and then draw it back.

Is this going to be really slow?

Is there another way which is a lot faster?

Yes

Would is be faster to render to a texture, and do the blur as a GLSL shader?

Yep. That would be the plan.

Render reflection to texture.
Blur it in pixel shader.
You could also blend in another texture with blurry alpha for those systems that don’t have pixel shader support.
(Which is an old trick actually and most players don’t stop to check it out :slight_smile:

I would go with the above stuff. . . .and if I remember correctly glReadPixels / glDrawPixels are painfully slow. Applying blur to stuff you have read using glReadPixels will all be done on the CPU which you most definately dont want.