// EMERGENT GAME TECHNOLOGIES PROPRIETARY INFORMATION // // This software is supplied under the terms of a license agreement or // nondisclosure agreement with Emergent Game Technologies and may not // be copied or disclosed except in accordance with the terms of that // agreement. // // Copyright (c) 1996-2007 Emergent Game Technologies. // All Rights Reserved. // // Emergent Game Technologies, Chapel Hill, North Carolina 27517 // http://www.emergent.net ps_1_1 def c1, 1.0f, 0.0f, 0.0f, 1.0f tex t0 ;Sample normal map texcoord t1 ;Load up D1 mov r0, c0 ;Output diffuse color. ;Get (1- N.V) ^ 2 for alpha. dp3 r1.rgba, t0_bx2, t1_bx2 add r1.rgba, c1.a, -r1.rgba ;mul r1.a, r1.a, r1.a mul r0.a, r1.a, r1.a