aboutsummaryrefslogtreecommitdiff
path: root/disassembly/dwmcore_2164_10.asm
blob: bb6a25349ef69bc613870638fc456dc04f76ed3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.25.950.2675
//
//   using 3Dmigoto v1.3.16 on Wed Feb 09 18:55:48 2022
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SampleTextureFromInterpolatorUV1_Sampler    sampler      NA          NA    0        1
// SampleTextureFromInterpolatorUV2_Sampler    sampler      NA          NA    1        1
// SampleTextureFromInterpolatorUV1_Sampler    texture  float4          2d    0        1
// SampleTextureFromInterpolatorUV2_Sampler    texture  float4          2d    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// TEXCOORD                 0   xyzw        1     NONE   float
// TEXCOORD                 1   xy          2     NONE   float   xy
// TEXCOORD                 2     zw        2     NONE   float     zw
// TEXCOORD                 3   xyzw        3     NONE   float      w
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
//
// Sampler/Resource to DX9 shader sampler mappings:
//
// Target Sampler Source Sampler  Source Resource
// -------------- --------------- ----------------
// s0             s0              t0
// s1             s1              t1
//
//
// Level9 shader bytecode:
//
    ps_2_0
    def c0, 0.0404499993, 0.0773993805, 0.0549999997, 0.947867274
    def c1, 2.4000001, 0, 0, 0
    dcl t1
    dcl t2
    dcl_2d s0
    dcl_2d s1
    texld r0, t1, s0
    rcp r1.w, r0.w
    mad r1.x, r0.x, r1.w, c0.z
    mul r1.x, r1.x, c0.w
    pow r2.w, r1.x, c1.x
    mul r1.xyz, r0, r1.w
    mul r1.x, r1.x, c0.y
    mad r2.x, r0.x, -r1.w, c0.x
    cmp r2.x, r2.x, r1.x, r2.w
    mad r2.w, r0.y, r1.w, c0.z
    mul r2.w, r2.w, c0.w
    pow r1.x, r2.w, c1.x
    mad r2.w, r0.y, -r1.w, c0.x
    mul r1.y, r1.y, c0.y
    mul r1.z, r1.z, c0.y
    cmp r2.y, r2.w, r1.y, r1.x
    mad r2.w, r0.z, r1.w, c0.z
    mad r1.x, r0.z, -r1.w, c0.x
    mul r2.w, r2.w, c0.w
    pow r1.y, r2.w, c1.x
    cmp r2.z, r1.x, r1.z, r1.y
    mul r1.xyz, r0.w, r2
    cmp r0.xyz, -r0.w, r0, r1
    mov r1.xy, t1.wzyx
    texld r1, r1, s1
    mul r0, r0, r1.w
    mul r0.w, r0.w, t2.w
    mov oC0, r0

// approximately 34 instruction slots used (2 texture, 32 arithmetic)
ps_4_0
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps linear v2.xy
dcl_input_ps linear v2.zw
dcl_input_ps linear v3.w
dcl_output o0.xyzw
dcl_temps 4
sample r0.xyzw, v2.xyxx, t0.xyzw, s0
lt r1.x, l(0.000000), r0.w
if_nz r1.x
  div r1.xyz, r0.xyzx, r0.wwww
  ge r2.xyz, l(0.040450, 0.040450, 0.040450, 0.000000), r1.xyzx
  mul r3.xyz, r1.xyzx, l(0.0773993805, 0.0773993805, 0.0773993805, 0.000000)
  add r1.xyz, r1.xyzx, l(0.055000, 0.055000, 0.055000, 0.000000)
  mul r1.xyz, r1.xyzx, l(0.947867274, 0.947867274, 0.947867274, 0.000000)
  log r1.xyz, r1.xyzx
  mul r1.xyz, r1.xyzx, l(2.400000, 2.400000, 2.400000, 0.000000)
  exp r1.xyz, r1.xyzx
  movc r1.xyz, r2.xyzx, r3.xyzx, r1.xyzx
  mul r0.xyz, r0.wwww, r1.xyzx
endif
sample r1.xyzw, v2.zwzz, t1.xyzw, s1
mul r0.xyzw, r0.xyzw, r1.wwww
mul o0.w, r0.w, v3.w
mov o0.xyz, r0.xyzx
ret
// Approximately 19 instruction slots used