Difference between revisions of "Tony Hawk's Pro Skater 2x"

From xboxdevwiki
Jump to: navigation, search
(Improved formatting and added shader information dumped by LukeUsher)
Line 1: Line 1:
 
{{Game}}
 
{{Game}}
== Demo ==
 
  
There was a demo released for ??? on ???.
+
== Shaders ==
 +
 
 +
These shaders have been disassembled.
 +
Any comment was added manually and does not come from the game files.
 +
 
 +
=== blackskin.xvu ===
 +
 
 +
<pre>
 +
xvs.1.1
 +
add r2.x, c32.z, -v1.x
 +
dph r3.x, v0, c0
 +
dph r3.y, v0, c1
 +
dph r3.z, v0, c2
 +
dph r4.x, v0, c3
 +
dph r4.y, v0, c4
 +
dph r4.z, v0, c5
 +
mul r5.xyz, r3.xyz, v1.x
 +
mad r6.xyz, r4.xyz, r2.x, r5.xyz
 +
dph oPos.x, r6, c21
 +
dph oPos.y, r6, c22
 +
dph oPos.z, r6, c23
 +
dph oPos.w, r6, c24
 +
mul oPos.xyz, r12, c-38
 +
+rcc r1.x, r12.w
 +
mad oPos.xyz, r12, r1.x, c-37
 +
</pre>
 +
 
 +
=== cloth.xvu ===
 +
 
 +
<pre>
 +
xvs.1.1
 +
mov r2.w, c48.x
 +
mul r3.w, r2.w, c80.z
 +
mad r4.xyz, c80.x, v0.xyz, r3.w
 +
add r5.x, c32.z, -v1.x
 +
dph r6.x, v0, c0
 +
+exp r1.y, r4
 +
dph r6.y, v0, c1
 +
mul r1.x, r1.y, r1.y
 +
mul r1.z, r1.x, r1.y
 +
dp3 r7.x, r1.xyz, c36
 +
dph r6.z, v0, c2
 +
+exp r1.y, r4.y
 +
dph r8.x, v0, c3
 +
mul r1.x, r1.y, r1.y
 +
mul r1.z, r1.x, r1.y
 +
dp3 r7.y, r1.xyz, c36
 +
dph r8.y, v0, c4
 +
+exp r1.y, r4.z
 +
dph r8.z, v0, c5
 +
mul r1.x, r1.y, r1.y
 +
mul r1.z, r1.x, r1.y
 +
dp3 r7.z, r1.xyz, c36
 +
mul r9.xyz, r6.xyz, v1.x
 +
mad r10.xyz, r8.xyz, r5.x, r9.xyz
 +
mul r11.w, v3.y, c80.y
 +
mul r0.w, r11.w, c92.w
 +
mad r2.xyz, r7.xyz, r0.w, r10.xyz
 +
mad r3.xyz, -c92.xyz, v3.z, r2.xyz
 +
dp3 r4.x, v2, c0
 +
dp3 r4.y, v2, c1
 +
dp3 r4.z, v2, c2
 +
dp3 r6.x, v2, c3
 +
dp3 r6.y, v2, c4
 +
dp3 r6.z, v2, c5
 +
mul r7.xyz, r4.xyz, v1.x
 +
mad r8.xyz, r6.xyz, r5.x, r7.xyz
 +
dph oPos.x, r3, c21
 +
dph oPos.y, r3, c22
 +
dph oPos.z, r3, c23
 +
dph oPos.w, r3, c24
 +
dp3 r8.w, r8.xyz, r8.xyz
 +
dph oT0.x, v9, c9
 +
mov r9, c58
 +
+rsq r1.w, r8.w
 +
dph oT0.y, v9, c10
 +
mul r10.xyz, r8.xyz, r1.w
 +
dp3 r11.x, r10, -c56
 +
dp3 r11.y, r10, -c57
 +
dph oFog.x, r3, c24
 +
max r0.xy, r11.xy, c32.x
 +
mad r2, r0.x, c59, r9
 +
mad r3, r0.y, c60, r2
 +
mul oPos.xyz, r12, c-38
 +
+rcc r1.x, r12.w
 +
mul oD0, r3, c90
 +
mad oPos.xyz, r12, r1.x, c-37
 +
</pre>
 +
 
 +
=== geom.xvu ===
 +
 
 +
<pre>
 +
xvs.1.1
 +
add r0.xyz, v0.xyz, c91.xyz
 +
mov oD0, v3
 +
dph oPos.x, r0, c21
 +
