StretchRect() Discrepancy

Started by
4 comments, last by Endemoniada 12 years, 2 months ago
Hi guys, using a checker pattern I did a test like this:

// shrink
d3dDevice->StretchRect(renderTarget,NULL,auxSurface,NULL,D3DTEXF_LINEAR);

// expand to original size
d3dDevice->StretchRect(auxSurface,NULL,renderTarget,NULL,D3DTEXF_LINEAR);

The checker boxes get smaller and smaller from left to right and top to bottom. The smaller surface is exactly 25% of the original (1280x800 to 320x200).

I plan on shrinking, blurring, then expanding for a bloom effect. Should I be using StretchRect() for that ?

Thanks.
Advertisement


I plan on shrinking, blurring, then expanding for a bloom effect. Should I be using StretchRect() for that ?



No, just use a full screen quad or triangle + a pixel shader.
No, just use a full screen quad or triangle + a pixel shader.[/quote]

I plan on using a pixel shader for the blur. Most of the articles I've read say you should reduce the dimensions of the surface before you do a blur.
Yes, what I meant was that you should render a quad if you want to downscale before doing a blur as opposed to using StretchRect.
Do you mind sharing the "bloom" tutorial? :)

Yes, what I meant was that you should render a quad if you want to downscale before doing a blur as opposed to using StretchRect.


Thank you. If you didn't clear that up for me I would have still been using StretchRect(). Everything works much better with the quads.

This topic is closed to new replies.

Advertisement