Trautner Mask Generation AA

Hi All

I am making a project where I am using Trautner to detect motion in many fields of my camera image.

I have made a mask generator where I use grids rendered using the constant shader. I have modified the constant shader to do point sampling to avoid resampled pixels with new values.

I use homography to adjust for the areas where I want to detect motion.

I have disabled AA on all renderers in this chain to also avoid new Grey scale values

I am also generating a texture to put on the grids making a “step ladder” image with 8 rows of 30 fields generating a texture with 240 fields, each with its own Grey scale value that is not completely black.

The output of the last renderer is being saved into a bmp file and loaded into Trautner.

my problem is that somewhere along the way some new values are invented even though I have disabled AA as well as changed the constant shader to point resampling.

I have included a screenshot of how the final mask look it is magnified and I have circled the areas whith the “new” vaues.

I have also included the Constant shader in case it might be where it behaves strange.

Thanks in advance

Sune

Edit: the attached shaders are identical, I made an upload mistake.

Constant-mag-point.fx (3.6 kB)
adjust_example.jpg (7.9 kB)