dph oPos.y, r0, c22
 +
dph oPos.z, r0, c23
 +
dph oPos.w, r0, c24
 +
dph oFog.x, r0, c24
 +
mov oT0.xy, v9
 +
mul oT1.xy, v9, c91.w
 +
mul oPos.xyz, r12, c-38
 +
+rcc r1.x, r12.w
 +
mad oPos.xyz, r12, r1.x, c-37
 +
</pre>
 +
 
 +
=== grass.xvu ===
 +
 
 +
<pre>
 +
xvs.1.1
 +
add r0.xyz, v0, c91
 +
mov oD0, v3
 +
dph oPos.x, r0, c21
 +
dph oPos.y, r0, c22
 +
dph oPos.z, r0, c23
 +
dph oPos.w, r0, c24
 +
dph oFog.x, r0, c24
 +
mul oT0.xy, v9, c32.w
 +
mul oPos.xyz, r12, c-38
 +
+rcc r1.x, r12.w
 +
mad oPos.xyz, r12, r1.x, c-37
 +
</pre>
 +
 
 +
=== projectorlight.xvu ===
 +
 
 +
<pre>
 +
xvs.1.1
 +
dph r2.x, v0, c0
 +
dph r2.y, v0, c1
 +
dph r2.z, v0, c2
 +
dp3 r3.x, v2, c92
 +
dph oPos.x, r2, c21
 +
dph oPos.y, r2, c22
 +
dph oPos.z, r2, c23
 +
dph oPos.w, r2, c24
 +
mad oD0.xyz, r3.x, c32.y, c32.y
 +
dph r4.x, r2, c6
 +
dph r4.y, r2, c7
 +
dph r4.z, r2, c8
 +
mul oPos.xyz, r12, c-38
 +
+rcc r1.x, r12.w
 +
dph r5.w, r4, c12
 +
dph r7.y, r4, c10
 +
dph r7.x, r4, c9
 +
+rcp r1.w, r5.w
 +
dph oT1.x, r4, c13
 +
max r6.w, r1.w, -r1.w
 +
mul oT0.xy, r7.xy, r6.w
 +
mad oPos.xyz, r12, r1.x, c-37
 +
</pre>
 +
 
 +
=== projectorshadow.xvu ===
 +
 
 +
<pre>
 +
xvs.1.1
 +
dph r2.x, v0, c0
 +
dph r2.y, v0, c1
 +
dph r2.z, v0, c2
 +
dp3 r3.x, v2, c92
 +
dph oPos.x, r2, c21
 +
dph oPos.y, r2, c22
 +
dph oPos.z, r2, c23
 +
dph oPos.w, r2, c24
 +
mad oD1.xyz, -r3.x, c32.y, c32.y
 +
dph r4.x, r2, c6
 +
dph r4.y, r2, c7
 +
dph r4.z, r2, c8
 +
mul oPos.xyz, r12, c-38
 +
+rcc r1.x, r12.w
 +
dph r5.x, r4, c9
 +
dph r5.y, r4, c10
 +
dph oT1.x, r4, c11
 +
mul oT0.xy, r5.xy, c33
 +
mad oPos.xyz, r12, r1.x, c-37
 +
</pre>
 +
 
 +
=== projectorskin.xvu ===
 +
 
 +
<pre>
 +
xvs.1.1
 +
add r2.x, c32.z, -v1.x
 +
dp3 r3.x, v2, c0
 +
dp3 r3.y, v2, c1
 +
dp3 r3.z, v2, c2
 +
dp3 r4.x, v2, c3
 +
dp3 r4.y, v2, c4
 +
dp3 r4.z, v2, c5
 +
mul r5.xyz, r3.xyz, v1.x
 +
mad r6.xyz, r4.xyz, r2.x, r5.xyz
 +
dph r7.x, v0, c0
 +
dph r7.y, v0, c1
 +
dph r7.z, v0, c2
 +
dph r8.x, v0, c3
 +
dph r8.y, v0, c4
 +
dph r8.z, v0, c5
 +
mul r9.xyz, r7.xyz, v1.x
 +
mad r10.xyz, r8.xyz, r2.x, r9.xyz
 +
dp3 r11.w, r6.xyz, r6.xyz
 +
dph oPos.y, r10, c22
 +
dph oPos.x, r10, c21
 +
+rsq r1.w, r11.w
 +
dph oPos.z, r10, c23
 +
mul r0.xyz, r6.xyz, r1.w
 +
dp3 r2.x, r0.xyz, c92
 +
dph oPos.w, r10, c24
 +
