Monogame RenderTarget2d achieve subpixel draw

Hi i’m new there.

I was just trying to create a shadow engine for my 2D game.
I started working with RenderTarget2d to achieve a flat shaw for every ‘solid element’ in my application.
After playing with the code and looking online i managed to reproduce something really close to what i was looking for; but at the same time i stumbled on a really annoying issue.


The RenderTarget2d is correctly rendering the sprites but not for floating point position, it’s just performing a floor (i might be wrong on the math operation here), on the position before drawing.
The resulting effect is a really annoying jittering, is there any way to draw with the rendertarget2d using a subpixel accuracy?

That means you are using point sampling (SamplerState.PointClamp). What you need is something like SamplerState.LinearClamp.