Game Development Community

Point Filtering on Sprites?

by Nick Gravelyn · in Torque X 2D · 10/08/2008 (2:31 pm) · 3 replies

I'm reposting this hoping that I can find someone who can help. Is there a way to enable point filtering on my 2D graphics when using TorqueX and the TorqueX Builder? I'm currently trying to use TorqueX to work on a retro-inspired, pixelated game. Part of that is using point filtering on my sprites when scaling them up. Is there a way to enable this in TorqueX?

Nick Gravelyn
Microsoft XNA MVP

#1
12/09/2008 (10:35 am)
If I recall, earlier in the forums there was a post about this (The search wont help). I believe they said you could change one of the shaders to use Point filtering instead of bilinear. Not 100% sure, I will see if I can find the thread.
#2
12/09/2008 (11:48 am)
I can offer you this issue
#3
12/25/2008 (12:43 am)
If you don't have the source (TorqueX Pro) it's a little tricky, but the tutorial I wrote for creating custom materials goes through the necessary steps. It's not too friendly with TXB, unfortunately, as it will overwrite any custom material settings:

http://tdn.garagegames.com/wiki/TorqueX/CustomMaterials

If you do have the source, simply open Torque/data/effects/SimpleEffect.fx and change the Linears to POINTs. This will play nicely with TXB.