Some cool shader math stuff that makes blocks out of 0-1 values.

        float x = data.texel.x;
        int a = x * 3;
        a =  a % 3;
        x = (float)a / 3;

        float y = data.texel.y;
        int b = y * 3;
        b =  b % 3;
        y = (float)b / 3;
     
        float xy = x + y;
     
     
        float4 texelColor = float4(xy.xxx,1);
     
        return texelColor;



Comments