• 2D
  • How to get pixelated shadows ?

Here I have a pretty sharp shadow. I do not want this I am looking for a pixelated shadow. I tried using shaders but they were all for Sprite not Light2D. How can I do this ?

Render at an appropriate resolution and then scale up - the shadow will then also be rendered at that resolution and scaled up.

@Megalomaniak said: Render at an appropriate resolution and then scale up - the shadow will then also be rendered at that resolution and scaled up.

For context, this is achieved by using a low base resolution and using the viewport stretch mode as described in the Multiple resolutions documentation.

Right, that is probably the easiest and in most cases the best way to go about it. Alternatively you can also use a viewport container and a viewport for your game world while rendering the UI, for an example, at a native resolution.

Alright so that fixes the problem but I get another one. When moving diagonally on the game you can see some sort of staircase like effect on the whole screen, and it is really disgusting, any way to fix that ? (128x96 and test is 1024x768) (using viewport mode and keep aspect but I have the problem with all of the aspect mode)

Also I tried to put the wall on the player in a viewport like you said but it made almost all of the game gray because the viewport was blocking it ?

You can try enabling GPU Pixel Snap in Project Settings, but you might have to modify your game so that everything moves in discrete pixels (not floats). Also be sure to enable VSync if you haven't.

GPU Pixel Snap don't change anything and I don't really understand how to uses all of the information I am given.

For the addon resolution: 128x96 Size : 128x96 Test size : 1024x768 Vsync : On GPU Pixel Snap : On Strech mode : 2D Aspect : Ignore My Camera2D's zoom : 1x1

To enforce integer scaling do I have to enable something other than what you sent ? Also what does moving everything in discrete pixels means ? Like I should not uses float at all ? Does that mean not curve no weird movements ?