gta_glass_emissivenightPS11.asm
Parallellines0451_GTAIV_EFLC_LogDepth/win32_30_nv8/gta_glass_emissivenight/gta_glass_emissivenightPS11.asm
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.26.952.2844
//
// Parameters:
//
//   sampler2D BumpSampler;
//   sampler2D EnvironmentSampler;
//   sampler2D StippleTexture;
//   sampler2D TextureSampler;
//   float bumpiness;
//   float4 colorize;
//   float4 gDirectionalColour;
//   float4 gDirectionalLight;
//   float4 gFacetCentre;
//   float4 gLightAmbient0;
//   float4 gLightAmbient1;
//   float4 gLightColB;
//   float4 gLightColG;
//   float4 gLightColR;
//   float4 gLightConeOffset;
//   float4 gLightConeOffset2;
//   float4 gLightConeScale;
//   float4 gLightConeScale2;
//   float4 gLightDir2X;
//   float4 gLightDir2Y;
//   float4 gLightDir2Z;
//   float4 gLightDirX;
//   float4 gLightDirY;
//   float4 gLightDirZ;
//   float4 gLightFallOff;
//   float4 gLightPointColB;
//   float4 gLightPointColG;
//   float4 gLightPointColR;
//   float4 gLightPointFallOff;
//   float4 gLightPointPosX;
//   float4 gLightPointPosY;
//   float4 gLightPointPosZ;
//   float4 gLightPosX;
//   float4 gLightPosY;
//   float4 gLightPosZ;
//   row_major float4x4 gShadowMatrix;
//   float4 gShadowParam0123;
//   float4 gShadowParam14151617;
//   float4 gShadowParam18192021;
//   float4 gShadowParam4567;
//   float4 gShadowParam891113;
//   sampler2D gShadowZSamplerDir;
//   row_major float4x4 gViewInverse;
//   float4 globalScalars;
//   float reflectivePower;
//   float specularColorFactor;
//   float specularFactor;
//
//
// Registers:
//
//   Name                 Reg   Size
//   -------------------- ----- ----
//   gViewInverse         c12      4
//   gDirectionalLight    c17      1
//   gDirectionalColour   c18      1
//   gLightPosX           c19      1
//   gLightPosY           c20      1
//   gLightPosZ           c21      1
//   gLightDirX           c22      1
//   gLightDirY           c23      1
//   gLightDirZ           c24      1
//   gLightFallOff        c25      1
//   gLightConeScale      c26      1
//   gLightConeOffset     c27      1
//   gLightColR           c29      1
//   gLightColG           c30      1
//   gLightColB           c31      1
//   gLightPointPosX      c32      1
//   gLightPointPosY      c33      1
//   gLightPointPosZ      c34      1
//   gLightPointColR      c35      1
//   gLightPointFallOff   c36      1
//   gLightAmbient0       c37      1
//   gLightAmbient1       c38      1
//   globalScalars        c39      1
//   colorize             c51      1
//   gShadowParam18192021 c53      1
//   gFacetCentre         c54      1
//   gShadowParam14151617 c56      1
//   gShadowParam0123     c57      1
//   gShadowParam4567     c58      1
//   gShadowParam891113   c59      1
//   gShadowMatrix        c60      4
//   gLightPointColG      c64      1
//   gLightPointColB      c65      1
//   specularFactor       c66      1
//   gLightDir2X          c67      1
//   gLightDir2Y          c68      1
//   gLightDir2Z          c69      1
//   gLightConeScale2     c70      1
//   gLightConeOffset2    c71      1
//   specularColorFactor  c72      1
//   bumpiness            c73      1
//   reflectivePower      c74      1
//   TextureSampler       s0       1
//   BumpSampler          s1       1
//   EnvironmentSampler   s2       1
//   StippleTexture       s10      1
//   gShadowZSamplerDir   s15      1
//

    ps_3_0
    def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 2.9847657290e-43 // 213
    def c127, 0.9999999, 1, 0, 0 // LogDepth constants
    def c0, -0.5, 9.99999975e-006, -0.00999999978, 100
    def c1, -0.5, 0.5, 1.33333337, 9.99999975e-005
    def c2, 1.5, -0.326211989, -0.405809999, 0.0833333358
    def c3, -0.791558981, -0.597710013, -0.100000001, 1.11111116
    def c4, 3.99600005, 4, 0.125, 0.25
    def c5, 0, -1, -0, 1
    def c6, 0.896420002, 0.412458003, -0.321940005, -0.932614982
    def c7, 0.185461, -0.893123984, 0.507430971, 0.0644249991
    def c8, 0.473434001, -0.480026007, 0.519456029, 0.767022014
    def c9, -0.203345001, 0.620715976, 0.962339997, -0.194983006
    def c10, -0.840143979, -0.0735799968, -0.69591397, 0.457136989
    dcl_texcoord v0.xy
    dcl_texcoord1 v1.xyz
    dcl_texcoord3 v2.xyz
    dcl_texcoord4 v3.xyz
    dcl_texcoord5 v4.xyz
    dcl_color v5
    dcl_texcoord6 v6.xyz
    dcl vPos.xy
    dcl_texcoord9 v9
    dcl_2d s0
    dcl_2d s1
    dcl_2d s2
    dcl_2d s10
    dcl_2d s15
    mov_sat r0.x, c39.x
    mul r0.x, r0.x, c4.x
    frc r0.y, r0.x
    mul r0.z, r0.y, c4.y
    frc r0.w, r0.z
    add r1.xy, r0.zxzw, -r0.wyzw
    mul r0.xy, c4.z, vPos
    frc r0.xy, r0_abs
    cmp r0.xy, vPos, r0, -r0
    mul r0.xy, r0, c4.w
    mad r0.xy, r1, c4.w, r0
    mov r0.zw, c5.x
    texldl r0, r0, s10
    cmp r0, -r0.y, c5.y, c5.z
    texkill r0
    texld r0, v0, s1
    add r0.z, -r0.w, c5.w
    add r0.z, -r0.x, r0.z
    cmp r0.xy, r0.z, r0.wyzw, r0
    texld r1, v0, s0
    add r0.zw, r0.xyxy, c0.x
    mul r0.zw, r0, c73.x
    dp2add r0.x, r0, -r0, c5.w
    rsq r0.x, r0.x
    rcp r0.x, r0.x
    mul r2.xyz, r0.z, v3
    mad r0.xyz, v1, r0.x, r2
    mad r0.xyz, r0.w, v4, r0
    add r0.xyz, r0, c0.y
    nrm r2.xyz, r0
    add r0.xyz, c0.y, v2
    nrm r3.xyz, r0
    dp3 r0.x, -r3, r2
    add r0.x, r0.x, r0.x
    mad r0.xyz, r2, -r0.x, -r3
    add r3.xyz, r0, c0.y
    dp3 r0.w, r3, r3
    rsq r0.w, r0.w
    mad r3.xy, r3.xzzw, r0.w, c5.w
    mul r3.xy, r3, c0.x
    texld r3, r3, s2
    mul r3.xyz, r3, c72.x
    mul r3.xyz, r3, c74.x
    mul r1, r1.wxyz, c51.wxyz
    mul r4, r1.yzwx, v5
    mad r0.w, r1.x, v5.w, c0.z
    rcp r1.x, r4.w
    cmp r0.w, r0.w, r1.x, c0.w
    mad r4.xyz, r3, r0.w, r4
    mad_sat r0.w, r2.z, c1.x, c1.y
    mov r1.xyz, c38
    mad r1.xyz, r1, r0.w, c37
    mul r3.xyz, c18.w, c18
    dp3 r0.w, r2, -c17
    add r0.w, r0.w, -c4.w
    mul_sat r0.w, r0.w, c1.z
    dp3_sat r1.w, -c17, r0
    add r1.w, r1.w, c1.w
    mov r2.w, c1.w
    add r2.w, r2.w, c66.x
    pow r3.w, r1.w, r2.w
    mul r5.xyz, c61.xyww, v6.y
    mad r5.xyz, v6.x, c60.xyww, r5
    mad r5.xyz, v6.z, c62.xyww, r5
    add r5.xyz, r5, c63.xyww
    dp3 r1.w, c14, v6
    add r6.xyz, -r1.w, -c54
    cmp r6.yzw, r6.xxyz, c5.w, c5.x
    mov r6.x, c5.w
    dp4 r7.x, r6, c57
    dp4 r7.y, r6, c58
    dp4 r8.x, r6, c59
    dp4 r8.y, r6, c56
    mad r5.xy, r5, r7, r8
    add r6.xyz, c15, -v6
    dp3 r1.w, r6, r6
    rsq r1.w, r1.w
    rcp r1.w, r1.w
    rcp r2.w, c53.w
    mul r2.w, r1.w, r2.w
    mul r2.w, r2.w, r2.w
    mul r2.w, r2.w, c2.x
    mov r6.y, c53.y
    mad r6.xz, r6.y, c2.yyzw, r5.xyyw
    texld r7, r6.xzzw, s15
    add r5.w, r5.z, -r7.x
    cmp r5.w, r5.w, c5.w, c5.x
    mad r6.xz, r6.y, c10.xyyw, r5.xyyw
    texld r7, r6.xzzw, s15
    add r6.x, r5.z, -r7.x
    cmp r6.x, r6.x, c5.w, c5.x
    add r5.w, r5.w, r6.x
    mad r6.xz, r6.y, c10.zyww, r5.xyyw
    texld r7, r6.xzzw, s15
    add r6.x, r5.z, -r7.x
    cmp r6.x, r6.x, c5.w, c5.x
    add r5.w, r5.w, r6.x
    mad r6.xz, r6.y, c9.xyyw, r5.xyyw
    texld r7, r6.xzzw, s15
    add r6.x, r5.z, -r7.x
    cmp r6.x, r6.x, c5.w, c5.x
    add r5.w, r5.w, r6.x
    mad r6.xz, r6.y, c9.zyww, r5.xyyw
    texld r7, r6.xzzw, s15
    add r6.x, r5.z, -r7.x
    cmp r6.x, r6.x, c5.w, c5.x
    add r5.w, r5.w, r6.x
    mad r6.xz, r6.y, c8.xyyw, r5.xyyw
    texld r7, r6.xzzw, s15
    add r6.x, r5.z, -r7.x
    cmp r6.x, r6.x, c5.w, c5.x
    add r5.w, r5.w, r6.x
    mad r6.xz, r6.y, c8.zyww, r5.xyyw
    texld r7, r6.xzzw, s15
    add r6.x, r5.z, -r7.x
    cmp r6.x, r6.x, c5.w, c5.x
    add r5.w, r5.w, r6.x
    mad r6.xz, r6.y, c7.xyyw, r5.xyyw
    texld r7, r6.xzzw, s15
    add r6.x, r5.z, -r7.x
    cmp r6.x, r6.x, c5.w, c5.x
    add r5.w, r5.w, r6.x
    mad r6.xz, r6.y, c7.zyww, r5.xyyw
    texld r7, r6.xzzw, s15
    add r6.x, r5.z, -r7.x
    cmp r6.x, r6.x, c5.w, c5.x
    add r5.w, r5.w, r6.x
    mad r6.xz, r6.y, c6.xyyw, r5.xyyw
    texld r7, r6.xzzw, s15
    add r6.x, r5.z, -r7.x
    cmp r6.x, r6.x, c5.w, c5.x
    add r5.w, r5.w, r6.x
    mad r6.xz, r6.y, c6.zyww, r5.xyyw
    texld r7, r6.xzzw, s15
    add r6.x, r5.z, -r7.x
    cmp r6.x, r6.x, c5.w, c5.x
    add r5.w, r5.w, r6.x
    mad r5.xy, r6.y, c3, r5
    texld r6, r5, s15
    add r5.x, r5.z, -r6.x
    cmp r5.x, r5.x, c5.w, c5.x
    add r5.x, r5.w, r5.x
    mad r2.w, r5.x, c2.w, r2.w
    add r1.w, r1.w, -c53.w
    cmp r5.xy, r1.w, c5.wyzw, c5.xzzw
    add r1.w, r2.w, r5.y
    cmp_sat r1.w, r1.w, r2.w, r5.x
    mul r5.xyz, r3, r3.w
    mul r5.xyz, r1.w, r5
    mul r3.xyz, r3, r0.w
    mul r3.xyz, r1.w, r3
    mad r1.xyz, r1, c39.z, r3
    mov r0.w, c4.w
    mul r0.w, r0.w, c66.x
    add r3, c19, -v6.x
    add r6, c20, -v6.y
    add r7, c21, -v6.z
    mul r8, r3, r3
    mad r8, r6, r6, r8
    mad r8, r7, r7, r8
    add r9, r8, c0.y
    rsq r10.x, r9.x
    rsq r10.y, r9.y
    rsq r10.z, r9.z
    rsq r10.w, r9.w
    mov r1.w, c5.w
    mad r8, r8, -c25, r1.w
    max r9, r8, c5.x
    mul r8, r9, r9
    mad r8, r8, r8, c3.z
    mul r9, r8, c3.w
    cmp r8, r8, r9, c5.x
    mul r9, r2.x, r3
    mad r9, r6, r2.y, r9
    mad r9, r7, r2.z, r9
    mul r8, r8, r9
    mul_sat r8, r10, r8
    mul r9, r3, -c22
    mad r9, r6, -c23, r9
    mad r9, r7, -c24, r9
    mul r9, r10, r9
    mov r11, c26
    mad_sat r9, r9, r11, c27
    mul r8, r8, r9
    mul r3, r0.x, r3
    mad r3, r0.y, r6, r3
    mad r3, r0.z, r7, r3
    mul r3, r10, r3
    log r6.x, r3_abs.x
    log r6.y, r3_abs.y
    log r6.z, r3_abs.z
    log r6.w, r3_abs.w
    mul r3, r0.w, r6
    exp r6.x, r3.x
    exp r6.y, r3.y
    exp r6.z, r3.z
    exp r6.w, r3.w
    mul r3, r8, r6
    dp4 r6.x, c29, r8
    dp4 r6.y, c30, r8
    dp4 r6.z, c31, r8
    dp4 r7.x, c29, r3
    dp4 r7.y, c30, r3
    dp4 r7.z, c31, r3
    add r1.xyz, r1, r6
    mad r3.xyz, r5, c17.w, r7
    add r5, c32, -v6.x
    add r6, c33, -v6.y
    add r7, c34, -v6.z
    mul r8, r5, r5
    mad r8, r6, r6, r8
    mad r8, r7, r7, r8
    add r9, r8, c0.y
    rsq r10.x, r9.x
    rsq r10.y, r9.y
    rsq r10.z, r9.z
    rsq r10.w, r9.w
    mad r8, r8, -c36, r1.w
    max r9, r8, c5.x
    mul r8, r9, r9
    mad r8, r8, r8, c3.z
    mul r9, r8, c3.w
    cmp r8, r8, r9, c5.x
    mul r9, r2.x, r5
    mad r9, r6, r2.y, r9
    mad r2, r7, r2.z, r9
    mul r2, r8, r2
    mul_sat r2, r10, r2
    mul r8, r5, -c67
    mad r8, r6, -c68, r8
    mad r8, r7, -c69, r8
    mul r8, r10, r8
    mov r9, c70
    mad_sat r8, r8, r9, c71
    mul r2, r2, r8
    mul r5, r0.x, r5
    mad r5, r0.y, r6, r5
    mad r5, r0.z, r7, r5
    mul r5, r10, r5
    log r6.x, r5_abs.x
    log r6.y, r5_abs.y
    log r6.z, r5_abs.z
    log r6.w, r5_abs.w
    mul r0, r0.w, r6
    exp r5.x, r0.x
    exp r5.y, r0.y
    exp r5.z, r0.z
    exp r5.w, r0.w
    mul r0, r2, r5
    dp4 r5.x, c35, r2
    dp4 r5.y, c64, r2
    dp4 r5.z, c65, r2
    dp4 r2.x, c35, r0
    dp4 r2.y, c64, r0
    dp4 r2.z, c65, r0
    add r0.xyz, r1, r5
    add r1.xyz, r3, r2
    mov r0.w, c5.w
    mul r0, r4, r0
    mad oC0.xyz, c72.x, r1, r0
    mul oC0.w, r0.w, c39.x
    // ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
    if_ne v9.y, c127.y
      rcp r20.z, c128.x
      min r20.w, v9.w, c128.y
      mul r20.x, r20.w, r20.z
      mul r20.y, c128.y, r20.z
      log r20.x, r20.x
      log r20.y, r20.y
      rcp r20.y, r20.y
      mad r20.z, r20.x, r20.y, -v9.x
    else
      mov r20.x, v9.z
      rcp r20.y, v9.w
      mul r20.z, r20.x, r20.y
    endif
    mov oDepth, r20.z
    // ----------------------------------------------------------------------------------------------------------------------------------------------

// approximately 269 instruction slots used (17 texture, 252 arithmetic)
