All pastes #94647 Raw Edit

Stuff

public text v1 · immutable
#94647 ·published 2006-07-21 12:14 UTC
rendered paste body
technique alphascope
{
        pass p0
        {
                ZEnable = FALSE;
                ZWriteEnable = FALSE;
                CullMode = NONE;
                AlphaBlendEnable = TRUE;
                SrcBlend = SRCALPHA;
                DestBlend = INVSRCALPHA;
                AlphaTestEnable = FALSE;
                AlphaRef = 0;
                AlphaFunc = GREATER;

                VertexShader = compile vs_1_1 vsAlphaScope(viewProjMatrix);

                Sampler[0] = <sampler0>;
                Sampler[1] = <sampler1>;

                PixelShader = asm
                {
                        ps.1.4

                        texcrd r2.rgb, t0        // Get coords
                        texld r1, t1        // Sample Accum light

                        phase

                        texld r0, t0        // Sample diff

                        mul r0.rgb, r0, r1
                        mul r0.a, 1-r2.b, r0.a
                };
        }
}