- Home /
How to maintain sharp lines (pixel-like effect) from small textures on 3D assets
I have bunch of small source textures, 64x64 pixels. Example:
I want this texture to occupy a significant part of the screen, but scaled without any smoothing/anti-aliasing, even though it could cover as much as 640x640 pixels on the device. But I the result I am getting looks like this:
(Note the undesired addition of multiple brown colours - rather than solid blocks)
I am using import settings which have the texture set to Clamp and Point.
The camera has anti-aliasing turned off.
- The camera 'output' has MSAA turned off.
The material uses the Unlit\Texture shader
I'm using URP, but could switch to HDRP.
I don't believe I can use the pixel perfect package, as that is designed with 2D in mind, and I am creating a 3D environment.
The effect I'm going for, is that like a old 1980's 3D game, 'stretched' to big resolution, with no clever sampling to soften the jagged edges.
Answer by Silverlode · Jan 09, 2021 at 11:32 PM
Thanks for the suggestion @tuinal . It didn't make a difference unfortunately. Further experimentation proved that
My source textures were only approximately 64x64 - and once I made them exactly 64x64, the issues were resolved.
Partial improvements could also be gained by changing the resize algorithm from Mitchell to Bilinear and ensuring RGB 24 was the (correct) format.
Your answer
Follow this Question
Related Questions
Camera / Graphic bug with 2D Sprites [Please help me solve this] 4 Answers
How to have part of a material ignore all lighting with Unity 5's Standard Shader 0 Answers
Display high quality Environment 3D Models 0 Answers
dynamic hole in layer / texture / camera 0 Answers
Scissor test/early rejection 2 Answers