there are no original pictures to download there
i made my own
no scale. pictures are 200200 px and rendered 200200 px
yes I can confirm it. If i draw the pictures with monogame without stencil functions, every alpha pixels are shown as intended. (used photoshop to make the pictures without background)
I have to compare what this one does right and the other wrong.
Oh, i had to tweak the code a little bit (mainly deleted the halfoffset pixels for the alphatest) and deleted the stuff about the key input
Edit: Got another problem:
Is it normal that this stencil distinguish only between alpha 0 (no pixel) and 1 (draw pixel) and nothing in between like 50% alpha (0.5)?
Stencil on that matter has binary behavior, either it will display given pixel or cut it off completely. As you can seen in your case - every pixel on map with value under exact 1.0 is being displayed.
The build-in DualTextureEffect will be a good starting point for something like that.
It depends on what you want to achieve. There are complete tutorials & libraries on 2D lighting if that’s what you are after.
I want to have a movable mask for a texture in my game. For example for blend in effects with a gradient or variable overlay effects. The best sollution for what i Plan is to use texture masks. And i think now pixel shader is the right way… will try during weekend.