Pixel Blending

Blitz3D Forums/Blitz3D Programming/Pixel Blending

(tu) ENAY(Posted 2005) [#1]
Hi,

When texturing, is it possible to remove the blending effect?
For example if I have a 2x2 texture is there anyway to have 4 rectangles (4 individual pixels) when I zoom in, like if I'd zoomed into a picture on MS Paint or will the pixels always be blended together?

I've tried changing the texture filters but unfortunately my tiles look really blurry.


GfK(Posted 2005) [#2]
Only way you can sort of get around it is to use a minimum tilesize of 32x32. Filtering is still there, but its less obvious.

I think John Pickford asked this very same question not so long ago...


BlitzSupport(Posted 2005) [#3]
Right enough, I'd quite like to see the actual pixels in some cases too, if possible. Example for Mark:

Graphics3D 640, 480, 0, 2

ClearTextureFilters

image = CreateSprite ()
tex = CreateTexture (2, 2, 1 + 4 + 16 + 32)

SetBuffer TextureBuffer (tex)
Color 255, 255, 255
Rect 0, 0, 1, 1
Rect 1, 1, 1, 1
Color 255, 0, 0
Rect 0, 1, 1, 1
Rect 1, 0, 1, 1
SetBuffer BackBuffer ()

EntityTexture image, tex

cam = CreateCamera ()
MoveEntity cam, 0, 0, -1

Repeat

	Cls
	
	RenderWorld
	
	Flip
	
Until KeyHit (1)

End



(tu) ENAY(Posted 2005) [#4]
> Only way you can sort of get around it
> is to use a minimum tilesize of 32x32.

I've tried sharpening my pixels (a lot) so as to reduce the blur but the main problem is it doesn't look right with tileable textures.

I have to use 30x30 to get rid of a slight glow on the neighbouring pixels. You probably know what I'm talking about and even then the blurring at the edges doesn't seem to look right. You can see the joins. I actually thought adding non blurring pixels would be quite easy to add as there is a command in OpenGL to turn this effect on and off. Dunno about DirectX though.

Funny how this effect seems less apparent if you have masked pixels. Try drawing an image twice but with the neighbouring pixels masked out. Like this:- (On a 3x3)

Ie

X X X
X X
X X X

X X
X X X
X X