PDA

View Full Version : Discard and MipMaps



Swiftless
06-10-2006, 05:55 AM
Hi.

I am using the discard function in a pixel shader to remove unwanted pixels.

The only problem is that the scaling of my mipmapped textures blends the edge of my images with the colour I wish to remove.

This leaves a line around my object where the colour I was discarding has blended with the pixels I wanted to keep.

Is there any way to stop this?

zeoverlord
06-10-2006, 01:57 PM
Use alpha testing instead of the method you are currently using.
Color discard allways has this problem and there is no way of fixing it.
The best thing is to use an alpha map instead.

Swiftless
06-10-2006, 08:59 PM
Ok, thanks, I have it working now.

I can't believe it was that simple :D