mad oD0.xyz, r2.x, c32.y, c32.y
 +
dph r3.x, r10, c6
 +
dph r3.y, r10, c7
 +
dph r3.z, r10, c8
 +
mul oPos.xyz, r12, c-38
 +
+rcc r1.x, r12.w
 +
dph r4.w, r3, c12
 +
dph r6.y, r3, c10
 +
dph r6.x, r3, c9
 +
+rcp r1.w, r4.w
 +
dph oT1.x, r3, c13
 +
max r5.w, r1.w, -r1.w
 +
mul oT0.xy, r6.xy, r5.w
 +
mad oPos.xyz, r12, r1.x, c-37
 +
</pre>
  
=== Rendering in the Demo ===
+
=== skin.xvu ===
  
This is a rundown of how the scene is being rendered in the THPS2X Demo version
+
<pre>
 +
xvs.1.1
 +
add r2.x, c32.z, -v1.x
 +
dp3 r3.x, v2, c0
 +
dp3 r3.y, v2, c1
 +
dp3 r3.z, v2, c2
 +
dp3 r4.x, v2, c3
 +
dp3 r4.y, v2, c4
 +
dp3 r4.z, v2, c5
 +
mul r5.xyz, r3.xyz, v1.x
 +
mad r6.xyz, r4.xyz, r2.x, r5.xyz
 +
dph r7.x, v0, c0
 +
dph r7.y, v0, c1
 +
dph r7.z, v0, c2
 +
dph r8.x, v0, c3
 +
dph r8.y, v0, c4
 +
dph r8.z, v0, c5
 +
mul r9.xyz, r7.xyz, v1.x
 +
mad r10.xyz, r8.xyz, r2.x, r9.xyz
 +
dp3 r11.w, r6.xyz, r6.xyz
 +
dph oPos.y, r10, c22
 +
dph oPos.x, r10, c21
 +
+rsq r1.w, r11.w
 +
dph oPos.z, r10, c23
 +
mul r0.xyz, r6.xyz, r1.w
 +
dph oPos.w, r10, c24
 +
dph oFog.x, r10, c24
 +
mov r2, c58
 +
dp3 r3.x, r0, -c56
 +
dp3 r3.y, r0, -c57
 +
dph oT0.x, v9, c9
 +
max r4.xy, r3.xy, c32.x
 +
mad r5, r4.x, c59, r2
 +
mad r6, r4.y, c60, r5
 +
dph oT0.y, v9, c10
 +
mul oD0, r6, c90
 +
mul oPos.xyz, r12, c-38
 +
+rcc r1.x, r12.w
 +
mad oPos.xyz, r12, r1.x, c-37
 +
</pre>
  
==== World ====
+
=== wiggle.xvu ===
==== Skater ====
 
  
Shader:
+
<pre>
 +
xvs.1.1
 +
dph r2.x, v0, c0
 +
dph r2.y, v0, c1
 +
dph r2.z, v0, c2
 +
mov r3.xy, c48.x
 +
+mov oT0.xy, v9
 +
dp3 r4.x, r2, c72
 +
dp3 r4.y, r2, c73
 +
mad r5.xy, r3.xy, c74.xy, r4.xy
 +
dp3 r6.x, v2, c0
 +
mov r7.z, c32.x
 +
+exp r1.y, r5
 +
exp r8.y, r5.y
 +
mul r1.x, r1.y, r1.y
 +
mul r8.x, r8.y, r8.y
 +
+mov oD0, c32.z
 +
mul r1.z, r1.x, r1.y
 +
mul r8.z, r8.x, r8.y
 +
dp3 r7.x, r1.xyz, c36
 +
dp3 r7.y, r8.xyz, c36
 +
dp3 r6.y, v2, c1
 +
dp3 r6.z, v2, c2
 +
dp3 r9.x, r7.xyz, c74.zw
 +
mul r10.xyz, r6, v3.x
 +
mad r11.xyz, r10, r9.x, r2
 +
dph oPos.x, r11, c21
 +
dph oPos.y, r11, c22
 +
dph oPos.z, r11, c23
 +
dph oPos.w, r11, c24
 +
dph oFog.x, r11, c24
 +
mul oPos.xyz, r12, c-38
 +
+rcc r1.x, r12.w
 +
mad oPos.xyz, r12, r1.x, c-37
 +
</pre>
  
