Jump to content
  • Advertisement
Sign in to follow this  
Endemoniada

Post Processing Causing Terrible Swimming

This topic is 1145 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, I was very excited to come up with a nice post-processing effect that looks great when nothing is moving, but when things move (characters or camera) I see terrible swimming. I double-checked everything and it looks exactly like it does when I do the same operations in Photoshop.

 

I feel like the swimming can't be fixed.

 

I'm downsampling to half screen size, post processing my effect, then upsampling back to screen size. Even when I don't downsample I get swimming, it's minor but the effect is a lot less pronounced too.

 

Any help or ideas would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement

Not quite sure as you haven't shown any pictures or videos of the effect you're describing so I can only guess that you're talking about downsample/upsampling artifacts ?

If so I'd try to down or upsample using something more "sophisticated" than just linear upscale. Try using a gaussian blur for example.

Share this post


Link to post
Share on other sites

Hi, thanks for trying to help.

 

I'm having problems down/up sampling. I made a post about it but no one replied.

 

If I want to sample down to exactly half size should I set my sampler to D3D11_FILTER_MIN_MAG_MIP_POINT and do the work myself in the shader ? What works best for a half size downsample ? And should I use the exact same shader for upsampling ? Is there an optimal way of doing it ?

 

I'll try gaussian blur and do some more research.

 

Thanks a lot.

Edited by Endemoniada

Share this post


Link to post
Share on other sites

No you should never use point sampling for image resizing. If that's what you're doing right now than that is most likely your issue. Try to at least sample using a linear filter.

For example what I did for my Depth of Field is use a gaussian blur and write to a half size target because I got a smoother transition between blurred and unblurred pixels.

Might even be better to use some kind of cubic filter but I settled for this for the time being.

You need to make sure that you do this correctly when a separable blur is used.

 

pseudocode:

// Do the horizontal pass using a target that is (ScreenWidth / 2, ScreenHeight)
RenderTarget *OutputHalfWidthTarget = GetTarget(FORMAT_RGBA16, screenWidth / 2, screenHeight);
DoPostProcess(InputFullResTarget, OutputHalfWidthTarget, gaussian_horizontal_shader);

// Do the vertical pass using a target that is (ScreenWidth / 2, ScreenHeight / 2)
RenderTarget *OutputHalfResTarget = GetTarget(FORMAT_RGBA16, screenWidth / 2, screenHeight / 2);
DoPostProcess(OutputHalfWidthTarget, OutputHalfResTarget, gaussian_vertical_shader);


Edited by lipsryme

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!