Game Development Community

How to disable anti-aliasing for especific sprites

by Diego Santos Leao - GameBlox Studio · in Torque X 2D · 11/30/2009 (7:12 pm) · 5 replies

I need to disable anti-aliasing for some of my sprites, but I can't find the "switch"... Does anyone have any idea where do I disable it?

This is needed especially to prevent some straight lines of my sprites from disappearing or merging.

#1
11/30/2009 (7:36 pm)
Unfortunately, there isn't any 'switch' built into TX for this.

The solution depends what you mean by anti-aliasing. If you mean the fuzziness that TX gives sprites even when they aren't scaled then that is due to the default shader being one better suited to 3D than 2D. You can modify the default shader to address that (SimpleEffect.fx I think, but I'm not sure off the top of my head). This was referred to in a post not to long ago on the forum. This would make all your art sharper.

Alternatively you may need to implement a custom shader that uses point sampling. There have been recent posts in the forum on that too.

(sorry about no links to the posts - too busy to go find them right now)
#2
11/30/2009 (8:57 pm)
Nice Duncan, it is that fuzziness I'm talking about.
I'll go search for those posts, right now! Thanks
#3
02/18/2010 (3:40 pm)
Any luck with this?
#4
02/18/2010 (4:18 pm)
I believe this will work: http://www.torquepowered.com/community/forums/viewthread/77031

I stopped working with TX around the time of that last post, so I haven't tested the solution.
#5
02/18/2010 (4:27 pm)
I only have the xna creators club version so I don't have access to the shaders or source code :[

Thanks anyway.