<code>
 
  /* Slot 0: 0x00000000 0x00320000 0x0C36106C 0x21200FF8 */
 
  MOV(R2,w, c[144].x);
 
  /* Slot 1: 0x00000000 0x005600FF 0x2554186C 0x21300FF8 */
 
  MUL(R3,w, R2.w, c[176].z);
 
  /* Slot 2: 0x00000000 0x00960000 0x0C3413FC 0xDE400FF8 */
 
  MAD(R4,xyz, c[176].x, v0.xyz, R3.w);
 
  /* Slot 3: 0x00000000 0x007002AA 0x0C361400 0x28500FF8 */
 
  ADD(R5,x, c[128].z, -v1.x);
 
  /* Slot 4: 0x00000000 0x0ACC001B 0x0836186D 0x18640FF8 */
 
  DPH(R6,x, v0, c[96]);
 
  EXP(R1,y, R4.x);
 
  /* Slot 5: 0x00000000 0x00CC201B 0x0836186C 0x24600FF8 */
 
  DPH(R6,y, v0, c[97]);
 
  /* Slot 6: 0x00000000 0x00400055 0x14AA286C 0x28100FF8 */
 
  MUL(R1,x, R1.y, R1.y);
 
  /* Slot 7: 0x00000000 0x00400000 0x14AA286C 0x22100FF8 */
 
  MUL(R1,z, R1.x, R1.y);
 
  /* Slot 8: 0x00000000 0x00B0801A 0x1436186C 0x28700FF8 */
 
  DP3(R7,x, R1.xyz, c[132]);
 
  /* Slot 9: 0x00000000 0x0ACC401B 0x08361955 0x12640FF8 */
 
  DPH(R6,z, v0, c[98]);
 
  EXP(R1,y, R4.y);
 
  /* Slot 10: 0x00000000 0x00CC601B 0x0836186C 0x28800FF8 */
 
  DPH(R8,x, v0, c[99]);
 
  /* Slot 11: 0x00000000 0x00400055 0x14AA286C 0x28100FF8 */
 
  MUL(R1,x, R1.y, R1.y);
 
  /* Slot 12: 0x00000000 0x00400000 0x14AA286C 0x22100FF8 */
 
  MUL(R1,z, R1.x, R1.y);
 
  /* Slot 13: 0x00000000 0x00B0801A 0x1436186C 0x24700FF8 */
 
  DP3(R7,y, R1.xyz, c[132]);
 
  /* Slot 14: 0x00000000 0x0ACC801B 0x08361AA9 0x14840FF8 */
 
  DPH(R8,y, v0, c[100]);
 
  EXP(R1,y, R4.z);
 
  /* Slot 15: 0x00000000 0x00CCA01B 0x0836186C 0x22800FF8 */
 
  DPH(R8,z, v0, c[101]);
 
  /* Slot 16: 0x00000000 0x00400055 0x14AA286C 0x28100FF8 */
 
  MUL(R1,x, R1.y, R1.y);
 
  /* Slot 17: 0x00000000 0x00400000 0x14AA286C 0x22100FF8 */
 
  MUL(R1,z, R1.x, R1.y);
 
  /* Slot 18: 0x00000000 0x00B0801A 0x1436186C 0x22700FF8 */
 
  DP3(R7,z, R1.xyz, c[132]);
 
  /* Slot 19: 0x00000000 0x0040021A 0x6400106C 0x2E900FF8 */
 
  MUL(R9,xyz, R6.xyz, v1.x);
 
  /* Slot 20: 0x00000000 0x0080001A 0x8400A86A 0x5EA00FF8 */
 
  MAD(R10,xyz, R8.xyz, R5.x, R9.xyz);
 
  /* Slot 21: 0x00000000 0x00560655 0x08AA186C 0x21B00FF8 */
 
  MUL(R11,w, v3.y, c[176].y);
 
  /* Slot 22: 0x00000000 0x005780FF 0xB5FE186C 0x21000FF8 */
 
  MUL(R0,w, R11.w, c[188].w);
 
  /* Slot 23: 0x00000000 0x0080001A 0x75FE086A 0x9E200FF8 */
 
  MAD(R2,xyz, R7.xyz, R0.w, R10.xyz);
 
  /* Slot 24: 0x00000000 0x0097871A 0x0D541068 0x9E300FF8 */
 
  MAD(R3,xyz, -c[188].xyz, v3.z, R2.xyz);
 
  /* Slot 25: 0x00000000 0x00AC041B 0x0836186C 0x28400FF8 */
 
  DP3(R4,x, v2, c[96]);
 
  /* Slot 26: 0x00000000 0x00AC241B 0x0836186C 0x24400FF8 */
 
  DP3(R4,y, v2, c[97]);
 
  /* Slot 27: 0x00000000 0x00AC441B 0x0836186C 0x22400FF8 */
 
  DP3(R4,z, v2, c[98]);
 
  /* Slot 28: 0x00000000 0x00AC641B 0x0836186C 0x28600FF8 */
 
  DP3(R6,x, v2, c[99]);
 
  /* Slot 29: 0x00000000 0x00AC841B 0x0836186C 0x24600FF8 */
 
  DP3(R6,y, v2, c[100]);
 
  /* Slot 30: 0x00000000 0x00ACA41B 0x0836186C 0x22600FF8 */
 
  DP3(R6,z, v2, c[101]);
 
  /* Slot 31: 0x00000000 0x0040021A 0x4400106C 0x2E700FF8 */
 
  MUL(R7,xyz, R4.xyz, v1.x);
 
  /* Slot 32: 0x00000000 0x0080001A 0x6400A869 0xDE800FF8 */
 
  MAD(R8,xyz, R6.xyz, R5.x, R7.xyz);
 
  /* Slot 33: 0x00000000 0x00CEA01B 0x3436186C 0x20708800 */
 
  DPH(oPos,x, R3, c[117]);
 
  /* Slot 34: 0x00000000 0x00CEC01B 0x3436186C 0x20704800 */
 
  DPH(oPos,y, R3, c[118]);
 
  /* Slot 35: 0x00000000 0x00CEE01B 0x3436186C 0x20702800 */
 
  DPH(oPos,z, R3, c[119]);
 
  /* Slot 36: 0x00000000 0x00CF001B 0x3436186C 0x20701800 */
 
  DPH(oPos,w, R3, c[120]);
 
  /* Slot 37: 0x00000000 0x00A0001A 0x8435086C 0x21800FF8 */
 
  DP3(R8,w, R8.xyz, R8.xyz);
 
  /* Slot 38: 0x00000000 0x00CD321B 0x0836186C 0x20708848 */
 
  DPH(oT0,x, v9, c[105]);
 
  /* Slot 39: 0x00000000 0x0833401B 0x0C3613FE 0x1F910FF8 */
 
  MOV(R9,xyzw, c[154]);
 
  RSQ(R1,w, R8.w);
 
  /* Slot 40: 0x00000000 0x00CD521B 0x0836186C 0x20704848 */
 
  DPH(oT0,y, v9, c[106]);
 
  /* Slot 41: 0x00000000 0x0040001A 0x85FE286C 0x2EA00FF8 */
 
  MUL(R10,xyz, R8.xyz, R1.w);
 
  /* Slot 42: 0x00000000 0x00B3001B 0xA636186C 0x28B00FF8 */
 
  DP3(R11,x, R10, -c[152]);
 
  /* Slot 43: 0x00000000 0x00B3201B 0xA636186C 0x24B00FF8 */
 
  DP3(R11,y, R10, -c[153]);
 
  /* Slot 44: 0x00000000 0x00CF001B 0x3436186C 0x20708828 */
 
  DPH(oFog,x, R3, c[120]);
 
  /* Slot 45: 0x00000000 0x01500015 0xB400186C 0x2C000FF8 */
 
  MAX(R0,xy, R11.xy, c[128].x);
 
  /* Slot 46: 0x00000000 0x00936000 0x0436186E 0x5F200FF8 */
 
  MAD(R2,xyzw, R0.x, c[155], R9);
 
  /* Slot 47: 0x00000000 0x00938055 0x0436186C 0x9F300FF8 */
 
  MAD(R3,xyzw, R0.y, c[156], R2);
 
  /* Slot 48: 0x00000000 0x0647401B 0xC4361BFF 0x1078E800 */
 
  MUL(oPos,xyz, R12, c[58]);
 
  RCC(R1,x, R12.w);
 
  /* Slot 49: 0x00000000 0x0057401B 0x3436186C 0x2070F818 */
 
  MUL(oD0,xyzw, R3, c[186]);
 
  /* Slot 50: 0x00000000 0x0087601B 0xC400286C 0x3070E801 */
 
  MAD(oPos,xyz, R12, R1.x, c[59]);
 
