a puzzling problem with sprites

Started by
7 comments, last by Real World 21 years, 7 months ago
I am using two polygons and texturing it with a bmp i created in photoshop. When I load it in my program though the detail completely goes and it looks terrible. The original is http://www.maidenfans.com/splash2.jpg and in my program it looks like this: http://www.maidenfans.com/splash.jpg This might be a difficult question to answer with just these details so if you need any more info just ask. I'm really puzzled because its not being scaled at all Cheers Dave Planetblaze.com - www.planetblaze.com - As METAL as it gets! [edited by - Real World on September 9, 2002 6:04:42 PM]
Advertisement
Try to resize the original image to a multiple of 64 (like 512x512 or 256x256)

This may help...
tried that it made it look worse :S
What is the original 16bit, 32bit, 24bit??
You might want to make sure that bilinear filtering (or any other kind of filtering) is off, or set to point/nearest. (The exact details will depend on your API).

Oh, and if that''s meant to be Blaze in the middle, he needs to be fatter.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]
Oh sorry, forgot to mention its DirectX 8.1 What should I be looking for if thats the case as most of that type of code I''ve got from tutorials.
And Blaze has lost a lot of weight since he left Maiden
I don''t have the DX8 SDK installed, so I don''t know the exact functions. But look for lines with ''SetRenderState'' in, especially anything resembling ''MAGFILTER'' and ''MINFILTER''.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]
	if(FAILED(m_pD3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,  TRUE)))	{		LogError("SetRenderState: D3DRS_ALPHABLENDENABLE Failed");		return false;	}	else	{		//Set how the texture should be blended (use alpha)		m_pD3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);		m_pD3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);		LogInfo("SetRenderState: D3DRS_ALPHABLENDENABLE OK");	} 

Thats the only renderstate I have in there thats active. I don''t THINK theres any filtering. I tried adding some and it 1/4 the frame rate so i took it off.
Some RenderStates are On automaticly.

This topic is closed to new replies.

Advertisement