Sign in to follow this  

Image Rendering Quality Is Low?

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

Various artifacts in render In this simple screenshot I am trying to render an image with an alpha channel (have tried both PNG and DDS), but on both formats there are various artifacts, such as on the lower right hand side of "P" in "Pong" (distortions along the edges) and on other various places. These artifacts are then amplified (meaning enlarged) when the application runs fullscreen 640x480. I've been tweeking with many things, such as texture filters and such, but I cant find the source of the problem. Are textures just like this when they have an alpha channel, or is there a way to increase the quality of the render? What factors lead to this problem? (I know its not compression, I've tried all that) Oh, and im using C++ DirectX 8.1 (Using the DirectX9 December 2005 sdk) Here's the way im loading the texure:
hResult = D3DXCreateTextureFromFileEx(m_pD3DDevice, "Data\\gfx\\ttl\\logo.dat",
		D3DX_DEFAULT, D3DX_DEFAULT, 5, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, D3DX_DEFAULT,
		D3DX_DEFAULT, 0, NULL, NULL, &m_pLogo);
	if (FAILED(hResult))
	{
		MessageBox(m_hWnd, "Failed to load Image Surface",
			"DirectX Error", MB_OK);
		strcpy(m_szErrorMsg, "InitIntro()");
		return hResult;
	}

Any errors? Thanks!!!!

Share this post


Link to post
Share on other sites
Thanks for the suggestion!

But then an increase in data size would be another factor. I have the texture mapped on a 1:1 pixel ratio, so I dont think there should be those kind of artifacts....


hmmm?

Share this post


Link to post
Share on other sites
Here's the original Logo for comparison:



Its a png with an alpha channel, so thats why it has a grey background in IE.

You can really see the artifacts on the "g", especially on the left and right edges.

Share this post


Link to post
Share on other sites
Thanks for the Link!. I took a look at it and went through most of the MSDN archives earlier and couldnt find any applicable algorithms. It just teaches the concept but not the method. I tried changing the filtering to Point, but it seemed worse than using D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER...

Any other suggestions? XDD;;

Share this post


Link to post
Share on other sites
[edit] too slow.
Ok, sorry, that was a lame version :)

Heres the newer version. Sorry about that :).

Another thing that just popped to mind is the power of two issue. If your texture isn't a power of two, DX might be resizing it to be acceptable in size.

As a test, I'd recommend you use your image software to make the image width and length a power of two (16, 32, 64, 128, 256, 512, 1024, 2048 - just avoiding misunderstandings [lol]).
This might help solve quality problems.

Share this post


Link to post
Share on other sites

This topic is 4377 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this