</code>
 
  
==== HUD ====
+
== Demo ==
  
==== Shadow ====
+
There was a demo released for ??? on ???.
  
===== Skater =====
+
=== Rendering in the Demo ===
Skater shadows are rendered into a 256x256 texture after the entire scene has been rendered
 
  
====== Shader ======
+
This is a rundown of how the scene is being rendered in the THPS2X Demo version
 +
Rendering happens in this order:
  
<code>
+
# World
  /* Slot 0: 0x00000000 0x007002AA 0x0C361400 0x28200FF8 */
+
# Skater
  ADD(R2,x, c[128].z, -v1.x);
+
#* Shader: cloth.xvu
  /* Slot 1: 0x00000000 0x00CC001B 0x0836186C 0x28300FF8 */
+
# HUD
  DPH(R3,x, v0, c[96]);
+
# Shadows
  /* Slot 2: 0x00000000 0x00CC201B 0x0836186C 0x24300FF8 */
+
## Skater
  DPH(R3,y, v0, c[97]);
+
##* Skater shadows are rendered into a 256x256 texture after the entire scene has been rendered
  /* Slot 3: 0x00000000 0x00CC401B 0x0836186C 0x22300FF8 */
+
##* Shader: blackskin.xvu
  DPH(R3,z, v0, c[98]);
 
  /* Slot 4: 0x00000000 0x00CC601B 0x0836186C 0x28400FF8 */
 
  DPH(R4,x, v0, c[99]);
 
  /* Slot 5: 0x00000000 0x00CC801B 0x0836186C 0x24400FF8 */
 
  DPH(R4,y, v0, c[100]);
 
  /* Slot 6: 0x00000000 0x00CCA01B 0x0836186C 0x22400FF8 */
 
  DPH(R4,z, v0, c[101]);
 
  /* Slot 7: 0x00000000 0x0040021A 0x3400106C 0x2E500FF8 */
 
  MUL(R5,xyz, R3.xyz, v1.x);
 
  /* Slot 8: 0x00000000 0x0080001A 0x44004869 0x5E600FF8 */
 
  MAD(R6,xyz, R4.xyz, R2.x, R5.xyz);
 
  /* Slot 9: 0x00000000 0x00CEA01B 0x6436186C 0x20708800 */
 
  DPH(oPos,x, R6, c[117]);
 
  /* Slot 10: 0x00000000 0x00CEC01B 0x6436186C 0x20704800 */
 
  DPH(oPos,y, R6, c[118]);
 
  /* Slot 11: 0x00000000 0x00CEE01B 0x6436186C 0x20702800 */
 
  DPH(oPos,z, R6, c[119]);
 
  /* Slot 12: 0x00000000 0x00CF001B 0x6436186C 0x20701800 */
 
  DPH(oPos,w, R6, c[120]);
 
  /* Slot 13: 0x00000000 0x0647401B 0xC4361BFF 0x1078E800 */
 
  MUL(oPos,xyz, R12, c[58]);
 
  RCC(R1,x, R12.w);
 
  /* Slot 14: 0x00000000 0x0087601B 0xC400286C 0x3070E801 */
 
  MAD(oPos,xyz, R12, R1.x, c[59]);
 
