Jump to content
  • Advertisement
Sign in to follow this  

Distortion on Image Borders

This topic is 1104 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

I'm implementing image processing through HLSL pixel shaders. The code is working except a few details.


I run the Super-xBR HLSL pixel shader on an image and there is image distortion on the right and bottom of the image.



The implementation of the same pixel shader in MediaPlayer .NET (MPDN) doesn't have this problem


Someone suggested that this might have to do with texture addressing mode so I added this code after creating the device.

m_pDevice->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
m_pDevice->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
m_pDevice->SetSamplerState(0, D3DSAMP_ADDRESSW, D3DTADDRESS_CLAMP);

This doesn't help. Any idea how to fix this issue?

Share this post

Link to post
Share on other sites

Maybe it's the DX9 half texel offset giving you grief?




That's taken care of here



Plus other shaders are working fine; I'm only having problem with that one. Most likely because it is using overflow coordinates.

Edited by MysteryX

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!