#include "ScreenEffect.hlsli" // .rgba is composited everywhere. const float4 Fill; // .x above 0 adds the position being drawn to the color, so a test can read it back. const float4 ShowPosition; const float2 NotAFloat4; float4 ScreenEffectPixel(float2 position) { float4 shown = float4(position, 0.0, 0.0) * step(0.5, ShowPosition.x); return Fill + shown + float4(0.0, 0.0, NotAFloat4.x, 0.0); }