</code>
 

Revision as of 22:56, 26 June 2018


Shaders

These shaders have been disassembled. Any comment was added manually and does not come from the game files.

blackskin.xvu

xvs.1.1
add r2.x, c32.z, -v1.x
dph r3.x, v0, c0
dph r3.y, v0, c1
dph r3.z, v0, c2
dph r4.x, v0, c3
dph r4.y, v0, c4
dph r4.z, v0, c5
mul r5.xyz, r3.xyz, v1.x
mad r6.xyz, r4.xyz, r2.x, r5.xyz
dph oPos.x, r6, c21
dph oPos.y, r6, c22
dph oPos.z, r6, c23
dph oPos.w, r6, c24
mul oPos.xyz, r12, c-38
+rcc r1.x, r12.w
mad oPos.xyz, r12, r1.x, c-37

cloth.xvu

xvs.1.1
mov r2.w, c48.x
mul r3.w, r2.w, c80.z
mad r4.xyz, c80.x, v0.xyz, r3.w
add r5.x, c32.z, -v1.x
dph r6.x, v0, c0
+exp r1.y, r4
dph r6.y, v0, c1
mul r1.x, r1.y, r1.y
mul r1.z, r1.x, r1.y
dp3 r7.x, r1.xyz, c36
dph r6.z, v0, c2
+exp r1.y, r4.y
dph r8.x, v0, c3
mul r1.x, r1.y, r1.y
mul r1.z, r1.x, r1.y
dp3 r7.y, r1.xyz, c36
dph r8.y, v0, c4
+exp r1.y, r4.z
dph r8.z, v0, c5
mul r1.x, r1.y, r1.y
mul r1.z, r1.x, r1.y
dp3 r7.z, r1.xyz, c36
mul r9.xyz, r6.xyz, v1.x
mad r10.xyz, r8.xyz, r5.x, r9.xyz
mul r11.w, v3.y, c80.y
mul r0.w, r11.w, c92.w
mad r2.xyz, r7.xyz, r0.w, r10.xyz
mad r3.xyz, -c92.xyz, v3.z, r2.xyz
dp3 r4.x, v2, c0
dp3 r4.y, v2, c1
dp3 r4.z, v2, c2
dp3 r6.x, v2, c3
dp3 r6.y, v2, c4
dp3 r6.z, v2, c5
mul r7.xyz, r4.xyz, v1.x
mad r8.xyz, r6.xyz, r5.x, r7.xyz
dph oPos.x, r3, c21
dph oPos.y, r3, c22
dph oPos.z, r3, c23
dph oPos.w, r3, c24
dp3 r8.w, r8.xyz, r8.xyz
dph oT0.x, v9, c9
mov r9, c58
+rsq r1.w, r8.w
dph oT0.y, v9, c10
mul r10.xyz, r8.xyz, r1.w
dp3 r11.x, r10, -c56
dp3 r11.y, r10, -c57
dph oFog.x, r3, c24
max r0.xy, r11.xy, c32.x
mad r2, r0.x, c59, r9
mad r3, r0.y, c60, r2
mul oPos.xyz, r12, c-38
+rcc r1.x, r12.w
mul oD0, r3, c90
mad oPos.xyz, r12, r1.x, c-37

geom.xvu

xvs.1.1
add r0.xyz, v0.xyz, c91.xyz
mov oD0, v3
dph oPos.x, r0, c21
dph oPos.y, r0, c22
dph oPos.z, r0, c23
dph oPos.w, r0, c24
dph oFog.x, r0, c24
mov oT0.xy, v9
mul oT1.xy, v9, c91.w
mul oPos.xyz, r12, c-38
+rcc r1.x, r12.w
mad oPos.xyz, r12, r1.x, c-37

grass.xvu

xvs.1.1
add r0.xyz, v0, c91
mov oD0, v3
dph oPos.x, r0, c21
dph oPos.y, r0, c22
dph oPos.z, r0, c23
dph oPos.w, r0, c24
dph oFog.x, r0, c24
mul oT0.xy, v9, c32.w
mul oPos.xyz, r12, c-38
+rcc r1.x, r12.w
mad oPos.xyz, r12, r1.x, c-37

projectorlight.xvu

xvs.1.1
dph r2.x, v0, c0
dph r2.y, v0, c1
dph r2.z, v0, c2
dp3 r3.x, v2, c92
dph oPos.x, r2, c21
dph oPos.y, r2, c22
dph oPos.z, r2, c23
dph oPos.w, r2, c24
mad oD0.xyz, r3.x, c32.y, c32.y
dph r4.x, r2, c6
dph r4.y, r2, c7
dph r4.z, r2, c8
mul oPos.xyz, r12, c-38
+rcc r1.x, r12.w
dph r5.w, r4, c12
dph r7.y, r4, c10
dph r7.x, r4, c9
+rcp r1.w, r5.w
dph oT1.x, r4, c13
max r6.w, r1.w, -r1.w
mul oT0.xy, r7.xy, r6.w
mad oPos.xyz, r12, r1.x, c-37

projectorshadow.xvu

xvs.1.1
dph r2.x, v0, c0
dph r2.y, v0, c1
dph r2.z, v0, c2
dp3 r3.x, v2, c92
dph oPos.x, r2, c21
dph oPos.y, r2, c22
dph oPos.z, r2, c23
dph oPos.w, r2, c24
mad oD1.xyz, -r3.x, c32.y, c32.y
dph r4.x, r2, c6
dph r4.y, r2, c7
dph r4.z, r2, c8
mul oPos.xyz, r12, c-38
+rcc r1.x, r12.w
dph r5.x, r4, c9
dph r5.y, r4, c10
dph oT1.x, r4, c11
mul oT0.xy, r5.xy, c33
mad oPos.xyz, r12, r1.x, c-37

projectorskin.xvu

