[SOLVED] Scale and rotate Texture and maintaining pixelated look.

Hi,

I generated some scaled and rotated textures (the gray ones inside the blue rectangle) and they came out looking way to “good”. What i want is for the textures to “pixelate” to the same/close to the zoom of my camera.

I’m guessing i need some custom shader thingemajig to lower the resolution but problem is i don’t know where to start. Most articles i find focus on other topics.

I followed some basic shader tutorials and i think i grasp the concept. cool stuff. but it only changes colors im guessing i need to change scale in some form.

So my question:
Is a shader the wrong way of doing this? Can i achieve this effect some other way if so: can you explain how.
If shader is the only way… do you know of any beginner/intermediate article or tutorial that gets a texture and lowers the resolution… if that’s a thing! Maybe its called something else in shader land. if so please enlighten me.

Some examples of what i found that i want to do (knidof):

I’m guessing this is right, but i don’t know… its to advanced i don’t know where to start.
http://www.geeks3d.com/20101029/shader-library-pixelation-post-processing-effect-glsl/

Hear is another example of what i want to achieve:

Hey @Gronk! Welcome to the forum :wink:

For pixel art games it’s usually best to render to the native target resolution (e.g. 320x180), then upscale when rendering to the back buffer with point sampling so the pixels aren’t blurred. This is also what’s suggested in the stackexchange post. No need for shaders or anything fancy like that.

In MonoGame that means rendering to a low-resolution RenderTarget2D first, then render that to the backbuffer with SpriteBatch and SamplerState.PointClamp.

Not sure how familiar you are with graphics and the MG/XNA API, so let me know if any of this didn’t make sense :slight_smile:

4 Likes

@Jjagg why thank you!

Rendering textures to something other then the screen never crossed my mind.

This opened pandora’s box and whole range of new questions but i’ll play around and be back for sure :slight_smile:

most importantly my textures are just the right amount of “ugly” now.

For anyone in my situation this helped me somewhat understand how to do this in code.
http://rbwhitaker.wikidot.com/render-to-texture

2 Likes