Skip to content

Commit

Permalink
Fix cutscene characters and fp error
Browse files Browse the repository at this point in the history
  • Loading branch information
Parallellines0451 committed Oct 31, 2023
1 parent e39777a commit a30131d
Show file tree
Hide file tree
Showing 111 changed files with 315 additions and 470 deletions.
9 changes: 5 additions & 4 deletions win32_30_nv8/deferred_lighting/deferred_lightingPS1.asm
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
def c13, -0.326211989, -0.405809999, -0.840143979, -0.0735799968
def c20, 1.6666667, 0, 0, 0 // Reflection intensity multiplier
def c21, 3, 2, 1, 0 // Console tree lighting constants
def c22, 0.01171875, 0.0234375, 0.02734375, 0
def c23, 0.35, 0.5, 0.3333333, 0
def c22, 0.012156862745098, 0.023921568627451, 0.027843137254902, 0 // 3.1, 6.1, 7.1
def c23, 0.35, 0.5, 0.3333333, 0.0007843137254902
// ------------------------------------------------------ 1.0.4.0 Shadow Filter Constants -------------------------------------------------------
def c110, -0.25, 1, -1, 0
def c111, 0.159154937, 0.5, 6.28318548, -3.14159274
Expand Down Expand Up @@ -337,8 +337,9 @@
// ----------------------------------------------------------- Console Tree Lighting ------------------------------------------------------------
texld r21, v0, s6
add r21.yz, r21.x, -c22
cmp r21.yz, -r21_abs, c3.x, c3.y
add_sat r21.x, r21.y, r21.z // masks 5 and 6
add r21.yz, -r21_abs, c23.w
cmp r21.yz, r21, c3.x, c3.y
add_sat r21.x, r21.y, r21.z
mov r21.y, c223.x
add r21.y, r21.y, -c21.y
cmp r21.y, -r21_abs.y, r21.x, c3.y // Console tree lighting toggle
Expand Down
12 changes: 7 additions & 5 deletions win32_30_nv8/deferred_lighting/deferred_lightingPS2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
def c16, -0.840143979, -0.0735799968, -0.69591397, 0.457136989
def c20, 1.6666667, 0, 0, 0 // Reflection intensity multiplier
def c21, 3, 2, 1, 0 // Console tree lighting constants
def c22, 0.01171875, 0.0234375, 0.02734375, 0
def c23, 0.35, 0.5, 0.3333333, 0
def c22, 0.012156862745098, 0.023921568627451, 0.027843137254902, 0 // 3.1, 6.1, 7.1
def c23, 0.35, 0.5, 0.3333333, 0.0007843137254902
// ------------------------------------------------------ 1.0.4.0 Shadow Filter Constants -------------------------------------------------------
def c110, -0.25, 1, -1, 0
def c111, 0.159154937, 0.5, 6.28318548, -3.14159274
Expand Down Expand Up @@ -338,8 +338,9 @@
// ----------------------------------------------------------- Console Tree Lighting ------------------------------------------------------------
texld r21, v0, s5
add r21.yz, r21.x, -c22
cmp r21.yz, -r21_abs, c4.z, c4.w
add_sat r21.x, r21.y, r21.z // masks 5 and 6
add r21.yz, -r21_abs, c23.w
cmp r21.yz, r21, c4.z, c4.w
add_sat r21.x, r21.y, r21.z
mov r21.y, c223.x
add r21.y, r21.y, -c21.y
cmp r21.y, -r21_abs.y, r21.x, c4.w // Console tree lighting toggle
Expand Down Expand Up @@ -371,7 +372,8 @@
texld r4, v0, s5
// add r4.x, -r4.x, c2.z
add r20.xy, r4.x, -c22.xw
cmp r20.xy, -r20_abs.xy, c4.z, c4.w
add r20.xy, -r20_abs, c23.w
cmp r20.xy, r20, c4.z, c4.w
add_sat r20.x, r20.x, r20.y
add r4.x, r20.x, -c4.z // change wetness mask to include stencil 3 alongside 0 (since 3 is now used for the dithering mask)
cmp r3.w, r4.x, r3.w, c0.x
Expand Down
9 changes: 5 additions & 4 deletions win32_30_nv8/deferred_lighting/deferred_lightingPS3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
def c4, 0.75, 0.25, 5, 10
def c20, 1.6666667, 0, 0, 0 // Reflection intensity multiplier
def c21, 3, 2, 1, 0 // Console tree lighting constants
def c22, 0.01171875, 0.0234375, 0.02734375, 0
def c23, 0.35, 0.5, 0.3333333, 0
def c22, 0.012156862745098, 0.023921568627451, 0.027843137254902, 0 // 3.1, 6.1, 7.1
def c23, 0.35, 0.5, 0.3333333, 0.0007843137254902
dcl_texcoord v0.xy
dcl_texcoord1 v1
dcl_2d s0
Expand All @@ -61,8 +61,9 @@
texld r21, v0, s6
add r21.yz, r21.x, -c22
cmp r21.yz, -r21_abs, c0.z, c0.w
add_sat r21.x, r21.y, r21.z // masks 5 and 6
add r21.yz, -r21_abs, c23.w
cmp r21.yz, r21, c0.z, c0.w
add_sat r21.x, r21.y, r21.z
mov r21.y, c223.x
add r21.y, r21.y, -c21.y
cmp r21.y, -r21_abs.y, r21.x, c0.w // Console tree lighting toggle
Expand Down
12 changes: 7 additions & 5 deletions win32_30_nv8/deferred_lighting/deferred_lightingPS4.asm
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
def c6, 10, 1, 0, 0
def c20, 1.6666667, 0, 0, 0 // Reflection intensity multiplier
def c21, 3, 2, 1, 0 // Console tree lighting constants
def c22, 0.01171875, 0.0234375, 0.02734375, 0
def c23, 0.35, 0.5, 0.3333333, 0
def c22, 0.012156862745098, 0.023921568627451, 0.027843137254902, 0 // 3.1, 6.1, 7.1
def c23, 0.35, 0.5, 0.3333333, 0.0007843137254902
dcl_texcoord v0.xy
dcl_texcoord1 v1
dcl_2d s0
Expand All @@ -63,8 +63,9 @@
texld r21, v0, s5
add r21.yz, r21.x, -c22
cmp r21.yz, -r21_abs, c6.y, c6.z
add_sat r21.x, r21.y, r21.z // masks 5 and 6
add r21.yz, -r21_abs, c23.w
cmp r21.yz, r21, c6.y, c6.z
add_sat r21.x, r21.y, r21.z
mov r21.y, c223.x
add r21.y, r21.y, -c21.y
cmp r21.y, -r21_abs.y, r21.x, c0.x // Console tree lighting toggle
Expand Down Expand Up @@ -127,7 +128,8 @@
texld r3, v0, s5
// add r0.z, -r3.x, c2.z
add r20.xy, r3.x, -c22.xw
cmp r20.xy, -r20_abs.xy, c6.y, c6.z
add r20.xy, -r20_abs, c23.w
cmp r20.xy, r20, c6.y, c6.z
add_sat r20.x, r20.x, r20.y
add r0.z, r20.x, -c6.y // change wetness mask to include stencil 3 alongside 0 (since 3 is now used for the dithering mask)
cmp r0.y, r0.z, r0.y, c0.x
Expand Down
10 changes: 8 additions & 2 deletions win32_30_nv8/deferred_lighting/deferred_lightingPS9.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//
// Added dithering mask stencil values
// Generated by Microsoft (R) HLSL Shader Compiler 9.26.952.2844
//
// Parameters:
Expand Down Expand Up @@ -46,7 +46,8 @@
def c1, 0.99609375, 7.96875, 63.75, -127.999992
def c2, 255, -128, -0, -7.9000001
def c3, -8, -0, -1, 0.100000001
def c4, 9.99999975e-006, 1.11111116, 0, 0
def c4, 9.99999975e-006, 1.11111116, 0.007843137254902, 0
def c5, 0.016078431372549, 0.0474509803921569, 0.5180392156862745, 0.5494117647058824 // 4, 12, 132, 140
dcl_texcoord v0
dcl vPos.xy
dcl_texcoord9 v9
Expand Down Expand Up @@ -119,6 +120,10 @@
mul r1.yzw, r1.z, r2.xxyz
texld r2, r0, s0
texld r0, r0, s5
add r20.xyzw, r0.x, -c5
add r20.xyzw, -r20_abs, c4.z
cmp r20.xyzw, r20, -c3.z, -c3.y
dp4 r20.x, r20, -c3.z
mul r0.yzw, r1, r2.xxyz
mad r1.xyz, r1.x, r3, r0.yzww
mad r0.y, r0.x, c2.x, c2.y
Expand All @@ -130,6 +135,7 @@
add r0.x, r0.x, c3.z
add r0.x, -r0_abs.x, c3.w
cmp r0.x, r0.x, -c3.z, -c3.y
add_sat r0.x, r0.x, r20.x
mov r1.w, -c3.z
mul oC0, r1, r0.x
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_cubemap_reflect/gta_cubemap_reflectPS3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 9.8090892503e-44 // 70
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -86,9 +86,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_cubemap_reflect/gta_cubemap_reflectPS4.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 9.9492190967e-44 // 71
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -87,9 +87,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_cutout_fence/gta_cutout_fencePS3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.1350517561e-43 // 81
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -78,9 +78,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_cutout_fence/gta_cutout_fencePS4.asm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.1490647407e-43 // 82
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -67,9 +67,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_decal/gta_decalPS3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.9478048654e-43 // 139
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -78,9 +78,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_decal/gta_decalPS4.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.9618178501e-43 // 140
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -78,9 +78,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_decal_amb_only/gta_decal_amb_onlyPS3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.3032075718e-43 // 93
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -67,9 +67,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_decal_amb_only/gta_decal_amb_onlyPS4.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.3172205565e-43 // 94
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -67,9 +67,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_decal_dirt/gta_decal_dirtPS3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.4713633875e-43 // 105
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -75,9 +75,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_decal_dirt/gta_decal_dirtPS4.asm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.4853763722e-43 // 106
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -75,9 +75,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_decal_glue/gta_decal_gluePS3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.6255062186e-43 // 116
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -78,9 +78,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
6 changes: 2 additions & 4 deletions win32_30_nv8/gta_decal_glue/gta_decal_gluePS4.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//

ps_3_0
def c151, 0.9999, 255, 3, 0.00390625 // Dithering Mask constants
def c151, 0.9999, 0.012156862745098, 0, 0 // Dithering Mask constants
def c219, 1.8395173895e+25, 3.9938258725e+24, 4.5435787456e+30, 1.6395192033e-43 // 117
def c150, 15.996, 16, 0.0625, 0.0625 // 256 state stipple constants
def c127, 0.9999999, 1, 0, 0 // LogDepth constants
Expand Down Expand Up @@ -78,9 +78,7 @@
// -------------------------------------------------------------- Dithering Mask ----------------------------------------------------------------
if_lt r20.w, c151.x
mov r20.z, c52.x
mul r20.z, r20.z, c151.y
add r20.z, r20.z, c151.z
mul oC3.x, r20.z, c151.w
add oC3.x, r20.z, c151.y
endif
// ----------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------- Linear2Log -----------------------------------------------------------------
Expand Down
Loading

0 comments on commit a30131d

Please sign in to comment.