librw/src/d3d/shaders/default_all_VS.h

510 lines
16 KiB
C
Raw Normal View History

#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
// fxc /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh
2020-04-20 19:18:28 +02:00
// default_all_VS.h default_VS.hlsl
//
//
// Parameters:
//
// float4 ambientLight;
// float4x4 combinedMat;
// int4 firstLight;
2020-04-20 19:18:28 +02:00
// float4 fogData;
//
// struct
// {
// float4 color;
// float4 position;
// float4 direction;
//
// } lights[8];
//
// float4 matCol;
// float3x3 normalMat;
// int numDirLights;
// int numPointLights;
// int numSpotLights;
// float4 surfProps;
// float4x4 worldMat;
//
//
// Registers:
//
// Name Reg Size
// -------------- ----- ----
// numDirLights i0 1
// numPointLights i1 1
// numSpotLights i2 1
// combinedMat c0 4
// worldMat c4 4
// normalMat c8 3
// matCol c12 1
// surfProps c13 1
2020-04-20 19:18:28 +02:00
// fogData c14 1
// ambientLight c15 1
// firstLight c16 1
// lights c17 24
//
vs_2_0
def c11, 3, 0, 0, 0
2020-04-20 19:18:28 +02:00
def c41, 0, -0, -1, 1
dcl_position v0
dcl_normal v1
dcl_texcoord v2
dcl_color v3
mul r0, v0.y, c1
mad r0, c0, v0.x, r0
mad r0, c2, v0.z, r0
2020-04-20 19:18:28 +02:00
mad r0, c3, v0.w, r0
mov oPos, r0
mul r0.xyz, v0.y, c5
mad r0.xyz, c4, v0.x, r0
mad r0.xyz, c6, v0.z, r0
mad r0.xyz, c7, v0.w, r0
mul r1.xyz, v1.y, c9
mad r1.xyz, c8, v1.x, r1
mad r1.xyz, c10, v1.z, r1
2020-04-20 19:18:28 +02:00
mov r2.xw, c41
slt r1.w, r2.x, c13.w
add r3, v3, c41.yyyz
mad r3, r1.w, r3, c41.xxxw
mov r2.x, c13.x
2020-04-20 19:18:28 +02:00
mad r2.xyz, c15, r2.x, r3
mov r4.xyz, r2
2020-04-20 19:18:28 +02:00
mov r1.w, c41.x
rep i0
2020-04-20 19:18:28 +02:00
add r4.w, r1.w, c16.x
mul r4.w, r4.w, c11.x
mova a0.x, r4.w
dp3 r4.w, r1, -c19[a0.x]
max r4.w, r4.w, c41.x
mul r5.xyz, r4.w, c17[a0.x]
mad r4.xyz, r5, c13.z, r4
2020-04-20 19:18:28 +02:00
add r1.w, r1.w, c41.w
endrep
mov r2.xyz, r4
2020-04-20 19:18:28 +02:00
mov r1.w, c41.x
rep i1
2020-04-20 19:18:28 +02:00
add r4.w, r1.w, c16.y
mul r4.w, r4.w, c11.x
mova a0.x, r4.w
add r5.xyz, r0, -c18[a0.x]
dp3 r4.w, r5, r5
rsq r4.w, r4.w
mul r5.xyz, r4.w, r5
dp3 r5.x, r1, -r5
max r5.x, r5.x, c41.x
mul r5.xyz, r5.x, c17[a0.x]
rcp r4.w, r4.w
rcp r5.w, c17[a0.x].w
mad r4.w, r4.w, -r5.w, c41.w
max r4.w, r4.w, c41.x
mul r5.xyz, r4.w, r5
mad r2.xyz, r5, c13.z, r2
2020-04-20 19:18:28 +02:00
add r1.w, r1.w, c41.w
endrep
mov r3.xyz, r2
2020-04-20 19:18:28 +02:00
mov r1.w, c41.x
rep i2
2020-04-20 19:18:28 +02:00
add r4.x, r1.w, c16.z
mul r4.x, r4.x, c11.x
mova a0.x, r4.x
add r4.xyz, r0, -c18[a0.x]
dp3 r4.w, r4, r4
rsq r4.w, r4.w
mul r4.xyz, r4.w, r4
dp3 r5.x, r1, -r4
dp3 r4.x, r4, c19[a0.x]
max r4.y, r5.x, c41.x
add r4.x, r4.x, c18[a0.x].w
add r4.z, r2.w, c18[a0.x].w
rcp r4.z, r4.z
mul r4.x, r4.z, r4.x
2020-04-20 19:18:28 +02:00
slt r4.z, r4.x, c41.x
mad r4.y, r4.z, -r4.y, r4.y
2020-04-20 19:18:28 +02:00
max r4.x, r4.x, c19[a0.x].w
mul r4.x, r4.x, r4.y
2020-04-20 19:18:28 +02:00
mul r4.xyz, r4.x, c17[a0.x]
rcp r4.w, r4.w
rcp r5.x, c17[a0.x].w
mad r4.w, r4.w, -r5.x, c41.w
max r4.w, r4.w, c41.x
mul r4.xyz, r4.w, r4
mad r3.xyz, r4, c13.z, r3
2020-04-20 19:18:28 +02:00
add r1.w, r1.w, c41.w
endrep
2020-04-20 19:18:28 +02:00
max r1, r3, c41.x
min r1, r1, c41.w
mul oD0, r1, c12
add r0.x, r0.w, -c14.y
mul r0.x, r0.x, c14.z
max r0.x, r0.x, c14.w
min oT0.z, r0.x, c41.w
mov oT0.xy, v2
2020-04-20 19:18:28 +02:00
// approximately 98 instruction slots used
#endif
const BYTE g_vs20_main[] =
{
0, 2, 254, 255, 254, 255,
2020-04-20 19:18:28 +02:00
158, 0, 67, 84, 65, 66,
28, 0, 0, 0, 67, 2,
0, 0, 0, 2, 254, 255,
2020-04-20 19:18:28 +02:00
12, 0, 0, 0, 28, 0,
0, 0, 0, 1, 0, 0,
2020-04-20 19:18:28 +02:00
60, 2, 0, 0, 12, 1,
0, 0, 2, 0, 15, 0,
1, 0, 62, 0, 28, 1,
0, 0, 0, 0, 0, 0,
2020-04-20 19:18:28 +02:00
44, 1, 0, 0, 2, 0,
0, 0, 4, 0, 2, 0,
2020-04-20 19:18:28 +02:00
56, 1, 0, 0, 0, 0,
0, 0, 72, 1, 0, 0,
2, 0, 16, 0, 1, 0,
66, 0, 84, 1, 0, 0,
0, 0, 0, 0, 100, 1,
0, 0, 2, 0, 14, 0,
1, 0, 58, 0, 28, 1,
0, 0, 0, 0, 0, 0,
2020-04-20 19:18:28 +02:00
108, 1, 0, 0, 2, 0,
17, 0, 24, 0, 70, 0,
184, 1, 0, 0, 0, 0,
0, 0, 200, 1, 0, 0,
2, 0, 12, 0, 1, 0,
50, 0, 28, 1, 0, 0,
0, 0, 0, 0, 207, 1,
0, 0, 2, 0, 8, 0,
3, 0, 34, 0, 220, 1,
0, 0, 0, 0, 0, 0,
2020-04-20 19:18:28 +02:00
236, 1, 0, 0, 1, 0,
0, 0, 1, 0, 2, 0,
252, 1, 0, 0, 0, 0,
0, 0, 12, 2, 0, 0,
1, 0, 1, 0, 1, 0,
6, 0, 252, 1, 0, 0,
0, 0, 0, 0, 27, 2,
0, 0, 1, 0, 2, 0,
1, 0, 10, 0, 252, 1,
0, 0, 0, 0, 0, 0,
2020-04-20 19:18:28 +02:00
41, 2, 0, 0, 2, 0,
13, 0, 1, 0, 54, 0,
28, 1, 0, 0, 0, 0,
0, 0, 51, 2, 0, 0,
2, 0, 4, 0, 4, 0,
18, 0, 56, 1, 0, 0,
0, 0, 0, 0, 97, 109,
98, 105, 101, 110, 116, 76,
105, 103, 104, 116, 0, 171,
171, 171, 1, 0, 3, 0,
1, 0, 4, 0, 1, 0,
0, 0, 0, 0, 0, 0,
99, 111, 109, 98, 105, 110,
101, 100, 77, 97, 116, 0,
3, 0, 3, 0, 4, 0,
4, 0, 1, 0, 0, 0,
2020-04-20 19:18:28 +02:00
0, 0, 0, 0, 102, 105,
114, 115, 116, 76, 105, 103,
104, 116, 0, 171, 1, 0,
2, 0, 1, 0, 4, 0,
1, 0, 0, 0, 0, 0,
2020-04-20 19:18:28 +02:00
0, 0, 102, 111, 103, 68,
97, 116, 97, 0, 108, 105,
103, 104, 116, 115, 0, 99,
111, 108, 111, 114, 0, 171,
171, 171, 1, 0, 3, 0,
1, 0, 4, 0, 1, 0,
0, 0, 0, 0, 0, 0,
2020-04-20 19:18:28 +02:00
112, 111, 115, 105, 116, 105,
111, 110, 0, 100, 105, 114,
101, 99, 116, 105, 111, 110,
0, 171, 115, 1, 0, 0,
124, 1, 0, 0, 140, 1,
0, 0, 124, 1, 0, 0,
149, 1, 0, 0, 124, 1,
0, 0, 5, 0, 0, 0,
1, 0, 12, 0, 8, 0,
3, 0, 160, 1, 0, 0,
109, 97, 116, 67, 111, 108,
0, 110, 111, 114, 109, 97,
108, 77, 97, 116, 0, 171,
171, 171, 3, 0, 3, 0,
3, 0, 3, 0, 1, 0,
0, 0, 0, 0, 0, 0,
110, 117, 109, 68, 105, 114,
76, 105, 103, 104, 116, 115,
0, 171, 171, 171, 0, 0,
2, 0, 1, 0, 1, 0,
1, 0, 0, 0, 0, 0,
2020-04-20 19:18:28 +02:00
0, 0, 110, 117, 109, 80,
111, 105, 110, 116, 76, 105,
103, 104, 116, 115, 0, 110,
117, 109, 83, 112, 111, 116,
76, 105, 103, 104, 116, 115,
2020-04-20 19:18:28 +02:00
0, 115, 117, 114, 102, 80,
114, 111, 112, 115, 0, 119,
111, 114, 108, 100, 77, 97,
116, 0, 118, 115, 95, 50,
95, 48, 0, 77, 105, 99,
114, 111, 115, 111, 102, 116,
32, 40, 82, 41, 32, 72,
76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67,
111, 109, 112, 105, 108, 101,
114, 32, 57, 46, 50, 57,
46, 57, 53, 50, 46, 51,
49, 49, 49, 0, 81, 0,
0, 5, 11, 0, 15, 160,
0, 0, 64, 64, 0, 0,
0, 0, 0, 0, 0, 0,
2020-04-20 19:18:28 +02:00
0, 0, 0, 0, 81, 0,
0, 5, 41, 0, 15, 160,
0, 0, 0, 0, 0, 0,
2020-04-20 19:18:28 +02:00
0, 128, 0, 0, 128, 191,
0, 0, 128, 63, 31, 0,
0, 2, 0, 0, 0, 128,
0, 0, 15, 144, 31, 0,
0, 2, 3, 0, 0, 128,
1, 0, 15, 144, 31, 0,
0, 2, 5, 0, 0, 128,
2, 0, 15, 144, 31, 0,
0, 2, 10, 0, 0, 128,
3, 0, 15, 144, 5, 0,
0, 3, 0, 0, 15, 128,
0, 0, 85, 144, 1, 0,
228, 160, 4, 0, 0, 4,
2020-04-20 19:18:28 +02:00
0, 0, 15, 128, 0, 0,
228, 160, 0, 0, 0, 144,
0, 0, 228, 128, 4, 0,
2020-04-20 19:18:28 +02:00
0, 4, 0, 0, 15, 128,
2, 0, 228, 160, 0, 0,
170, 144, 0, 0, 228, 128,
4, 0, 0, 4, 0, 0,
2020-04-20 19:18:28 +02:00
15, 128, 3, 0, 228, 160,
0, 0, 255, 144, 0, 0,
2020-04-20 19:18:28 +02:00
228, 128, 1, 0, 0, 2,
0, 0, 15, 192, 0, 0,
228, 128, 5, 0, 0, 3,
2020-04-20 19:18:28 +02:00
0, 0, 7, 128, 0, 0,
85, 144, 5, 0, 228, 160,
4, 0, 0, 4, 0, 0,
7, 128, 4, 0, 228, 160,
0, 0, 0, 144, 0, 0,
228, 128, 4, 0, 0, 4,
2020-04-20 19:18:28 +02:00
0, 0, 7, 128, 6, 0,
228, 160, 0, 0, 170, 144,
0, 0, 228, 128, 4, 0,
0, 4, 0, 0, 7, 128,
7, 0, 228, 160, 0, 0,
255, 144, 0, 0, 228, 128,
5, 0, 0, 3, 1, 0,
7, 128, 1, 0, 85, 144,
9, 0, 228, 160, 4, 0,
0, 4, 1, 0, 7, 128,
8, 0, 228, 160, 1, 0,
0, 144, 1, 0, 228, 128,
4, 0, 0, 4, 1, 0,
7, 128, 10, 0, 228, 160,
1, 0, 170, 144, 1, 0,
228, 128, 1, 0, 0, 2,
2020-04-20 19:18:28 +02:00
2, 0, 9, 128, 41, 0,
228, 160, 12, 0, 0, 3,
1, 0, 8, 128, 2, 0,
0, 128, 13, 0, 255, 160,
2, 0, 0, 3, 3, 0,
15, 128, 3, 0, 228, 144,
41, 0, 149, 160, 4, 0,
0, 4, 3, 0, 15, 128,
1, 0, 255, 128, 3, 0,
228, 128, 41, 0, 192, 160,
1, 0, 0, 2, 2, 0,
1, 128, 13, 0, 0, 160,
4, 0, 0, 4, 2, 0,
7, 128, 15, 0, 228, 160,
2, 0, 0, 128, 3, 0,
228, 128, 1, 0, 0, 2,
4, 0, 7, 128, 2, 0,
228, 128, 1, 0, 0, 2,
1, 0, 8, 128, 41, 0,
0, 160, 38, 0, 0, 1,
2020-04-20 19:18:28 +02:00
0, 0, 228, 240, 2, 0,
0, 3, 4, 0, 8, 128,
1, 0, 255, 128, 16, 0,
0, 160, 5, 0, 0, 3,
4, 0, 8, 128, 4, 0,
255, 128, 11, 0, 0, 160,
46, 0, 0, 2, 0, 0,
2020-04-20 19:18:28 +02:00
1, 176, 4, 0, 255, 128,
8, 0, 0, 4, 4, 0,
8, 128, 1, 0, 228, 128,
19, 32, 228, 161, 0, 0,
0, 176, 11, 0, 0, 3,
4, 0, 8, 128, 4, 0,
2020-04-20 19:18:28 +02:00
255, 128, 41, 0, 0, 160,
5, 0, 0, 4, 5, 0,
7, 128, 4, 0, 255, 128,
2020-04-20 19:18:28 +02:00
17, 32, 228, 160, 0, 0,
0, 176, 4, 0, 0, 4,
4, 0, 7, 128, 5, 0,
228, 128, 13, 0, 170, 160,
4, 0, 228, 128, 2, 0,
0, 3, 1, 0, 8, 128,
2020-04-20 19:18:28 +02:00
1, 0, 255, 128, 41, 0,
255, 160, 39, 0, 0, 0,
1, 0, 0, 2, 2, 0,
7, 128, 4, 0, 228, 128,
1, 0, 0, 2, 1, 0,
8, 128, 41, 0, 0, 160,
38, 0, 0, 1, 1, 0,
228, 240, 2, 0, 0, 3,
4, 0, 8, 128, 1, 0,
255, 128, 16, 0, 85, 160,
5, 0, 0, 3, 4, 0,
2020-04-20 19:18:28 +02:00
8, 128, 4, 0, 255, 128,
11, 0, 0, 160, 46, 0,
0, 2, 0, 0, 1, 176,
4, 0, 255, 128, 2, 0,
0, 4, 5, 0, 7, 128,
0, 0, 228, 128, 18, 32,
228, 161, 0, 0, 0, 176,
8, 0, 0, 3, 4, 0,
8, 128, 5, 0, 228, 128,
5, 0, 228, 128, 7, 0,
0, 2, 4, 0, 8, 128,
4, 0, 255, 128, 5, 0,
0, 3, 5, 0, 7, 128,
4, 0, 255, 128, 5, 0,
228, 128, 8, 0, 0, 3,
5, 0, 1, 128, 1, 0,
228, 128, 5, 0, 228, 129,
11, 0, 0, 3, 5, 0,
1, 128, 5, 0, 0, 128,
41, 0, 0, 160, 5, 0,
0, 4, 5, 0, 7, 128,
5, 0, 0, 128, 17, 32,
228, 160, 0, 0, 0, 176,
2020-04-20 19:18:28 +02:00
6, 0, 0, 2, 4, 0,
8, 128, 4, 0, 255, 128,
6, 0, 0, 3, 5, 0,
8, 128, 17, 32, 255, 160,
0, 0, 0, 176, 4, 0,
2020-04-20 19:18:28 +02:00
0, 4, 4, 0, 8, 128,
4, 0, 255, 128, 5, 0,
255, 129, 41, 0, 255, 160,
11, 0, 0, 3, 4, 0,
8, 128, 4, 0, 255, 128,
41, 0, 0, 160, 5, 0,
0, 3, 5, 0, 7, 128,
4, 0, 255, 128, 5, 0,
228, 128, 4, 0, 0, 4,
2020-04-20 19:18:28 +02:00
2, 0, 7, 128, 5, 0,
228, 128, 13, 0, 170, 160,
2020-04-20 19:18:28 +02:00
2, 0, 228, 128, 2, 0,
0, 3, 1, 0, 8, 128,
1, 0, 255, 128, 41, 0,
255, 160, 39, 0, 0, 0,
2020-04-20 19:18:28 +02:00
1, 0, 0, 2, 3, 0,
7, 128, 2, 0, 228, 128,
1, 0, 0, 2, 1, 0,
8, 128, 41, 0, 0, 160,
38, 0, 0, 1, 2, 0,
228, 240, 2, 0, 0, 3,
4, 0, 1, 128, 1, 0,
255, 128, 16, 0, 170, 160,
5, 0, 0, 3, 4, 0,
1, 128, 4, 0, 0, 128,
11, 0, 0, 160, 46, 0,
0, 2, 0, 0, 1, 176,
4, 0, 0, 128, 2, 0,
0, 4, 4, 0, 7, 128,
0, 0, 228, 128, 18, 32,
228, 161, 0, 0, 0, 176,
8, 0, 0, 3, 4, 0,
8, 128, 4, 0, 228, 128,
4, 0, 228, 128, 7, 0,
0, 2, 4, 0, 8, 128,
4, 0, 255, 128, 5, 0,
0, 3, 4, 0, 7, 128,
4, 0, 255, 128, 4, 0,
228, 128, 8, 0, 0, 3,
5, 0, 1, 128, 1, 0,
228, 128, 4, 0, 228, 129,
8, 0, 0, 4, 4, 0,
1, 128, 4, 0, 228, 128,
19, 32, 228, 160, 0, 0,
0, 176, 11, 0, 0, 3,
4, 0, 2, 128, 5, 0,
0, 128, 41, 0, 0, 160,
2, 0, 0, 4, 4, 0,
1, 128, 4, 0, 0, 128,
18, 32, 255, 160, 0, 0,
0, 176, 2, 0, 0, 4,
4, 0, 4, 128, 2, 0,
255, 128, 18, 32, 255, 160,
0, 0, 0, 176, 6, 0,
0, 2, 4, 0, 4, 128,
4, 0, 170, 128, 5, 0,
0, 3, 4, 0, 1, 128,
4, 0, 170, 128, 4, 0,
0, 128, 12, 0, 0, 3,
4, 0, 4, 128, 4, 0,
0, 128, 41, 0, 0, 160,
4, 0, 0, 4, 4, 0,
2, 128, 4, 0, 170, 128,
4, 0, 85, 129, 4, 0,
85, 128, 11, 0, 0, 4,
4, 0, 1, 128, 4, 0,
0, 128, 19, 32, 255, 160,
0, 0, 0, 176, 5, 0,
0, 3, 4, 0, 1, 128,
4, 0, 0, 128, 4, 0,
85, 128, 5, 0, 0, 4,
4, 0, 7, 128, 4, 0,
0, 128, 17, 32, 228, 160,
0, 0, 0, 176, 6, 0,
0, 2, 4, 0, 8, 128,
4, 0, 255, 128, 6, 0,
0, 3, 5, 0, 1, 128,
17, 32, 255, 160, 0, 0,
0, 176, 4, 0, 0, 4,
4, 0, 8, 128, 4, 0,
255, 128, 5, 0, 0, 129,
41, 0, 255, 160, 11, 0,
0, 3, 4, 0, 8, 128,
4, 0, 255, 128, 41, 0,
0, 160, 5, 0, 0, 3,
4, 0, 7, 128, 4, 0,
255, 128, 4, 0, 228, 128,
4, 0, 0, 4, 3, 0,
7, 128, 4, 0, 228, 128,
13, 0, 170, 160, 3, 0,
228, 128, 2, 0, 0, 3,
1, 0, 8, 128, 1, 0,
255, 128, 41, 0, 255, 160,
39, 0, 0, 0, 11, 0,
0, 3, 1, 0, 15, 128,
3, 0, 228, 128, 41, 0,
0, 160, 10, 0, 0, 3,
1, 0, 15, 128, 1, 0,
228, 128, 41, 0, 255, 160,
5, 0, 0, 3, 0, 0,
15, 208, 1, 0, 228, 128,
12, 0, 228, 160, 2, 0,
0, 3, 0, 0, 1, 128,
0, 0, 255, 128, 14, 0,
85, 161, 5, 0, 0, 3,
0, 0, 1, 128, 0, 0,
0, 128, 14, 0, 170, 160,
11, 0, 0, 3, 0, 0,
2020-04-20 19:18:28 +02:00
1, 128, 0, 0, 0, 128,
14, 0, 255, 160, 10, 0,
0, 3, 0, 0, 4, 224,
0, 0, 0, 128, 41, 0,
255, 160, 1, 0, 0, 2,
0, 0, 3, 224, 2, 0,
228, 144, 255, 255, 0, 0
};