xvs.1.1
add r2.x, c32.z, -v1.x
dp3 r3.x, v2, c0
dp3 r3.y, v2, c1
dp3 r3.z, v2, c2
dp3 r4.x, v2, c3
dp3 r4.y, v2, c4
dp3 r4.z, v2, c5
mul r5.xyz, r3.xyz, v1.x
mad r6.xyz, r4.xyz, r2.x, r5.xyz
dph r7.x, v0, c0
dph r7.y, v0, c1
dph r7.z, v0, c2
dph r8.x, v0, c3
dph r8.y, v0, c4
dph r8.z, v0, c5
mul r9.xyz, r7.xyz, v1.x
mad r10.xyz, r8.xyz, r2.x, r9.xyz
dp3 r11.w, r6.xyz, r6.xyz
dph oPos.y, r10, c22
dph oPos.x, r10, c21
+rsq r1.w, r11.w
dph oPos.z, r10, c23
mul r0.xyz, r6.xyz, r1.w
dp3 r2.x, r0.xyz, c92
dph oPos.w, r10, c24
mad oD0.xyz, r2.x, c32.y, c32.y
dph r3.x, r10, c6
dph r3.y, r10, c7
dph r3.z, r10, c8
mul oPos.xyz, r12, c-38
+rcc r1.x, r12.w
dph r4.w, r3, c12
dph r6.y, r3, c10
dph r6.x, r3, c9
+rcp r1.w, r4.w
dph oT1.x, r3, c13
max r5.w, r1.w, -r1.w
mul oT0.xy, r6.xy, r5.w
mad oPos.xyz, r12, r1.x, c-37

skin.xvu

xvs.1.1
add r2.x, c32.z, -v1.x
dp3 r3.x, v2, c0
dp3 r3.y, v2, c1
dp3 r3.z, v2, c2
dp3 r4.x, v2, c3
dp3 r4.y, v2, c4
dp3 r4.z, v2, c5
mul r5.xyz, r3.xyz, v1.x
mad r6.xyz, r4.xyz, r2.x, r5.xyz
dph r7.x, v0, c0
dph r7.y, v0, c1
dph r7.z, v0, c2
dph r8.x, v0, c3
dph r8.y, v0, c4
dph r8.z, v0, c5
mul r9.xyz, r7.xyz, v1.x
mad r10.xyz, r8.xyz, r2.x, r9.xyz
dp3 r11.w, r6.xyz, r6.xyz
dph oPos.y, r10, c22
dph oPos.x, r10, c21
+rsq r1.w, r11.w
dph oPos.z, r10, c23
mul r0.xyz, r6.xyz, r1.w
dph oPos.w, r10, c24
dph oFog.x, r10, c24
mov r2, c58
dp3 r3.x, r0, -c56
dp3 r3.y, r0, -c57
dph oT0.x, v9, c9
max r4.xy, r3.xy, c32.x
mad r5, r4.x, c59, r2
mad r6, r4.y, c60, r5
dph oT0.y, v9, c10
mul oD0, r6, c90
mul oPos.xyz, r12, c-38
+rcc r1.x, r12.w
mad oPos.xyz, r12, r1.x, c-37

wiggle.xvu

xvs.1.1
dph r2.x, v0, c0
dph r2.y, v0, c1
dph r2.z, v0, c2
mov r3.xy, c48.x
+mov oT0.xy, v9
dp3 r4.x, r2, c72
dp3 r4.y, r2, c73
mad r5.xy, r3.xy, c74.xy, r4.xy
dp3 r6.x, v2, c0
mov r7.z, c32.x
+exp r1.y, r5
exp r8.y, r5.y
mul r1.x, r1.y, r1.y
mul r8.x, r8.y, r8.y
+mov oD0, c32.z
mul r1.z, r1.x, r1.y
mul r8.z, r8.x, r8.y
dp3 r7.x, r1.xyz, c36
dp3 r7.y, r8.xyz, c36
dp3 r6.y, v2, c1
dp3 r6.z, v2, c2
dp3 r9.x, r7.xyz, c74.zw
mul r10.xyz, r6, v3.x
mad r11.xyz, r10, r9.x, r2
dph oPos.x, r11, c21
dph oPos.y, r11, c22
dph oPos.z, r11, c23
dph oPos.w, r11, c24
dph oFog.x, r11, c24
mul oPos.xyz, r12, c-38
+rcc r1.x, r12.w
mad oPos.xyz, r12, r1.x, c-37


Demo

There was a demo released for ??? on ???.

Rendering in the Demo

This is a rundown of how the scene is being rendered in the THPS2X Demo version Rendering happens in this order:

  1. World
  2. Skater
    • Shader: cloth.xvu
  3. HUD
  4. Shadows
    1. Skater
      • Skater shadows are rendered into a 256x256 texture after the entire scene has been rendered
      • Shader: blackskin.xvu