• Advertisement
Sign in to follow this  

StretchRect() Discrepancy

This topic is 2169 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement