gta_vehicle_lightsemissivePS5.asm
Parallellines0451_GTAIV_EFLC_LogDepth/win32_30_nv8/gta_vehicle_lightsemissive/gta_vehicle_lightsemissivePS5.asm
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.26.952.2844
//
// Parameters:
//
//   sampler2D DirtSampler;
//   sampler2D SpecSampler;
//   sampler2D TextureSampler;
//   float3 dirtColor;
//   float dirtLevel;
//   float4 globalScalars;
//   float3 matDiffuseColor;
//   float4 matDiffuseColor2;
//   float reflectivePowerED;
//   float3 specMapIntMask;
//   float4 stencil;
//
//
// Registers:
//
//   Name              Reg   Size
//   ----------------- ----- ----
//   globalScalars     c39      1
//   stencil           c52      1
//   matDiffuseColor   c66      1
//   matDiffuseColor2  c72      1
//   dirtLevel         c73      1
//   dirtColor         c74      1
//   specMapIntMask    c75      1
//   reflectivePowerED c76      1
//   TextureSampler    s0       1
//   DirtSampler       s1       1
//   SpecSampler       s2       1
//

    ps_3_0
    def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 9.4307386649e-43 // 673
    def c127, 0.9999999, 1, 0, 0 // LogDepth constants
    def c0, 9.99999975e-006, 0.224999994, 1, 0
    def c1, 0.5, 0.37109375, 0, 0
    dcl_texcoord v0.xy
    dcl_texcoord1 v1.xyz
    dcl_color v2.w
    dcl_texcoord7 v3.xy
    dcl_texcoord9 v9
    dcl_2d s0
    dcl_2d s1
    dcl_2d s2
    texld r0, v0, s0
    add r1.xyz, c0.x, v1
    dp3 r1.w, r1, r1
    rsq r1.w, r1.w
    texld r2, v0, s2
    mul r2.w, r2.w, c76.x
    mul r2.w, r2.w, c72.w
    dp3 r2.x, r2, c75
    mul r2.x, r2.x, c76.x
    mul r2.x, r2.x, c0.y
    min r3.x, r2.x, c0.z
    mul r4.xyz, r0, c66
    mov r0.x, r0.w
    mul r0.x, r0.x, v2.w
    mov r0.zw, c0
    if_lt -c73.x, r0.w
      texld r5, v3, s1
      mul r0.y, r5.x, c73.x
      mad r6.x, r5.x, -c73.x, r0.z
      lrp r6.yzw, r0.y, c74.xxyz, r4.xxyz
      mad r7, r4.xxyz, c0.wzzz, c0.zwww
      cmp r4, -r5.x, r7.yzwx, r6.yzwx
    else
      mov r4.w, c0.z
    endif
    mul r0.y, r3.x, r4.w
    mul r0.y, r0.y, c72.w
    mad r1.xyz, r1, r1.w, c0.z
    mul oC1.xyz, r1, c1.x
    mul oC2.x, r0.y, c1.x
    mul r0.y, r2.w, c1.y
    rsq r0.y, r0.y
    rcp oC2.y, r0.y
    mul r4.w, r0.x, c39.x
    mov oC0, r4
    mov oC1.w, r4.w
    mov oC2.z, c39.z
    mov oC2.w, r4.w
    mul oC3, r0.zwww, c52.x
    // ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
    if_ne v9.y, c127.y
      rcp r20.z, c128.x
      mul r20.x, v9.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
    else
      mov r20.x, v9.z
      rcp r20.y, v9.w
    endif
    mul oDepth, r20.x, r20.y
    // ----------------------------------------------------------------------------------------------------------------------------------------------

// approximately 41 instruction slots used (3 texture, 38 arithmetic)
