All pastes #270730 Raw Edit

Mine

public text v1 · immutable
·published 2006-12-07 17:47 UTC
rendered paste body
struct fragment
{
        float4 position  : POSITION;
        float4 color0    : COLOR0;
        float2 texcoord0 : TEXCOORD0;
};

struct pixel
{
        float4 color : COLOR;
};

pixel main( fragment IN, uniform sampler2D testTexture, uniform sampler2D checkerTexture )
{
        pixel OUT;

        float4 texelColor0 = tex2D( testTexture, IN.texcoord0 );
        float4 texelColor1 = tex2D( checkerTexture, IN.texcoord0 );

        OUT.color  = texelColor0 * IN.color0;
        OUT.color += texelColor1;

        return OUT;
}