From 5ffbde3890d1f959490c3ce16721c2a263415d8d Mon Sep 17 00:00:00 2001 From: aap Date: Sat, 25 Apr 2020 10:07:37 +0200 Subject: [PATCH] simplified d3d shaders now that we always have prelight declared --- src/d3d/shaders/default_PS.h | 2 +- src/d3d/shaders/default_VS.hlsl | 5 +- src/d3d/shaders/default_all_VS.h | 406 ++++++++++++------------- src/d3d/shaders/default_amb_VS.h | 110 +++---- src/d3d/shaders/default_amb_dir_VS.h | 158 +++++----- src/d3d/shaders/default_tex_PS.h | 2 +- src/d3d/shaders/im2d_PS.h | 2 +- src/d3d/shaders/im2d_tex_PS.h | 2 +- src/d3d/shaders/make_default.cmd | 14 +- src/d3d/shaders/make_matfx.cmd | 10 +- src/d3d/shaders/make_skin.cmd | 6 +- src/d3d/shaders/matfx_env_PS.h | 2 +- src/d3d/shaders/matfx_env_VS.hlsl | 5 +- src/d3d/shaders/matfx_env_all_VS.h | 398 ++++++++++++------------ src/d3d/shaders/matfx_env_amb_VS.h | 108 +++---- src/d3d/shaders/matfx_env_amb_dir_VS.h | 184 +++++------ src/d3d/shaders/matfx_env_tex_PS.h | 2 +- src/d3d/shaders/skin_VS.hlsl | 5 +- src/d3d/shaders/skin_all_VS.h | 204 ++++++------- src/d3d/shaders/skin_amb_VS.h | 46 ++- src/d3d/shaders/skin_amb_dir_VS.h | 89 +++--- src/d3d/shaders/standardConstants.h | 1 - 22 files changed, 814 insertions(+), 947 deletions(-) diff --git a/src/d3d/shaders/default_PS.h b/src/d3d/shaders/default_PS.h index 0a8a53e..9f2cb31 100644 --- a/src/d3d/shaders/default_PS.h +++ b/src/d3d/shaders/default_PS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T ps_2_0 /Fh default_PS.h default_PS.hlsl +// fxc /nologo /T ps_2_0 /Fh default_PS.h default_PS.hlsl // // // Parameters: diff --git a/src/d3d/shaders/default_VS.hlsl b/src/d3d/shaders/default_VS.hlsl index 73a404d..d2f5452 100644 --- a/src/d3d/shaders/default_VS.hlsl +++ b/src/d3d/shaders/default_VS.hlsl @@ -25,10 +25,7 @@ VS_out main(in VS_in input) output.TexCoord0.xy = input.TexCoord; - output.Color = float4(0.0, 0.0, 0.0, 1.0); - if(surfPrelight > 0.0) - output.Color = input.Prelight; - + output.Color = input.Prelight; output.Color.rgb += ambientLight.rgb * surfAmbient; int i; diff --git a/src/d3d/shaders/default_all_VS.h b/src/d3d/shaders/default_all_VS.h index 65ce514..e6afa5d 100644 --- a/src/d3d/shaders/default_all_VS.h +++ b/src/d3d/shaders/default_all_VS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh +// fxc /nologo /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh // default_all_VS.h default_VS.hlsl // // @@ -49,8 +49,7 @@ // vs_2_0 - def c11, 3, 0, 0, 0 - def c41, 0, -0, -1, 1 + def c11, 0, 3, 1, 0 dcl_position v0 dcl_normal v1 dcl_texcoord v2 @@ -67,85 +66,82 @@ mul r1.xyz, v1.y, c9 mad r1.xyz, c8, v1.x, r1 mad r1.xyz, c10, v1.z, r1 - 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 - mad r2.xyz, c15, r2.x, r3 - mov r4.xyz, r2 - mov r1.w, c41.x + mad r2.xyz, c15, r2.x, v3 + mov r3.xyz, r2 + mov r1.w, c11.x rep i0 - 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 - add r1.w, r1.w, c41.w + add r2.w, r1.w, c16.x + mul r2.w, r2.w, c11.y + mova a0.x, r2.w + dp3 r2.w, r1, -c19[a0.x] + max r2.w, r2.w, c11.x + mul r4.xyz, r2.w, c17[a0.x] + mad r3.xyz, r4, c13.z, r3 + add r1.w, r1.w, c11.z endrep - mov r2.xyz, r4 - mov r1.w, c41.x + mov r2.xyz, r3 + mov r1.w, c11.x rep i1 - 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 - add r1.w, r1.w, c41.w + add r2.w, r1.w, c16.y + mul r2.w, r2.w, c11.y + mova a0.x, r2.w + add r4.xyz, r0, -c18[a0.x] + dp3 r2.w, r4, r4 + rsq r2.w, r2.w + mul r4.xyz, r2.w, r4 + dp3 r3.w, r1, -r4 + max r3.w, r3.w, c11.x + mul r4.xyz, r3.w, c17[a0.x] + rcp r2.w, r2.w + rcp r3.w, c17[a0.x].w + mad r2.w, r2.w, -r3.w, c11.z + max r2.w, r2.w, c11.x + mul r4.xyz, r2.w, r4 + mad r2.xyz, r4, c13.z, r2 + add r1.w, r1.w, c11.z endrep mov r3.xyz, r2 - mov r1.w, c41.x + mov r1.w, c11.x rep i2 - add r4.x, r1.w, c16.z - mul r4.x, r4.x, c11.x - mova a0.x, r4.x + add r2.w, r1.w, c16.z + mul r2.w, r2.w, c11.y + mova a0.x, r2.w 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 r2.w, r4, r4 + rsq r2.w, r2.w + mul r4.xyz, r2.w, r4 + dp3 r4.w, 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 + max r4.y, r4.w, c11.x + mov r4.z, c11.z + add r4.xz, r4, c18[a0.x].w rcp r4.z, r4.z mul r4.x, r4.z, r4.x - slt r4.z, r4.x, c41.x + slt r4.z, r4.x, c11.x mad r4.y, r4.z, -r4.y, r4.y max r4.x, r4.x, c19[a0.x].w mul r4.x, r4.x, r4.y 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 + rcp r2.w, r2.w + rcp r4.w, c17[a0.x].w + mad r2.w, r2.w, -r4.w, c11.z + max r2.w, r2.w, c11.x + mul r4.xyz, r2.w, r4 mad r3.xyz, r4, c13.z, r3 - add r1.w, r1.w, c41.w + add r1.w, r1.w, c11.z endrep - max r1, r3, c41.x - min r1, r1, c41.w + mov r3.w, v3.w + max r1, r3, c11.x + min r1, r1, c11.z 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 + min oT0.z, r0.x, c11.z mov oT0.xy, v2 -// approximately 98 instruction slots used +// approximately 95 instruction slots used #endif const BYTE g_vs20_main[] = @@ -258,13 +254,9 @@ const BYTE g_vs20_main[] = 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, - 0, 0, 0, 0, 81, 0, - 0, 5, 41, 0, 15, 160, - 0, 0, 0, 0, 0, 0, - 0, 128, 0, 0, 128, 191, - 0, 0, 128, 63, 31, 0, + 64, 64, 0, 0, 128, 63, + 0, 0, 0, 0, 31, 0, 0, 2, 0, 0, 0, 128, 0, 0, 15, 144, 31, 0, 0, 2, 3, 0, 0, 128, @@ -310,140 +302,128 @@ const BYTE g_vs20_main[] = 7, 128, 10, 0, 228, 160, 1, 0, 170, 144, 1, 0, 228, 128, 1, 0, 0, 2, - 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, + 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, 144, 1, 0, + 0, 2, 3, 0, 7, 128, + 2, 0, 228, 128, 1, 0, + 0, 2, 1, 0, 8, 128, + 11, 0, 0, 160, 38, 0, + 0, 1, 0, 0, 228, 240, + 2, 0, 0, 3, 2, 0, + 8, 128, 1, 0, 255, 128, + 16, 0, 0, 160, 5, 0, + 0, 3, 2, 0, 8, 128, + 2, 0, 255, 128, 11, 0, + 85, 160, 46, 0, 0, 2, + 0, 0, 1, 176, 2, 0, + 255, 128, 8, 0, 0, 4, + 2, 0, 8, 128, 1, 0, + 228, 128, 19, 32, 228, 161, + 0, 0, 0, 176, 11, 0, + 0, 3, 2, 0, 8, 128, + 2, 0, 255, 128, 11, 0, + 0, 160, 5, 0, 0, 4, 4, 0, 7, 128, 2, 0, - 228, 128, 1, 0, 0, 2, - 1, 0, 8, 128, 41, 0, - 0, 160, 38, 0, 0, 1, - 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, - 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, - 255, 128, 41, 0, 0, 160, - 5, 0, 0, 4, 5, 0, - 7, 128, 4, 0, 255, 128, - 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, - 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, - 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, - 6, 0, 0, 2, 4, 0, - 8, 128, 4, 0, 255, 128, - 6, 0, 0, 3, 5, 0, - 8, 128, 17, 32, 255, 160, + 255, 128, 17, 32, 228, 160, 0, 0, 0, 176, 4, 0, - 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, - 2, 0, 7, 128, 5, 0, - 228, 128, 13, 0, 170, 160, - 2, 0, 228, 128, 2, 0, - 0, 3, 1, 0, 8, 128, - 1, 0, 255, 128, 41, 0, - 255, 160, 39, 0, 0, 0, - 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, + 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, + 11, 0, 170, 160, 39, 0, + 0, 0, 1, 0, 0, 2, + 2, 0, 7, 128, 3, 0, + 228, 128, 1, 0, 0, 2, + 1, 0, 8, 128, 11, 0, + 0, 160, 38, 0, 0, 1, + 1, 0, 228, 240, 2, 0, + 0, 3, 2, 0, 8, 128, + 1, 0, 255, 128, 16, 0, + 85, 160, 5, 0, 0, 3, + 2, 0, 8, 128, 2, 0, + 255, 128, 11, 0, 85, 160, + 46, 0, 0, 2, 0, 0, + 1, 176, 2, 0, 255, 128, 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, + 7, 128, 0, 0, 228, 128, + 18, 32, 228, 161, 0, 0, + 0, 176, 8, 0, 0, 3, + 2, 0, 8, 128, 4, 0, + 228, 128, 4, 0, 228, 128, + 7, 0, 0, 2, 2, 0, + 8, 128, 2, 0, 255, 128, + 5, 0, 0, 3, 4, 0, + 7, 128, 2, 0, 255, 128, + 4, 0, 228, 128, 8, 0, + 0, 3, 3, 0, 8, 128, + 1, 0, 228, 128, 4, 0, + 228, 129, 11, 0, 0, 3, + 3, 0, 8, 128, 3, 0, + 255, 128, 11, 0, 0, 160, + 5, 0, 0, 4, 4, 0, + 7, 128, 3, 0, 255, 128, + 17, 32, 228, 160, 0, 0, + 0, 176, 6, 0, 0, 2, + 2, 0, 8, 128, 2, 0, + 255, 128, 6, 0, 0, 3, + 3, 0, 8, 128, 17, 32, + 255, 160, 0, 0, 0, 176, + 4, 0, 0, 4, 2, 0, + 8, 128, 2, 0, 255, 128, + 3, 0, 255, 129, 11, 0, + 170, 160, 11, 0, 0, 3, + 2, 0, 8, 128, 2, 0, + 255, 128, 11, 0, 0, 160, + 5, 0, 0, 3, 4, 0, + 7, 128, 2, 0, 255, 128, + 4, 0, 228, 128, 4, 0, + 0, 4, 2, 0, 7, 128, + 4, 0, 228, 128, 13, 0, + 170, 160, 2, 0, 228, 128, + 2, 0, 0, 3, 1, 0, + 8, 128, 1, 0, 255, 128, + 11, 0, 170, 160, 39, 0, + 0, 0, 1, 0, 0, 2, + 3, 0, 7, 128, 2, 0, + 228, 128, 1, 0, 0, 2, + 1, 0, 8, 128, 11, 0, + 0, 160, 38, 0, 0, 1, + 2, 0, 228, 240, 2, 0, + 0, 3, 2, 0, 8, 128, + 1, 0, 255, 128, 16, 0, + 170, 160, 5, 0, 0, 3, + 2, 0, 8, 128, 2, 0, + 255, 128, 11, 0, 85, 160, + 46, 0, 0, 2, 0, 0, + 1, 176, 2, 0, 255, 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, + 2, 0, 8, 128, 4, 0, + 228, 128, 4, 0, 228, 128, + 7, 0, 0, 2, 2, 0, + 8, 128, 2, 0, 255, 128, + 5, 0, 0, 3, 4, 0, + 7, 128, 2, 0, 255, 128, + 4, 0, 228, 128, 8, 0, + 0, 3, 4, 0, 8, 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, + 4, 0, 255, 128, 11, 0, + 0, 160, 1, 0, 0, 2, + 4, 0, 4, 128, 11, 0, + 170, 160, 2, 0, 0, 4, + 4, 0, 5, 128, 4, 0, + 228, 128, 18, 32, 255, 160, 0, 0, 0, 176, 6, 0, 0, 2, 4, 0, 4, 128, 4, 0, 170, 128, 5, 0, @@ -451,7 +431,7 @@ const BYTE g_vs20_main[] = 4, 0, 170, 128, 4, 0, 0, 128, 12, 0, 0, 3, 4, 0, 4, 128, 4, 0, - 0, 128, 41, 0, 0, 160, + 0, 128, 11, 0, 0, 160, 4, 0, 0, 4, 4, 0, 2, 128, 4, 0, 170, 128, 4, 0, 85, 129, 4, 0, @@ -465,31 +445,33 @@ const BYTE g_vs20_main[] = 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, + 0, 2, 2, 0, 8, 128, + 2, 0, 255, 128, 6, 0, + 0, 3, 4, 0, 8, 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, + 2, 0, 8, 128, 2, 0, + 255, 128, 4, 0, 255, 129, + 11, 0, 170, 160, 11, 0, + 0, 3, 2, 0, 8, 128, + 2, 0, 255, 128, 11, 0, 0, 160, 5, 0, 0, 3, - 4, 0, 7, 128, 4, 0, + 4, 0, 7, 128, 2, 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, + 255, 128, 11, 0, 170, 160, + 39, 0, 0, 0, 1, 0, + 0, 2, 3, 0, 8, 128, + 3, 0, 255, 144, 11, 0, 0, 3, 1, 0, 15, 128, - 3, 0, 228, 128, 41, 0, + 3, 0, 228, 128, 11, 0, 0, 160, 10, 0, 0, 3, 1, 0, 15, 128, 1, 0, - 228, 128, 41, 0, 255, 160, + 228, 128, 11, 0, 170, 160, 5, 0, 0, 3, 0, 0, 15, 208, 1, 0, 228, 128, 12, 0, 228, 160, 2, 0, @@ -502,8 +484,8 @@ const BYTE g_vs20_main[] = 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, 0, 128, 11, 0, + 170, 160, 1, 0, 0, 2, 0, 0, 3, 224, 2, 0, 228, 144, 255, 255, 0, 0 }; diff --git a/src/d3d/shaders/default_amb_VS.h b/src/d3d/shaders/default_amb_VS.h index 0c49d78..6c22e23 100644 --- a/src/d3d/shaders/default_amb_VS.h +++ b/src/d3d/shaders/default_amb_VS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T vs_2_0 /Fh default_amb_VS.h default_VS.hlsl +// fxc /nologo /T vs_2_0 /Fh default_amb_VS.h default_VS.hlsl // // // Parameters: @@ -26,18 +26,15 @@ // vs_2_0 - def c4, 0, -0, -1, 1 + def c4, 0, 1, 0, 0 dcl_position v0 dcl_texcoord v1 dcl_color v2 - mov r0.x, c4.x - slt r0.x, r0.x, c13.w - add r1, v2, c4.yyyz - mad r0, r0.x, r1, c4.xxxw - mov r1.x, c13.x - mad r0.xyz, c15, r1.x, r0 + mov r0.xyz, c15 + mad r0.xyz, r0, c13.x, v2 + mov r0.w, v2.w max r0, r0, c4.x - min r0, r0, c4.w + min r0, r0, c4.y mul oD0, r0, c12 mul r0, v0.y, c1 mad r0, c0, v0.x, r0 @@ -47,10 +44,10 @@ mov oPos, r0 mul r0.x, r1.x, c14.z max r0.x, r0.x, c14.w - min oT0.z, r0.x, c4.w + min oT0.z, r0.x, c4.y mov oT0.xy, v1 -// approximately 19 instruction slots used +// approximately 16 instruction slots used #endif const BYTE g_vs20_main[] = @@ -104,65 +101,56 @@ const BYTE g_vs20_main[] = 51, 49, 49, 49, 0, 171, 171, 171, 81, 0, 0, 5, 4, 0, 15, 160, 0, 0, - 0, 0, 0, 0, 0, 128, - 0, 0, 128, 191, 0, 0, - 128, 63, 31, 0, 0, 2, + 0, 0, 0, 0, 128, 63, + 0, 0, 0, 0, 0, 0, + 0, 0, 31, 0, 0, 2, 0, 0, 0, 128, 0, 0, 15, 144, 31, 0, 0, 2, 5, 0, 0, 128, 1, 0, 15, 144, 31, 0, 0, 2, 10, 0, 0, 128, 2, 0, 15, 144, 1, 0, 0, 2, - 0, 0, 1, 128, 4, 0, - 0, 160, 12, 0, 0, 3, - 0, 0, 1, 128, 0, 0, - 0, 128, 13, 0, 255, 160, - 2, 0, 0, 3, 1, 0, - 15, 128, 2, 0, 228, 144, - 4, 0, 149, 160, 4, 0, - 0, 4, 0, 0, 15, 128, - 0, 0, 0, 128, 1, 0, - 228, 128, 4, 0, 192, 160, - 1, 0, 0, 2, 1, 0, - 1, 128, 13, 0, 0, 160, - 4, 0, 0, 4, 0, 0, - 7, 128, 15, 0, 228, 160, - 1, 0, 0, 128, 0, 0, - 228, 128, 11, 0, 0, 3, + 0, 0, 7, 128, 15, 0, + 228, 160, 4, 0, 0, 4, + 0, 0, 7, 128, 0, 0, + 228, 128, 13, 0, 0, 160, + 2, 0, 228, 144, 1, 0, + 0, 2, 0, 0, 8, 128, + 2, 0, 255, 144, 11, 0, + 0, 3, 0, 0, 15, 128, + 0, 0, 228, 128, 4, 0, + 0, 160, 10, 0, 0, 3, 0, 0, 15, 128, 0, 0, - 228, 128, 4, 0, 0, 160, - 10, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 4, 0, 255, 160, 5, 0, - 0, 3, 0, 0, 15, 208, - 0, 0, 228, 128, 12, 0, - 228, 160, 5, 0, 0, 3, + 228, 128, 4, 0, 85, 160, + 5, 0, 0, 3, 0, 0, + 15, 208, 0, 0, 228, 128, + 12, 0, 228, 160, 5, 0, + 0, 3, 0, 0, 15, 128, + 0, 0, 85, 144, 1, 0, + 228, 160, 4, 0, 0, 4, 0, 0, 15, 128, 0, 0, - 85, 144, 1, 0, 228, 160, - 4, 0, 0, 4, 0, 0, - 15, 128, 0, 0, 228, 160, - 0, 0, 0, 144, 0, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 15, 128, 2, 0, - 228, 160, 0, 0, 170, 144, + 228, 160, 0, 0, 0, 144, 0, 0, 228, 128, 4, 0, 0, 4, 0, 0, 15, 128, - 3, 0, 228, 160, 0, 0, - 255, 144, 0, 0, 228, 128, - 2, 0, 0, 3, 1, 0, - 1, 128, 0, 0, 255, 128, - 14, 0, 85, 161, 1, 0, - 0, 2, 0, 0, 15, 192, - 0, 0, 228, 128, 5, 0, + 2, 0, 228, 160, 0, 0, + 170, 144, 0, 0, 228, 128, + 4, 0, 0, 4, 0, 0, + 15, 128, 3, 0, 228, 160, + 0, 0, 255, 144, 0, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 1, 128, 0, 0, + 255, 128, 14, 0, 85, 161, + 1, 0, 0, 2, 0, 0, + 15, 192, 0, 0, 228, 128, + 5, 0, 0, 3, 0, 0, + 1, 128, 1, 0, 0, 128, + 14, 0, 170, 160, 11, 0, 0, 3, 0, 0, 1, 128, - 1, 0, 0, 128, 14, 0, - 170, 160, 11, 0, 0, 3, - 0, 0, 1, 128, 0, 0, - 0, 128, 14, 0, 255, 160, - 10, 0, 0, 3, 0, 0, - 4, 224, 0, 0, 0, 128, - 4, 0, 255, 160, 1, 0, - 0, 2, 0, 0, 3, 224, - 1, 0, 228, 144, 255, 255, - 0, 0 + 0, 0, 0, 128, 14, 0, + 255, 160, 10, 0, 0, 3, + 0, 0, 4, 224, 0, 0, + 0, 128, 4, 0, 85, 160, + 1, 0, 0, 2, 0, 0, + 3, 224, 1, 0, 228, 144, + 255, 255, 0, 0 }; diff --git a/src/d3d/shaders/default_amb_dir_VS.h b/src/d3d/shaders/default_amb_dir_VS.h index d813eb6..768042f 100644 --- a/src/d3d/shaders/default_amb_dir_VS.h +++ b/src/d3d/shaders/default_amb_dir_VS.h @@ -2,7 +2,8 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T vs_2_0 /DDIRECTIONALS /Fh default_amb_dir_VS.h default_VS.hlsl +// fxc /nologo /T vs_2_0 /DDIRECTIONALS /Fh default_amb_dir_VS.h +// default_VS.hlsl // // // Parameters: @@ -42,8 +43,7 @@ // vs_2_0 - def c4, 3, 0, 0, 0 - def c5, 0, -0, -1, 1 + def c4, 0, 3, 1, 0 dcl_position v0 dcl_normal v1 dcl_texcoord v2 @@ -56,34 +56,31 @@ mul r0.xyz, v1.y, c9 mad r0.xyz, c8, v1.x, r0 mad r0.xyz, c10, v1.z, r0 - mov r1.x, c5.x - slt r1.x, r1.x, c13.w - add r2, v3, c5.yyyz - mad r1, r1.x, r2, c5.xxxw - mov r2.x, c13.x - mad r2.xyz, c15, r2.x, r1 - mov r1.xyz, r2 - mov r2.w, c5.x + mov r1.x, c13.x + mad r1.xyz, c15, r1.x, v3 + mov r2.xyz, r1 + mov r1.w, c4.x rep i0 - add r3.x, r2.w, c16.x - mul r3.x, r3.x, c4.x + add r3.x, r1.w, c16.x + mul r3.x, r3.x, c4.y mova a0.x, r3.x dp3 r3.x, r0, -c19[a0.x] - max r3.x, r3.x, c5.x + max r3.x, r3.x, c4.x mul r3.xyz, r3.x, c17[a0.x] - mad r1.xyz, r3, c13.z, r1 - add r2.w, r2.w, c5.w + mad r2.xyz, r3, c13.z, r2 + add r1.w, r1.w, c4.z endrep - max r1, r1, c5.x - min r1, r1, c5.w + mov r2.w, v3.w + max r1, r2, c4.x + min r1, r1, c4.z 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, c5.w + min oT0.z, r0.x, c4.z mov oT0.xy, v2 -// approximately 37 instruction slots used +// approximately 34 instruction slots used #endif const BYTE g_vs20_main[] = @@ -180,13 +177,9 @@ const BYTE g_vs20_main[] = 53, 50, 46, 51, 49, 49, 49, 0, 171, 171, 81, 0, 0, 5, 4, 0, 15, 160, - 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 81, 0, - 0, 5, 5, 0, 15, 160, - 0, 0, 0, 0, 0, 0, - 0, 128, 0, 0, 128, 191, - 0, 0, 128, 63, 31, 0, + 64, 64, 0, 0, 128, 63, + 0, 0, 0, 0, 31, 0, 0, 2, 0, 0, 0, 128, 0, 0, 15, 144, 31, 0, 0, 2, 3, 0, 0, 128, @@ -220,69 +213,60 @@ const BYTE g_vs20_main[] = 228, 160, 1, 0, 170, 144, 0, 0, 228, 128, 1, 0, 0, 2, 1, 0, 1, 128, - 5, 0, 0, 160, 12, 0, - 0, 3, 1, 0, 1, 128, - 1, 0, 0, 128, 13, 0, - 255, 160, 2, 0, 0, 3, - 2, 0, 15, 128, 3, 0, - 228, 144, 5, 0, 149, 160, - 4, 0, 0, 4, 1, 0, - 15, 128, 1, 0, 0, 128, - 2, 0, 228, 128, 5, 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, - 1, 0, 228, 128, 1, 0, - 0, 2, 1, 0, 7, 128, - 2, 0, 228, 128, 1, 0, - 0, 2, 2, 0, 8, 128, - 5, 0, 0, 160, 38, 0, - 0, 1, 0, 0, 228, 240, - 2, 0, 0, 3, 3, 0, - 1, 128, 2, 0, 255, 128, - 16, 0, 0, 160, 5, 0, - 0, 3, 3, 0, 1, 128, - 3, 0, 0, 128, 4, 0, - 0, 160, 46, 0, 0, 2, - 0, 0, 1, 176, 3, 0, - 0, 128, 8, 0, 0, 4, - 3, 0, 1, 128, 0, 0, - 228, 128, 19, 32, 228, 161, - 0, 0, 0, 176, 11, 0, - 0, 3, 3, 0, 1, 128, - 3, 0, 0, 128, 5, 0, - 0, 160, 5, 0, 0, 4, - 3, 0, 7, 128, 3, 0, - 0, 128, 17, 32, 228, 160, - 0, 0, 0, 176, 4, 0, + 13, 0, 0, 160, 4, 0, 0, 4, 1, 0, 7, 128, - 3, 0, 228, 128, 13, 0, - 170, 160, 1, 0, 228, 128, - 2, 0, 0, 3, 2, 0, - 8, 128, 2, 0, 255, 128, - 5, 0, 255, 160, 39, 0, - 0, 0, 11, 0, 0, 3, + 15, 0, 228, 160, 1, 0, + 0, 128, 3, 0, 228, 144, + 1, 0, 0, 2, 2, 0, + 7, 128, 1, 0, 228, 128, + 1, 0, 0, 2, 1, 0, + 8, 128, 4, 0, 0, 160, + 38, 0, 0, 1, 0, 0, + 228, 240, 2, 0, 0, 3, + 3, 0, 1, 128, 1, 0, + 255, 128, 16, 0, 0, 160, + 5, 0, 0, 3, 3, 0, + 1, 128, 3, 0, 0, 128, + 4, 0, 85, 160, 46, 0, + 0, 2, 0, 0, 1, 176, + 3, 0, 0, 128, 8, 0, + 0, 4, 3, 0, 1, 128, + 0, 0, 228, 128, 19, 32, + 228, 161, 0, 0, 0, 176, + 11, 0, 0, 3, 3, 0, + 1, 128, 3, 0, 0, 128, + 4, 0, 0, 160, 5, 0, + 0, 4, 3, 0, 7, 128, + 3, 0, 0, 128, 17, 32, + 228, 160, 0, 0, 0, 176, + 4, 0, 0, 4, 2, 0, + 7, 128, 3, 0, 228, 128, + 13, 0, 170, 160, 2, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 8, 128, 1, 0, + 255, 128, 4, 0, 170, 160, + 39, 0, 0, 0, 1, 0, + 0, 2, 2, 0, 8, 128, + 3, 0, 255, 144, 11, 0, + 0, 3, 1, 0, 15, 128, + 2, 0, 228, 128, 4, 0, + 0, 160, 10, 0, 0, 3, 1, 0, 15, 128, 1, 0, - 228, 128, 5, 0, 0, 160, - 10, 0, 0, 3, 1, 0, - 15, 128, 1, 0, 228, 128, - 5, 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, + 228, 128, 4, 0, 170, 160, 5, 0, 0, 3, 0, 0, - 1, 128, 0, 0, 0, 128, - 14, 0, 170, 160, 11, 0, + 15, 208, 1, 0, 228, 128, + 12, 0, 228, 160, 2, 0, 0, 3, 0, 0, 1, 128, - 0, 0, 0, 128, 14, 0, - 255, 160, 10, 0, 0, 3, - 0, 0, 4, 224, 0, 0, - 0, 128, 5, 0, 255, 160, - 1, 0, 0, 2, 0, 0, - 3, 224, 2, 0, 228, 144, - 255, 255, 0, 0 + 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, + 1, 128, 0, 0, 0, 128, + 14, 0, 255, 160, 10, 0, + 0, 3, 0, 0, 4, 224, + 0, 0, 0, 128, 4, 0, + 170, 160, 1, 0, 0, 2, + 0, 0, 3, 224, 2, 0, + 228, 144, 255, 255, 0, 0 }; diff --git a/src/d3d/shaders/default_tex_PS.h b/src/d3d/shaders/default_tex_PS.h index 62a582f..a25f918 100644 --- a/src/d3d/shaders/default_tex_PS.h +++ b/src/d3d/shaders/default_tex_PS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T ps_2_0 /DTEX /Fh default_tex_PS.h default_PS.hlsl +// fxc /nologo /T ps_2_0 /DTEX /Fh default_tex_PS.h default_PS.hlsl // // // Parameters: diff --git a/src/d3d/shaders/im2d_PS.h b/src/d3d/shaders/im2d_PS.h index a792e69..0a5c28d 100644 --- a/src/d3d/shaders/im2d_PS.h +++ b/src/d3d/shaders/im2d_PS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T ps_2_0 /Fh im2d_PS.h im2d_PS.hlsl +// fxc /nologo /T ps_2_0 /Fh im2d_PS.h im2d_PS.hlsl // ps_2_0 dcl v0 diff --git a/src/d3d/shaders/im2d_tex_PS.h b/src/d3d/shaders/im2d_tex_PS.h index 8f53924..194db9e 100644 --- a/src/d3d/shaders/im2d_tex_PS.h +++ b/src/d3d/shaders/im2d_tex_PS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T ps_2_0 /DTEX /Fh im2d_tex_PS.h im2d_PS.hlsl +// fxc /nologo /T ps_2_0 /DTEX /Fh im2d_tex_PS.h im2d_PS.hlsl // // // Parameters: diff --git a/src/d3d/shaders/make_default.cmd b/src/d3d/shaders/make_default.cmd index 0c08985..6a533fe 100644 --- a/src/d3d/shaders/make_default.cmd +++ b/src/d3d/shaders/make_default.cmd @@ -1,10 +1,10 @@ @echo off -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T vs_2_0 /Fh default_amb_VS.h default_VS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T vs_2_0 /DDIRECTIONALS /Fh default_amb_dir_VS.h default_VS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh default_all_VS.h default_VS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T vs_2_0 /Fh default_amb_VS.h default_VS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T vs_2_0 /DDIRECTIONALS /Fh default_amb_dir_VS.h default_VS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh default_all_VS.h default_VS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T ps_2_0 /Fh default_PS.h default_PS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T ps_2_0 /DTEX /Fh default_tex_PS.h default_PS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T ps_2_0 /Fh default_PS.h default_PS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T ps_2_0 /DTEX /Fh default_tex_PS.h default_PS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T ps_2_0 /Fh im2d_PS.h im2d_PS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T ps_2_0 /DTEX /Fh im2d_tex_PS.h im2d_PS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T ps_2_0 /Fh im2d_PS.h im2d_PS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T ps_2_0 /DTEX /Fh im2d_tex_PS.h im2d_PS.hlsl diff --git a/src/d3d/shaders/make_matfx.cmd b/src/d3d/shaders/make_matfx.cmd index 5659169..d0bc4fa 100644 --- a/src/d3d/shaders/make_matfx.cmd +++ b/src/d3d/shaders/make_matfx.cmd @@ -1,7 +1,7 @@ @echo off -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T vs_2_0 /Fh matfx_env_amb_VS.h matfx_env_VS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T vs_2_0 /DDIRECTIONALS /Fh matfx_env_amb_dir_VS.h matfx_env_VS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh matfx_env_all_VS.h matfx_env_VS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T vs_2_0 /Fh matfx_env_amb_VS.h matfx_env_VS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T vs_2_0 /DDIRECTIONALS /Fh matfx_env_amb_dir_VS.h matfx_env_VS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh matfx_env_all_VS.h matfx_env_VS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T ps_2_0 /Fh matfx_env_PS.h matfx_env_PS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T ps_2_0 /DTEX /Fh matfx_env_tex_PS.h matfx_env_PS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T ps_2_0 /Fh matfx_env_PS.h matfx_env_PS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T ps_2_0 /DTEX /Fh matfx_env_tex_PS.h matfx_env_PS.hlsl diff --git a/src/d3d/shaders/make_skin.cmd b/src/d3d/shaders/make_skin.cmd index 19fb35a..b7822ca 100644 --- a/src/d3d/shaders/make_skin.cmd +++ b/src/d3d/shaders/make_skin.cmd @@ -1,4 +1,4 @@ @echo off -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T vs_2_0 /Fh skin_amb_VS.h skin_VS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T vs_2_0 /DDIRECTIONALS /Fh skin_amb_dir_VS.h skin_VS.hlsl -"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh skin_all_VS.h skin_VS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T vs_2_0 /Fh skin_amb_VS.h skin_VS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T vs_2_0 /DDIRECTIONALS /Fh skin_amb_dir_VS.h skin_VS.hlsl +"%DXSDK_DIR%\utilities\bin\x86\fxc.exe" /nologo /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh skin_all_VS.h skin_VS.hlsl diff --git a/src/d3d/shaders/matfx_env_PS.h b/src/d3d/shaders/matfx_env_PS.h index 2224b68..b6bf3cb 100644 --- a/src/d3d/shaders/matfx_env_PS.h +++ b/src/d3d/shaders/matfx_env_PS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T ps_2_0 /Fh matfx_env_PS.h matfx_env_PS.hlsl +// fxc /nologo /T ps_2_0 /Fh matfx_env_PS.h matfx_env_PS.hlsl // // // Parameters: diff --git a/src/d3d/shaders/matfx_env_VS.hlsl b/src/d3d/shaders/matfx_env_VS.hlsl index 3f49241..4521855 100644 --- a/src/d3d/shaders/matfx_env_VS.hlsl +++ b/src/d3d/shaders/matfx_env_VS.hlsl @@ -29,10 +29,7 @@ VS_out main(in VS_in input) output.TexCoord0.xy = input.TexCoord; output.TexCoord1 = mul(texMat, float4(Normal, 1.0)).xy; - output.Color = float4(0.0, 0.0, 0.0, 1.0); - if(surfPrelight > 0.0) - output.Color = input.Prelight; - + output.Color = input.Prelight; output.Color.rgb += ambientLight.rgb * surfAmbient; int i; diff --git a/src/d3d/shaders/matfx_env_all_VS.h b/src/d3d/shaders/matfx_env_all_VS.h index 1ce35e1..c049dae 100644 --- a/src/d3d/shaders/matfx_env_all_VS.h +++ b/src/d3d/shaders/matfx_env_all_VS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh +// fxc /nologo /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh // matfx_env_all_VS.h matfx_env_VS.hlsl // // @@ -51,8 +51,7 @@ // vs_2_0 - def c11, 3, 0, 0, 0 - def c45, 0, -0, -1, 1 + def c11, 0, 3, 1, 0 dcl_position v0 dcl_normal v1 dcl_texcoord v2 @@ -69,77 +68,74 @@ mul r1.xyz, v1.y, c9 mad r1.xyz, c8, v1.x, r1 mad r1.xyz, c10, v1.z, r1 - mov r2.xw, c45 - slt r1.w, r2.x, c13.w - add r3, v3, c45.yyyz - mad r3, r1.w, r3, c45.xxxw mov r2.x, c13.x - mad r2.xyz, c15, r2.x, r3 - mov r4.xyz, r2 - mov r1.w, c45.x + mad r2.xyz, c15, r2.x, v3 + mov r3.xyz, r2 + mov r1.w, c11.x rep i0 - 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, c45.x - mul r5.xyz, r4.w, c17[a0.x] - mad r4.xyz, r5, c13.z, r4 - add r1.w, r1.w, c45.w + add r2.w, r1.w, c16.x + mul r2.w, r2.w, c11.y + mova a0.x, r2.w + dp3 r2.w, r1, -c19[a0.x] + max r2.w, r2.w, c11.x + mul r4.xyz, r2.w, c17[a0.x] + mad r3.xyz, r4, c13.z, r3 + add r1.w, r1.w, c11.z endrep - mov r2.xyz, r4 - mov r1.w, c45.x + mov r2.xyz, r3 + mov r1.w, c11.x rep i1 - 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, c45.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, c45.w - max r4.w, r4.w, c45.x - mul r5.xyz, r4.w, r5 - mad r2.xyz, r5, c13.z, r2 - add r1.w, r1.w, c45.w + add r2.w, r1.w, c16.y + mul r2.w, r2.w, c11.y + mova a0.x, r2.w + add r4.xyz, r0, -c18[a0.x] + dp3 r2.w, r4, r4 + rsq r2.w, r2.w + mul r4.xyz, r2.w, r4 + dp3 r3.w, r1, -r4 + max r3.w, r3.w, c11.x + mul r4.xyz, r3.w, c17[a0.x] + rcp r2.w, r2.w + rcp r3.w, c17[a0.x].w + mad r2.w, r2.w, -r3.w, c11.z + max r2.w, r2.w, c11.x + mul r4.xyz, r2.w, r4 + mad r2.xyz, r4, c13.z, r2 + add r1.w, r1.w, c11.z endrep mov r3.xyz, r2 - mov r1.w, c45.x + mov r1.w, c11.x rep i2 - add r4.x, r1.w, c16.z - mul r4.x, r4.x, c11.x - mova a0.x, r4.x + add r2.w, r1.w, c16.z + mul r2.w, r2.w, c11.y + mova a0.x, r2.w 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 r2.w, r4, r4 + rsq r2.w, r2.w + mul r4.xyz, r2.w, r4 + dp3 r4.w, r1, -r4 dp3 r4.x, r4, c19[a0.x] - max r4.y, r5.x, c45.x - add r4.x, r4.x, c18[a0.x].w - add r4.z, r2.w, c18[a0.x].w + max r4.y, r4.w, c11.x + mov r4.z, c11.z + add r4.xz, r4, c18[a0.x].w rcp r4.z, r4.z mul r4.x, r4.z, r4.x - slt r4.z, r4.x, c45.x + slt r4.z, r4.x, c11.x mad r4.y, r4.z, -r4.y, r4.y max r4.x, r4.x, c19[a0.x].w mul r4.x, r4.x, r4.y 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, c45.w - max r4.w, r4.w, c45.x - mul r4.xyz, r4.w, r4 + rcp r2.w, r2.w + rcp r4.w, c17[a0.x].w + mad r2.w, r2.w, -r4.w, c11.z + max r2.w, r2.w, c11.x + mul r4.xyz, r2.w, r4 mad r3.xyz, r4, c13.z, r3 - add r1.w, r1.w, c45.w + add r1.w, r1.w, c11.z endrep - max r2, r3, c45.x - min r2, r2, c45.w + mov r3.w, v3.w + max r2, r3, c11.x + min r2, r2, c11.z mul oD0, r2, c12 mul r0.xy, r1.y, c42 mad r0.xy, c41, r1.x, r0 @@ -148,10 +144,10 @@ 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, c45.w + min oT0.z, r0.x, c11.z mov oT0.xy, v2 -// approximately 102 instruction slots used +// approximately 99 instruction slots used #endif const BYTE g_vs20_main[] = @@ -269,13 +265,9 @@ const BYTE g_vs20_main[] = 50, 46, 51, 49, 49, 49, 0, 171, 81, 0, 0, 5, 11, 0, 15, 160, 0, 0, - 64, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 81, 0, 0, 5, - 45, 0, 15, 160, 0, 0, - 0, 0, 0, 0, 0, 128, - 0, 0, 128, 191, 0, 0, - 128, 63, 31, 0, 0, 2, + 0, 0, 0, 0, 64, 64, + 0, 0, 128, 63, 0, 0, + 0, 0, 31, 0, 0, 2, 0, 0, 0, 128, 0, 0, 15, 144, 31, 0, 0, 2, 3, 0, 0, 128, 1, 0, @@ -321,139 +313,127 @@ const BYTE g_vs20_main[] = 10, 0, 228, 160, 1, 0, 170, 144, 1, 0, 228, 128, 1, 0, 0, 2, 2, 0, - 9, 128, 45, 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, 45, 0, - 149, 160, 4, 0, 0, 4, - 3, 0, 15, 128, 1, 0, - 255, 128, 3, 0, 228, 128, - 45, 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, + 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, 144, 1, 0, 0, 2, + 3, 0, 7, 128, 2, 0, + 228, 128, 1, 0, 0, 2, + 1, 0, 8, 128, 11, 0, + 0, 160, 38, 0, 0, 1, + 0, 0, 228, 240, 2, 0, + 0, 3, 2, 0, 8, 128, + 1, 0, 255, 128, 16, 0, + 0, 160, 5, 0, 0, 3, + 2, 0, 8, 128, 2, 0, + 255, 128, 11, 0, 85, 160, + 46, 0, 0, 2, 0, 0, + 1, 176, 2, 0, 255, 128, + 8, 0, 0, 4, 2, 0, + 8, 128, 1, 0, 228, 128, + 19, 32, 228, 161, 0, 0, + 0, 176, 11, 0, 0, 3, + 2, 0, 8, 128, 2, 0, + 255, 128, 11, 0, 0, 160, + 5, 0, 0, 4, 4, 0, + 7, 128, 2, 0, 255, 128, + 17, 32, 228, 160, 0, 0, + 0, 176, 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, 11, 0, + 170, 160, 39, 0, 0, 0, + 1, 0, 0, 2, 2, 0, + 7, 128, 3, 0, 228, 128, + 1, 0, 0, 2, 1, 0, + 8, 128, 11, 0, 0, 160, + 38, 0, 0, 1, 1, 0, + 228, 240, 2, 0, 0, 3, + 2, 0, 8, 128, 1, 0, + 255, 128, 16, 0, 85, 160, + 5, 0, 0, 3, 2, 0, + 8, 128, 2, 0, 255, 128, + 11, 0, 85, 160, 46, 0, + 0, 2, 0, 0, 1, 176, + 2, 0, 255, 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, 2, 0, + 8, 128, 4, 0, 228, 128, + 4, 0, 228, 128, 7, 0, + 0, 2, 2, 0, 8, 128, + 2, 0, 255, 128, 5, 0, + 0, 3, 4, 0, 7, 128, + 2, 0, 255, 128, 4, 0, + 228, 128, 8, 0, 0, 3, + 3, 0, 8, 128, 1, 0, + 228, 128, 4, 0, 228, 129, + 11, 0, 0, 3, 3, 0, + 8, 128, 3, 0, 255, 128, + 11, 0, 0, 160, 5, 0, + 0, 4, 4, 0, 7, 128, + 3, 0, 255, 128, 17, 32, + 228, 160, 0, 0, 0, 176, + 6, 0, 0, 2, 2, 0, + 8, 128, 2, 0, 255, 128, + 6, 0, 0, 3, 3, 0, + 8, 128, 17, 32, 255, 160, + 0, 0, 0, 176, 4, 0, + 0, 4, 2, 0, 8, 128, + 2, 0, 255, 128, 3, 0, + 255, 129, 11, 0, 170, 160, + 11, 0, 0, 3, 2, 0, + 8, 128, 2, 0, 255, 128, + 11, 0, 0, 160, 5, 0, + 0, 3, 4, 0, 7, 128, + 2, 0, 255, 128, 4, 0, + 228, 128, 4, 0, 0, 4, + 2, 0, 7, 128, 4, 0, + 228, 128, 13, 0, 170, 160, + 2, 0, 228, 128, 2, 0, + 0, 3, 1, 0, 8, 128, + 1, 0, 255, 128, 11, 0, + 170, 160, 39, 0, 0, 0, + 1, 0, 0, 2, 3, 0, 7, 128, 2, 0, 228, 128, 1, 0, 0, 2, 1, 0, - 8, 128, 45, 0, 0, 160, - 38, 0, 0, 1, 0, 0, + 8, 128, 11, 0, 0, 160, + 38, 0, 0, 1, 2, 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, + 2, 0, 8, 128, 1, 0, + 255, 128, 16, 0, 170, 160, + 5, 0, 0, 3, 2, 0, + 8, 128, 2, 0, 255, 128, + 11, 0, 85, 160, 46, 0, 0, 2, 0, 0, 1, 176, - 4, 0, 255, 128, 8, 0, - 0, 4, 4, 0, 8, 128, - 1, 0, 228, 128, 19, 32, + 2, 0, 255, 128, 2, 0, + 0, 4, 4, 0, 7, 128, + 0, 0, 228, 128, 18, 32, 228, 161, 0, 0, 0, 176, - 11, 0, 0, 3, 4, 0, - 8, 128, 4, 0, 255, 128, - 45, 0, 0, 160, 5, 0, - 0, 4, 5, 0, 7, 128, - 4, 0, 255, 128, 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, 1, 0, - 255, 128, 45, 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, - 45, 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, 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, 45, 0, - 0, 160, 5, 0, 0, 4, - 5, 0, 7, 128, 5, 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, 8, 128, - 17, 32, 255, 160, 0, 0, - 0, 176, 4, 0, 0, 4, - 4, 0, 8, 128, 4, 0, - 255, 128, 5, 0, 255, 129, - 45, 0, 255, 160, 11, 0, - 0, 3, 4, 0, 8, 128, - 4, 0, 255, 128, 45, 0, - 0, 160, 5, 0, 0, 3, - 5, 0, 7, 128, 4, 0, - 255, 128, 5, 0, 228, 128, - 4, 0, 0, 4, 2, 0, - 7, 128, 5, 0, 228, 128, - 13, 0, 170, 160, 2, 0, - 228, 128, 2, 0, 0, 3, - 1, 0, 8, 128, 1, 0, - 255, 128, 45, 0, 255, 160, - 39, 0, 0, 0, 1, 0, - 0, 2, 3, 0, 7, 128, - 2, 0, 228, 128, 1, 0, - 0, 2, 1, 0, 8, 128, - 45, 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, - 45, 0, 0, 160, 2, 0, - 0, 4, 4, 0, 1, 128, - 4, 0, 0, 128, 18, 32, - 255, 160, 0, 0, 0, 176, + 8, 0, 0, 3, 2, 0, + 8, 128, 4, 0, 228, 128, + 4, 0, 228, 128, 7, 0, + 0, 2, 2, 0, 8, 128, + 2, 0, 255, 128, 5, 0, + 0, 3, 4, 0, 7, 128, + 2, 0, 255, 128, 4, 0, + 228, 128, 8, 0, 0, 3, + 4, 0, 8, 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, 4, 0, + 255, 128, 11, 0, 0, 160, + 1, 0, 0, 2, 4, 0, + 4, 128, 11, 0, 170, 160, 2, 0, 0, 4, 4, 0, - 4, 128, 2, 0, 255, 128, + 5, 128, 4, 0, 228, 128, 18, 32, 255, 160, 0, 0, 0, 176, 6, 0, 0, 2, 4, 0, 4, 128, 4, 0, @@ -462,7 +442,7 @@ const BYTE g_vs20_main[] = 170, 128, 4, 0, 0, 128, 12, 0, 0, 3, 4, 0, 4, 128, 4, 0, 0, 128, - 45, 0, 0, 160, 4, 0, + 11, 0, 0, 160, 4, 0, 0, 4, 4, 0, 2, 128, 4, 0, 170, 128, 4, 0, 85, 129, 4, 0, 85, 128, @@ -476,31 +456,33 @@ const BYTE g_vs20_main[] = 7, 128, 4, 0, 0, 128, 17, 32, 228, 160, 0, 0, 0, 176, 6, 0, 0, 2, - 4, 0, 8, 128, 4, 0, + 2, 0, 8, 128, 2, 0, 255, 128, 6, 0, 0, 3, - 5, 0, 1, 128, 17, 32, + 4, 0, 8, 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, 45, 0, - 255, 160, 11, 0, 0, 3, - 4, 0, 8, 128, 4, 0, - 255, 128, 45, 0, 0, 160, + 4, 0, 0, 4, 2, 0, + 8, 128, 2, 0, 255, 128, + 4, 0, 255, 129, 11, 0, + 170, 160, 11, 0, 0, 3, + 2, 0, 8, 128, 2, 0, + 255, 128, 11, 0, 0, 160, 5, 0, 0, 3, 4, 0, - 7, 128, 4, 0, 255, 128, + 7, 128, 2, 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, - 45, 0, 255, 160, 39, 0, - 0, 0, 11, 0, 0, 3, + 11, 0, 170, 160, 39, 0, + 0, 0, 1, 0, 0, 2, + 3, 0, 8, 128, 3, 0, + 255, 144, 11, 0, 0, 3, 2, 0, 15, 128, 3, 0, - 228, 128, 45, 0, 0, 160, + 228, 128, 11, 0, 0, 160, 10, 0, 0, 3, 2, 0, 15, 128, 2, 0, 228, 128, - 45, 0, 255, 160, 5, 0, + 11, 0, 170, 160, 5, 0, 0, 3, 0, 0, 15, 208, 2, 0, 228, 128, 12, 0, 228, 160, 5, 0, 0, 3, @@ -525,7 +507,7 @@ const BYTE g_vs20_main[] = 0, 0, 0, 128, 14, 0, 255, 160, 10, 0, 0, 3, 0, 0, 4, 224, 0, 0, - 0, 128, 45, 0, 255, 160, + 0, 128, 11, 0, 170, 160, 1, 0, 0, 2, 0, 0, 3, 224, 2, 0, 228, 144, 255, 255, 0, 0 diff --git a/src/d3d/shaders/matfx_env_amb_VS.h b/src/d3d/shaders/matfx_env_amb_VS.h index bcaaa2f..c6314fb 100644 --- a/src/d3d/shaders/matfx_env_amb_VS.h +++ b/src/d3d/shaders/matfx_env_amb_VS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T vs_2_0 /Fh matfx_env_amb_VS.h matfx_env_VS.hlsl +// fxc /nologo /T vs_2_0 /Fh matfx_env_amb_VS.h matfx_env_VS.hlsl // // // Parameters: @@ -30,7 +30,7 @@ // vs_2_0 - def c4, 0, -0, -1, 1 + def c4, 0, 1, 0, 0 dcl_position v0 dcl_normal v1 dcl_texcoord v2 @@ -42,14 +42,11 @@ mad r0.xy, c41, r0.x, r0.ywzw mad r0.xy, c43, r0.z, r0 add oT1.xy, r0, c44 - mov r0.x, c4.x - slt r0.x, r0.x, c13.w - add r1, v3, c4.yyyz - mad r0, r0.x, r1, c4.xxxw - mov r1.x, c13.x - mad r0.xyz, c15, r1.x, r0 + mov r0.xyz, c15 + mad r0.xyz, r0, c13.x, v3 + mov r0.w, v3.w max r0, r0, c4.x - min r0, r0, c4.w + min r0, r0, c4.y mul oD0, r0, c12 mul r0, v0.y, c1 mad r0, c0, v0.x, r0 @@ -59,10 +56,10 @@ mov oPos, r0 mul r0.x, r1.x, c14.z max r0.x, r0.x, c14.w - min oT0.z, r0.x, c4.w + min oT0.z, r0.x, c4.y mov oT0.xy, v2 -// approximately 26 instruction slots used +// approximately 23 instruction slots used #endif const BYTE g_vs20_main[] = @@ -129,8 +126,8 @@ const BYTE g_vs20_main[] = 49, 49, 0, 171, 171, 171, 81, 0, 0, 5, 4, 0, 15, 160, 0, 0, 0, 0, - 0, 0, 0, 128, 0, 0, - 128, 191, 0, 0, 128, 63, + 0, 0, 128, 63, 0, 0, + 0, 0, 0, 0, 0, 0, 31, 0, 0, 2, 0, 0, 0, 128, 0, 0, 15, 144, 31, 0, 0, 2, 3, 0, @@ -161,56 +158,47 @@ const BYTE g_vs20_main[] = 0, 3, 1, 0, 3, 224, 0, 0, 228, 128, 44, 0, 228, 160, 1, 0, 0, 2, - 0, 0, 1, 128, 4, 0, - 0, 160, 12, 0, 0, 3, - 0, 0, 1, 128, 0, 0, - 0, 128, 13, 0, 255, 160, - 2, 0, 0, 3, 1, 0, - 15, 128, 3, 0, 228, 144, - 4, 0, 149, 160, 4, 0, - 0, 4, 0, 0, 15, 128, - 0, 0, 0, 128, 1, 0, - 228, 128, 4, 0, 192, 160, - 1, 0, 0, 2, 1, 0, - 1, 128, 13, 0, 0, 160, - 4, 0, 0, 4, 0, 0, - 7, 128, 15, 0, 228, 160, - 1, 0, 0, 128, 0, 0, - 228, 128, 11, 0, 0, 3, + 0, 0, 7, 128, 15, 0, + 228, 160, 4, 0, 0, 4, + 0, 0, 7, 128, 0, 0, + 228, 128, 13, 0, 0, 160, + 3, 0, 228, 144, 1, 0, + 0, 2, 0, 0, 8, 128, + 3, 0, 255, 144, 11, 0, + 0, 3, 0, 0, 15, 128, + 0, 0, 228, 128, 4, 0, + 0, 160, 10, 0, 0, 3, 0, 0, 15, 128, 0, 0, - 228, 128, 4, 0, 0, 160, - 10, 0, 0, 3, 0, 0, - 15, 128, 0, 0, 228, 128, - 4, 0, 255, 160, 5, 0, - 0, 3, 0, 0, 15, 208, - 0, 0, 228, 128, 12, 0, - 228, 160, 5, 0, 0, 3, + 228, 128, 4, 0, 85, 160, + 5, 0, 0, 3, 0, 0, + 15, 208, 0, 0, 228, 128, + 12, 0, 228, 160, 5, 0, + 0, 3, 0, 0, 15, 128, + 0, 0, 85, 144, 1, 0, + 228, 160, 4, 0, 0, 4, 0, 0, 15, 128, 0, 0, - 85, 144, 1, 0, 228, 160, - 4, 0, 0, 4, 0, 0, - 15, 128, 0, 0, 228, 160, - 0, 0, 0, 144, 0, 0, - 228, 128, 4, 0, 0, 4, - 0, 0, 15, 128, 2, 0, - 228, 160, 0, 0, 170, 144, + 228, 160, 0, 0, 0, 144, 0, 0, 228, 128, 4, 0, 0, 4, 0, 0, 15, 128, - 3, 0, 228, 160, 0, 0, - 255, 144, 0, 0, 228, 128, - 2, 0, 0, 3, 1, 0, - 1, 128, 0, 0, 255, 128, - 14, 0, 85, 161, 1, 0, - 0, 2, 0, 0, 15, 192, - 0, 0, 228, 128, 5, 0, + 2, 0, 228, 160, 0, 0, + 170, 144, 0, 0, 228, 128, + 4, 0, 0, 4, 0, 0, + 15, 128, 3, 0, 228, 160, + 0, 0, 255, 144, 0, 0, + 228, 128, 2, 0, 0, 3, + 1, 0, 1, 128, 0, 0, + 255, 128, 14, 0, 85, 161, + 1, 0, 0, 2, 0, 0, + 15, 192, 0, 0, 228, 128, + 5, 0, 0, 3, 0, 0, + 1, 128, 1, 0, 0, 128, + 14, 0, 170, 160, 11, 0, 0, 3, 0, 0, 1, 128, - 1, 0, 0, 128, 14, 0, - 170, 160, 11, 0, 0, 3, - 0, 0, 1, 128, 0, 0, - 0, 128, 14, 0, 255, 160, - 10, 0, 0, 3, 0, 0, - 4, 224, 0, 0, 0, 128, - 4, 0, 255, 160, 1, 0, - 0, 2, 0, 0, 3, 224, - 2, 0, 228, 144, 255, 255, - 0, 0 + 0, 0, 0, 128, 14, 0, + 255, 160, 10, 0, 0, 3, + 0, 0, 4, 224, 0, 0, + 0, 128, 4, 0, 85, 160, + 1, 0, 0, 2, 0, 0, + 3, 224, 2, 0, 228, 144, + 255, 255, 0, 0 }; diff --git a/src/d3d/shaders/matfx_env_amb_dir_VS.h b/src/d3d/shaders/matfx_env_amb_dir_VS.h index 9685c25..98d537a 100644 --- a/src/d3d/shaders/matfx_env_amb_dir_VS.h +++ b/src/d3d/shaders/matfx_env_amb_dir_VS.h @@ -2,7 +2,8 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T vs_2_0 /DDIRECTIONALS /Fh matfx_env_amb_dir_VS.h matfx_env_VS.hlsl +// fxc /nologo /T vs_2_0 /DDIRECTIONALS /Fh matfx_env_amb_dir_VS.h +// matfx_env_VS.hlsl // // // Parameters: @@ -44,8 +45,7 @@ // vs_2_0 - def c4, 3, 0, 0, 0 - def c5, 0, -0, -1, 1 + def c4, 0, 3, 1, 0 dcl_position v0 dcl_normal v1 dcl_texcoord v2 @@ -58,26 +58,23 @@ mul r0.xyz, v1.y, c9 mad r0.xyz, c8, v1.x, r0 mad r0.xyz, c10, v1.z, r0 - mov r1.x, c5.x - slt r1.x, r1.x, c13.w - add r2, v3, c5.yyyz - mad r1, r1.x, r2, c5.xxxw - mov r2.x, c13.x - mad r2.xyz, c15, r2.x, r1 - mov r1.xyz, r2 - mov r2.w, c5.x + mov r1.x, c13.x + mad r1.xyz, c15, r1.x, v3 + mov r2.xyz, r1 + mov r1.w, c4.x rep i0 - add r3.x, r2.w, c16.x - mul r3.x, r3.x, c4.x + add r3.x, r1.w, c16.x + mul r3.x, r3.x, c4.y mova a0.x, r3.x dp3 r3.x, r0, -c19[a0.x] - max r3.x, r3.x, c5.x + max r3.x, r3.x, c4.x mul r3.xyz, r3.x, c17[a0.x] - mad r1.xyz, r3, c13.z, r1 - add r2.w, r2.w, c5.w + mad r2.xyz, r3, c13.z, r2 + add r1.w, r1.w, c4.z endrep - max r1, r1, c5.x - min r1, r1, c5.w + mov r2.w, v3.w + max r1, r2, c4.x + min r1, r1, c4.z mul oD0, r1, c12 mul r1.xy, r0.y, c42 mad r0.xy, c41, r0.x, r1 @@ -86,10 +83,10 @@ 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, c5.w + min oT0.z, r0.x, c4.z mov oT0.xy, v2 -// approximately 41 instruction slots used +// approximately 38 instruction slots used #endif const BYTE g_vs20_main[] = @@ -191,13 +188,9 @@ const BYTE g_vs20_main[] = 51, 49, 49, 49, 0, 171, 171, 171, 81, 0, 0, 5, 4, 0, 15, 160, 0, 0, - 64, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 81, 0, 0, 5, - 5, 0, 15, 160, 0, 0, - 0, 0, 0, 0, 0, 128, - 0, 0, 128, 191, 0, 0, - 128, 63, 31, 0, 0, 2, + 0, 0, 0, 0, 64, 64, + 0, 0, 128, 63, 0, 0, + 0, 0, 31, 0, 0, 2, 0, 0, 0, 128, 0, 0, 15, 144, 31, 0, 0, 2, 3, 0, 0, 128, 1, 0, @@ -230,82 +223,73 @@ const BYTE g_vs20_main[] = 7, 128, 10, 0, 228, 160, 1, 0, 170, 144, 0, 0, 228, 128, 1, 0, 0, 2, - 1, 0, 1, 128, 5, 0, - 0, 160, 12, 0, 0, 3, - 1, 0, 1, 128, 1, 0, - 0, 128, 13, 0, 255, 160, - 2, 0, 0, 3, 2, 0, - 15, 128, 3, 0, 228, 144, - 5, 0, 149, 160, 4, 0, - 0, 4, 1, 0, 15, 128, - 1, 0, 0, 128, 2, 0, - 228, 128, 5, 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, 1, 0, - 228, 128, 1, 0, 0, 2, - 1, 0, 7, 128, 2, 0, - 228, 128, 1, 0, 0, 2, - 2, 0, 8, 128, 5, 0, - 0, 160, 38, 0, 0, 1, - 0, 0, 228, 240, 2, 0, + 1, 0, 1, 128, 13, 0, + 0, 160, 4, 0, 0, 4, + 1, 0, 7, 128, 15, 0, + 228, 160, 1, 0, 0, 128, + 3, 0, 228, 144, 1, 0, + 0, 2, 2, 0, 7, 128, + 1, 0, 228, 128, 1, 0, + 0, 2, 1, 0, 8, 128, + 4, 0, 0, 160, 38, 0, + 0, 1, 0, 0, 228, 240, + 2, 0, 0, 3, 3, 0, + 1, 128, 1, 0, 255, 128, + 16, 0, 0, 160, 5, 0, 0, 3, 3, 0, 1, 128, - 2, 0, 255, 128, 16, 0, - 0, 160, 5, 0, 0, 3, - 3, 0, 1, 128, 3, 0, - 0, 128, 4, 0, 0, 160, - 46, 0, 0, 2, 0, 0, - 1, 176, 3, 0, 0, 128, - 8, 0, 0, 4, 3, 0, - 1, 128, 0, 0, 228, 128, - 19, 32, 228, 161, 0, 0, - 0, 176, 11, 0, 0, 3, - 3, 0, 1, 128, 3, 0, - 0, 128, 5, 0, 0, 160, - 5, 0, 0, 4, 3, 0, - 7, 128, 3, 0, 0, 128, - 17, 32, 228, 160, 0, 0, - 0, 176, 4, 0, 0, 4, - 1, 0, 7, 128, 3, 0, - 228, 128, 13, 0, 170, 160, - 1, 0, 228, 128, 2, 0, - 0, 3, 2, 0, 8, 128, - 2, 0, 255, 128, 5, 0, - 255, 160, 39, 0, 0, 0, - 11, 0, 0, 3, 1, 0, + 3, 0, 0, 128, 4, 0, + 85, 160, 46, 0, 0, 2, + 0, 0, 1, 176, 3, 0, + 0, 128, 8, 0, 0, 4, + 3, 0, 1, 128, 0, 0, + 228, 128, 19, 32, 228, 161, + 0, 0, 0, 176, 11, 0, + 0, 3, 3, 0, 1, 128, + 3, 0, 0, 128, 4, 0, + 0, 160, 5, 0, 0, 4, + 3, 0, 7, 128, 3, 0, + 0, 128, 17, 32, 228, 160, + 0, 0, 0, 176, 4, 0, + 0, 4, 2, 0, 7, 128, + 3, 0, 228, 128, 13, 0, + 170, 160, 2, 0, 228, 128, + 2, 0, 0, 3, 1, 0, + 8, 128, 1, 0, 255, 128, + 4, 0, 170, 160, 39, 0, + 0, 0, 1, 0, 0, 2, + 2, 0, 8, 128, 3, 0, + 255, 144, 11, 0, 0, 3, + 1, 0, 15, 128, 2, 0, + 228, 128, 4, 0, 0, 160, + 10, 0, 0, 3, 1, 0, 15, 128, 1, 0, 228, 128, - 5, 0, 0, 160, 10, 0, - 0, 3, 1, 0, 15, 128, - 1, 0, 228, 128, 5, 0, - 255, 160, 5, 0, 0, 3, - 0, 0, 15, 208, 1, 0, - 228, 128, 12, 0, 228, 160, - 5, 0, 0, 3, 1, 0, - 3, 128, 0, 0, 85, 128, - 42, 0, 228, 160, 4, 0, - 0, 4, 0, 0, 3, 128, - 41, 0, 228, 160, 0, 0, - 0, 128, 1, 0, 228, 128, + 4, 0, 170, 160, 5, 0, + 0, 3, 0, 0, 15, 208, + 1, 0, 228, 128, 12, 0, + 228, 160, 5, 0, 0, 3, + 1, 0, 3, 128, 0, 0, + 85, 128, 42, 0, 228, 160, 4, 0, 0, 4, 0, 0, - 3, 128, 43, 0, 228, 160, - 0, 0, 170, 128, 0, 0, - 228, 128, 2, 0, 0, 3, - 1, 0, 3, 224, 0, 0, - 228, 128, 44, 0, 228, 160, - 2, 0, 0, 3, 0, 0, - 1, 128, 0, 0, 255, 128, - 14, 0, 85, 161, 5, 0, + 3, 128, 41, 0, 228, 160, + 0, 0, 0, 128, 1, 0, + 228, 128, 4, 0, 0, 4, + 0, 0, 3, 128, 43, 0, + 228, 160, 0, 0, 170, 128, + 0, 0, 228, 128, 2, 0, + 0, 3, 1, 0, 3, 224, + 0, 0, 228, 128, 44, 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, 1, 128, 0, 0, 0, 128, 14, 0, - 170, 160, 11, 0, 0, 3, - 0, 0, 1, 128, 0, 0, - 0, 128, 14, 0, 255, 160, - 10, 0, 0, 3, 0, 0, - 4, 224, 0, 0, 0, 128, - 5, 0, 255, 160, 1, 0, - 0, 2, 0, 0, 3, 224, - 2, 0, 228, 144, 255, 255, - 0, 0 + 255, 160, 10, 0, 0, 3, + 0, 0, 4, 224, 0, 0, + 0, 128, 4, 0, 170, 160, + 1, 0, 0, 2, 0, 0, + 3, 224, 2, 0, 228, 144, + 255, 255, 0, 0 }; diff --git a/src/d3d/shaders/matfx_env_tex_PS.h b/src/d3d/shaders/matfx_env_tex_PS.h index f6054a9..21eb196 100644 --- a/src/d3d/shaders/matfx_env_tex_PS.h +++ b/src/d3d/shaders/matfx_env_tex_PS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T ps_2_0 /DTEX /Fh matfx_env_tex_PS.h matfx_env_PS.hlsl +// fxc /nologo /T ps_2_0 /DTEX /Fh matfx_env_tex_PS.h matfx_env_PS.hlsl // // // Parameters: diff --git a/src/d3d/shaders/skin_VS.hlsl b/src/d3d/shaders/skin_VS.hlsl index 7e19c08..9df0369 100644 --- a/src/d3d/shaders/skin_VS.hlsl +++ b/src/d3d/shaders/skin_VS.hlsl @@ -37,10 +37,7 @@ VS_out main(in VS_in input) output.TexCoord0.xy = input.TexCoord; - output.Color = float4(0.0, 0.0, 0.0, 1.0); - if(surfPrelight > 0.0) - output.Color = input.Prelight; - + output.Color = input.Prelight; output.Color.rgb += ambientLight.rgb * surfAmbient; int i; diff --git a/src/d3d/shaders/skin_all_VS.h b/src/d3d/shaders/skin_all_VS.h index 9e20072..556b66f 100644 --- a/src/d3d/shaders/skin_all_VS.h +++ b/src/d3d/shaders/skin_all_VS.h @@ -2,8 +2,8 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh skin_all_VS.h -// skin_VS.hlsl +// fxc /nologo /T vs_2_0 /DDIRECTIONALS /DPOINTLIGHTS /DSPOTLIGHTS /Fh +// skin_all_VS.h skin_VS.hlsl // // // Parameters: @@ -51,8 +51,7 @@ // vs_2_0 - def c11, 4, 0, -0, -1 - def c297, 3, 0, 0, 0 + def c11, 4, 0, 3, 1 dcl_position v0 dcl_normal v1 dcl_texcoord v2 @@ -106,76 +105,75 @@ mul r3.xyz, r0.y, c9 mad r0.xyw, c8.xyzz, r0.x, r3.xyzz mad r0.xyz, c10, r0.z, r0.xyww - mov r3.yw, c11 - slt r0.w, r3.y, c13.w - lrp r4, r0.w, v3, -c11.zzzw mov r3.x, c13.x - mad r3.xyz, c15, r3.x, r4 - mov r5.xyz, r3 + mad r3.xyz, c15, r3.x, v3 + mov r4.xyz, r3 mov r0.w, c11.y rep i0 add r1.w, r0.w, c16.x - mul r1.w, r1.w, c297.x + mul r1.w, r1.w, c11.z mova a0.x, r1.w dp3 r1.w, r0, -c19[a0.x] max r1.w, r1.w, c11.y - mul r6.xyz, r1.w, c17[a0.x] - mad r5.xyz, r6, c13.z, r5 - add r0.w, r0.w, -c11.w + mul r5.xyz, r1.w, c17[a0.x] + mad r4.xyz, r5, c13.z, r4 + add r0.w, r0.w, c11.w endrep - mov r3.xyz, r5 + mov r3.xyz, r4 mov r0.w, c11.y rep i1 add r1.w, r0.w, c16.y - mul r1.w, r1.w, c297.x - mova a0.x, r1.w - add r6.xyz, r2, -c18[a0.x] - dp3 r1.w, r6, r6 - rsq r1.w, r1.w - mul r6.xyz, r1.w, r6 - dp3 r2.w, r0, -r6 - max r2.w, r2.w, c11.y - mul r6.xyz, r2.w, c17[a0.x] - rcp r1.w, r1.w - rcp r2.w, c17[a0.x].w - mad r1.w, r1.w, -r2.w, -c11.w - max r1.w, r1.w, c11.y - mul r6.xyz, r1.w, r6 - mad r3.xyz, r6, c13.z, r3 - add r0.w, r0.w, -c11.w - endrep - mov r4.xyz, r3 - mov r0.w, c11.y - rep i2 - add r1.w, r0.w, c16.z - mul r1.w, r1.w, c297.x + mul r1.w, r1.w, c11.z mova a0.x, r1.w add r5.xyz, r2, -c18[a0.x] dp3 r1.w, r5, r5 rsq r1.w, r1.w mul r5.xyz, r1.w, r5 dp3 r2.w, r0, -r5 - dp3 r5.x, r5, c19[a0.x] max r2.w, r2.w, c11.y - add r5.x, r5.x, c18[a0.x].w - add r5.y, -r3.w, c18[a0.x].w - rcp r5.y, r5.y - mul r5.x, r5.y, r5.x - slt r5.y, r5.x, c11.y - mad r2.w, r5.y, -r2.w, r2.w - max r5.x, r5.x, c19[a0.x].w - mul r2.w, r2.w, r5.x mul r5.xyz, r2.w, c17[a0.x] rcp r1.w, r1.w rcp r2.w, c17[a0.x].w - mad r1.w, r1.w, -r2.w, -c11.w + mad r1.w, r1.w, -r2.w, c11.w + max r1.w, r1.w, c11.y + mul r5.xyz, r1.w, r5 + mad r3.xyz, r5, c13.z, r3 + add r0.w, r0.w, c11.w + endrep + mov r4.xyz, r3 + mov r0.w, c11.y + rep i2 + add r1.w, r0.w, c16.z + mul r1.w, r1.w, c11.z + mova a0.x, r1.w + add r5.xyz, r2, -c18[a0.x] + dp3 r1.w, r5, r5 + rsq r1.w, r1.w + mul r5.xyz, r1.w, r5 + dp3 r2.w, r0, -r5 + dp3 r3.w, r5, c19[a0.x] + max r2.w, r2.w, c11.y + add r3.w, r3.w, c18[a0.x].w + mov r5.w, c11.w + add r5.x, r5.w, c18[a0.x].w + rcp r5.x, r5.x + mul r3.w, r3.w, r5.x + slt r5.x, r3.w, c11.y + mad r2.w, r5.x, -r2.w, r2.w + max r3.w, r3.w, c19[a0.x].w + mul r2.w, r2.w, r3.w + mul r5.xyz, r2.w, c17[a0.x] + rcp r1.w, r1.w + rcp r2.w, c17[a0.x].w + mad r1.w, r1.w, -r2.w, c11.w max r1.w, r1.w, c11.y mul r5.xyz, r1.w, r5 mad r4.xyz, r5, c13.z, r4 - add r0.w, r0.w, -c11.w + add r0.w, r0.w, c11.w endrep + mov r4.w, v3.w max r0, r4, c11.y - min r0, r0, -c11.w + min r0, r0, c11.w mul oD0, r0, c12 mul r0, r1.y, c1 mad r0, c0, r1.x, r0 @@ -185,10 +183,10 @@ 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, -c11.w + min oT0.z, r0.x, c11.w mov oT0.xy, v2 -// approximately 137 instruction slots used +// approximately 136 instruction slots used #endif const BYTE g_vs20_main[] = @@ -311,12 +309,8 @@ const BYTE g_vs20_main[] = 49, 0, 81, 0, 0, 5, 11, 0, 15, 160, 0, 0, 128, 64, 0, 0, 0, 0, - 0, 0, 0, 128, 0, 0, - 128, 191, 81, 0, 0, 5, - 41, 1, 15, 160, 0, 0, - 64, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 31, 0, 0, 2, + 0, 0, 64, 64, 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, @@ -491,20 +485,12 @@ const BYTE g_vs20_main[] = 7, 128, 10, 0, 228, 160, 0, 0, 170, 128, 0, 0, 244, 128, 1, 0, 0, 2, - 3, 0, 10, 128, 11, 0, - 228, 160, 12, 0, 0, 3, - 0, 0, 8, 128, 3, 0, - 85, 128, 13, 0, 255, 160, - 18, 0, 0, 4, 4, 0, - 15, 128, 0, 0, 255, 128, - 3, 0, 228, 144, 11, 0, - 234, 161, 1, 0, 0, 2, 3, 0, 1, 128, 13, 0, 0, 160, 4, 0, 0, 4, 3, 0, 7, 128, 15, 0, 228, 160, 3, 0, 0, 128, - 4, 0, 228, 128, 1, 0, - 0, 2, 5, 0, 7, 128, + 3, 0, 228, 144, 1, 0, + 0, 2, 4, 0, 7, 128, 3, 0, 228, 128, 1, 0, 0, 2, 0, 0, 8, 128, 11, 0, 85, 160, 38, 0, @@ -513,8 +499,8 @@ const BYTE g_vs20_main[] = 8, 128, 0, 0, 255, 128, 16, 0, 0, 160, 5, 0, 0, 3, 1, 0, 8, 128, - 1, 0, 255, 128, 41, 1, - 0, 160, 46, 0, 0, 2, + 1, 0, 255, 128, 11, 0, + 170, 160, 46, 0, 0, 2, 0, 0, 1, 176, 1, 0, 255, 128, 8, 0, 0, 4, 1, 0, 8, 128, 0, 0, @@ -523,17 +509,17 @@ const BYTE g_vs20_main[] = 0, 3, 1, 0, 8, 128, 1, 0, 255, 128, 11, 0, 85, 160, 5, 0, 0, 4, - 6, 0, 7, 128, 1, 0, + 5, 0, 7, 128, 1, 0, 255, 128, 17, 32, 228, 160, 0, 0, 0, 176, 4, 0, - 0, 4, 5, 0, 7, 128, - 6, 0, 228, 128, 13, 0, - 170, 160, 5, 0, 228, 128, + 0, 4, 4, 0, 7, 128, + 5, 0, 228, 128, 13, 0, + 170, 160, 4, 0, 228, 128, 2, 0, 0, 3, 0, 0, 8, 128, 0, 0, 255, 128, - 11, 0, 255, 161, 39, 0, + 11, 0, 255, 160, 39, 0, 0, 0, 1, 0, 0, 2, - 3, 0, 7, 128, 5, 0, + 3, 0, 7, 128, 4, 0, 228, 128, 1, 0, 0, 2, 0, 0, 8, 128, 11, 0, 85, 160, 38, 0, 0, 1, @@ -542,26 +528,26 @@ const BYTE g_vs20_main[] = 0, 0, 255, 128, 16, 0, 85, 160, 5, 0, 0, 3, 1, 0, 8, 128, 1, 0, - 255, 128, 41, 1, 0, 160, + 255, 128, 11, 0, 170, 160, 46, 0, 0, 2, 0, 0, 1, 176, 1, 0, 255, 128, - 2, 0, 0, 4, 6, 0, + 2, 0, 0, 4, 5, 0, 7, 128, 2, 0, 228, 128, 18, 32, 228, 161, 0, 0, 0, 176, 8, 0, 0, 3, - 1, 0, 8, 128, 6, 0, - 228, 128, 6, 0, 228, 128, + 1, 0, 8, 128, 5, 0, + 228, 128, 5, 0, 228, 128, 7, 0, 0, 2, 1, 0, 8, 128, 1, 0, 255, 128, - 5, 0, 0, 3, 6, 0, + 5, 0, 0, 3, 5, 0, 7, 128, 1, 0, 255, 128, - 6, 0, 228, 128, 8, 0, + 5, 0, 228, 128, 8, 0, 0, 3, 2, 0, 8, 128, - 0, 0, 228, 128, 6, 0, + 0, 0, 228, 128, 5, 0, 228, 129, 11, 0, 0, 3, 2, 0, 8, 128, 2, 0, 255, 128, 11, 0, 85, 160, - 5, 0, 0, 4, 6, 0, + 5, 0, 0, 4, 5, 0, 7, 128, 2, 0, 255, 128, 17, 32, 228, 160, 0, 0, 0, 176, 6, 0, 0, 2, @@ -572,18 +558,18 @@ const BYTE g_vs20_main[] = 4, 0, 0, 4, 1, 0, 8, 128, 1, 0, 255, 128, 2, 0, 255, 129, 11, 0, - 255, 161, 11, 0, 0, 3, + 255, 160, 11, 0, 0, 3, 1, 0, 8, 128, 1, 0, 255, 128, 11, 0, 85, 160, - 5, 0, 0, 3, 6, 0, + 5, 0, 0, 3, 5, 0, 7, 128, 1, 0, 255, 128, - 6, 0, 228, 128, 4, 0, + 5, 0, 228, 128, 4, 0, 0, 4, 3, 0, 7, 128, - 6, 0, 228, 128, 13, 0, + 5, 0, 228, 128, 13, 0, 170, 160, 3, 0, 228, 128, 2, 0, 0, 3, 0, 0, 8, 128, 0, 0, 255, 128, - 11, 0, 255, 161, 39, 0, + 11, 0, 255, 160, 39, 0, 0, 0, 1, 0, 0, 2, 4, 0, 7, 128, 3, 0, 228, 128, 1, 0, 0, 2, @@ -594,7 +580,7 @@ const BYTE g_vs20_main[] = 0, 0, 255, 128, 16, 0, 170, 160, 5, 0, 0, 3, 1, 0, 8, 128, 1, 0, - 255, 128, 41, 1, 0, 160, + 255, 128, 11, 0, 170, 160, 46, 0, 0, 2, 0, 0, 1, 176, 1, 0, 255, 128, 2, 0, 0, 4, 5, 0, @@ -611,35 +597,37 @@ const BYTE g_vs20_main[] = 0, 3, 2, 0, 8, 128, 0, 0, 228, 128, 5, 0, 228, 129, 8, 0, 0, 4, - 5, 0, 1, 128, 5, 0, + 3, 0, 8, 128, 5, 0, 228, 128, 19, 32, 228, 160, 0, 0, 0, 176, 11, 0, 0, 3, 2, 0, 8, 128, 2, 0, 255, 128, 11, 0, 85, 160, 2, 0, 0, 4, - 5, 0, 1, 128, 5, 0, - 0, 128, 18, 32, 255, 160, - 0, 0, 0, 176, 2, 0, - 0, 4, 5, 0, 2, 128, - 3, 0, 255, 129, 18, 32, + 3, 0, 8, 128, 3, 0, + 255, 128, 18, 32, 255, 160, + 0, 0, 0, 176, 1, 0, + 0, 2, 5, 0, 8, 128, + 11, 0, 255, 160, 2, 0, + 0, 4, 5, 0, 1, 128, + 5, 0, 255, 128, 18, 32, 255, 160, 0, 0, 0, 176, 6, 0, 0, 2, 5, 0, - 2, 128, 5, 0, 85, 128, - 5, 0, 0, 3, 5, 0, - 1, 128, 5, 0, 85, 128, + 1, 128, 5, 0, 0, 128, + 5, 0, 0, 3, 3, 0, + 8, 128, 3, 0, 255, 128, 5, 0, 0, 128, 12, 0, - 0, 3, 5, 0, 2, 128, - 5, 0, 0, 128, 11, 0, + 0, 3, 5, 0, 1, 128, + 3, 0, 255, 128, 11, 0, 85, 160, 4, 0, 0, 4, 2, 0, 8, 128, 5, 0, - 85, 128, 2, 0, 255, 129, + 0, 128, 2, 0, 255, 129, 2, 0, 255, 128, 11, 0, - 0, 4, 5, 0, 1, 128, - 5, 0, 0, 128, 19, 32, + 0, 4, 3, 0, 8, 128, + 3, 0, 255, 128, 19, 32, 255, 160, 0, 0, 0, 176, 5, 0, 0, 3, 2, 0, 8, 128, 2, 0, 255, 128, - 5, 0, 0, 128, 5, 0, + 3, 0, 255, 128, 5, 0, 0, 4, 5, 0, 7, 128, 2, 0, 255, 128, 17, 32, 228, 160, 0, 0, 0, 176, @@ -650,7 +638,7 @@ const BYTE g_vs20_main[] = 0, 0, 0, 176, 4, 0, 0, 4, 1, 0, 8, 128, 1, 0, 255, 128, 2, 0, - 255, 129, 11, 0, 255, 161, + 255, 129, 11, 0, 255, 160, 11, 0, 0, 3, 1, 0, 8, 128, 1, 0, 255, 128, 11, 0, 85, 160, 5, 0, @@ -662,13 +650,15 @@ const BYTE g_vs20_main[] = 4, 0, 228, 128, 2, 0, 0, 3, 0, 0, 8, 128, 0, 0, 255, 128, 11, 0, - 255, 161, 39, 0, 0, 0, + 255, 160, 39, 0, 0, 0, + 1, 0, 0, 2, 4, 0, + 8, 128, 3, 0, 255, 144, 11, 0, 0, 3, 0, 0, 15, 128, 4, 0, 228, 128, 11, 0, 85, 160, 10, 0, 0, 3, 0, 0, 15, 128, 0, 0, 228, 128, 11, 0, - 255, 161, 5, 0, 0, 3, + 255, 160, 5, 0, 0, 3, 0, 0, 15, 208, 0, 0, 228, 128, 12, 0, 228, 160, 5, 0, 0, 3, 0, 0, @@ -695,7 +685,7 @@ const BYTE g_vs20_main[] = 0, 128, 14, 0, 255, 160, 10, 0, 0, 3, 0, 0, 4, 224, 0, 0, 0, 128, - 11, 0, 255, 161, 1, 0, + 11, 0, 255, 160, 1, 0, 0, 2, 0, 0, 3, 224, 2, 0, 228, 144, 255, 255, 0, 0 diff --git a/src/d3d/shaders/skin_amb_VS.h b/src/d3d/shaders/skin_amb_VS.h index b030200..d9d5313 100644 --- a/src/d3d/shaders/skin_amb_VS.h +++ b/src/d3d/shaders/skin_amb_VS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T vs_2_0 /Fh skin_amb_VS.h skin_VS.hlsl +// fxc /nologo /T vs_2_0 /Fh skin_amb_VS.h skin_VS.hlsl // // // Parameters: @@ -28,19 +28,17 @@ // vs_2_0 - def c4, 4, 0, -0, -1 + def c4, 4, 0, 1, 0 dcl_position v0 dcl_texcoord v1 dcl_color v2 dcl_blendweight v3 dcl_blendindices v4 - mov r0.y, c4.y - slt r0.x, r0.y, c13.w - lrp r1, r0.x, v2, -c4.zzzw - mov r0.x, c13.x - mad r1.xyz, c15, r0.x, r1 - max r0, r1, c4.y - min r0, r0, -c4.w + mov r0.xyz, c15 + mad r0.xyz, r0, c13.x, v2 + mov r0.w, v2.w + max r0, r0, c4.y + min r0, r0, c4.z mul oD0, r0, c12 mul r0, v4, c4.x mova a0.x, r0.y @@ -74,10 +72,10 @@ mov oPos, r0 mul r0.x, r1.x, c14.z max r0.x, r0.x, c14.w - min oT0.z, r0.x, -c4.w + min oT0.z, r0.x, c4.z mov oT0.xy, v1 -// approximately 42 instruction slots used +// approximately 40 instruction slots used #endif const BYTE g_vs20_main[] = @@ -141,7 +139,7 @@ const BYTE g_vs20_main[] = 81, 0, 0, 5, 4, 0, 15, 160, 0, 0, 128, 64, 0, 0, 0, 0, 0, 0, - 0, 128, 0, 0, 128, 191, + 128, 63, 0, 0, 0, 0, 31, 0, 0, 2, 0, 0, 0, 128, 0, 0, 15, 144, 31, 0, 0, 2, 5, 0, @@ -153,24 +151,18 @@ const BYTE g_vs20_main[] = 31, 0, 0, 2, 2, 0, 0, 128, 4, 0, 15, 144, 1, 0, 0, 2, 0, 0, - 2, 128, 4, 0, 85, 160, - 12, 0, 0, 3, 0, 0, - 1, 128, 0, 0, 85, 128, - 13, 0, 255, 160, 18, 0, - 0, 4, 1, 0, 15, 128, - 0, 0, 0, 128, 2, 0, - 228, 144, 4, 0, 234, 161, - 1, 0, 0, 2, 0, 0, - 1, 128, 13, 0, 0, 160, - 4, 0, 0, 4, 1, 0, 7, 128, 15, 0, 228, 160, - 0, 0, 0, 128, 1, 0, - 228, 128, 11, 0, 0, 3, - 0, 0, 15, 128, 1, 0, + 4, 0, 0, 4, 0, 0, + 7, 128, 0, 0, 228, 128, + 13, 0, 0, 160, 2, 0, + 228, 144, 1, 0, 0, 2, + 0, 0, 8, 128, 2, 0, + 255, 144, 11, 0, 0, 3, + 0, 0, 15, 128, 0, 0, 228, 128, 4, 0, 85, 160, 10, 0, 0, 3, 0, 0, 15, 128, 0, 0, 228, 128, - 4, 0, 255, 161, 5, 0, + 4, 0, 170, 160, 5, 0, 0, 3, 0, 0, 15, 208, 0, 0, 228, 128, 12, 0, 228, 160, 5, 0, 0, 3, @@ -280,7 +272,7 @@ const BYTE g_vs20_main[] = 0, 128, 14, 0, 255, 160, 10, 0, 0, 3, 0, 0, 4, 224, 0, 0, 0, 128, - 4, 0, 255, 161, 1, 0, + 4, 0, 170, 160, 1, 0, 0, 2, 0, 0, 3, 224, 1, 0, 228, 144, 255, 255, 0, 0 diff --git a/src/d3d/shaders/skin_amb_dir_VS.h b/src/d3d/shaders/skin_amb_dir_VS.h index c2786fd..31a2c60 100644 --- a/src/d3d/shaders/skin_amb_dir_VS.h +++ b/src/d3d/shaders/skin_amb_dir_VS.h @@ -2,7 +2,7 @@ // // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // -// fxc /T vs_2_0 /DDIRECTIONALS /Fh skin_amb_dir_VS.h skin_VS.hlsl +// fxc /nologo /T vs_2_0 /DDIRECTIONALS /Fh skin_amb_dir_VS.h skin_VS.hlsl // // // Parameters: @@ -44,8 +44,7 @@ // vs_2_0 - def c4, 4, 0, -0, -1 - def c5, 3, 0, 0, 0 + def c4, 4, 0, 3, 1 dcl_position v0 dcl_normal v1 dcl_texcoord v2 @@ -84,26 +83,24 @@ mul r2.xyz, r1.y, c9 mad r1.xyw, c8.xyzz, r1.x, r2.xyzz mad r1.xyz, c10, r1.z, r1.xyww - mov r2.y, c4.y - slt r1.w, r2.y, c13.w - lrp r2, r1.w, v3, -c4.zzzw - mov r3.x, c13.x - mad r3.xyz, c15, r3.x, r2 - mov r2.xyz, r3 + mov r2.x, c13.x + mad r2.xyz, c15, r2.x, v3 + mov r3.xyz, r2 mov r1.w, c4.y rep i0 - add r3.w, r1.w, c16.x - mul r3.w, r3.w, c5.x - mova a0.w, r3.w + add r2.w, r1.w, c16.x + mul r2.w, r2.w, c4.z + mova a0.w, r2.w dp3 r4.x, r1, -c19[a0.w] max r4.x, r4.x, c4.y - mova a0.w, r3.w + mova a0.w, r2.w mul r4.xyz, r4.x, c17[a0.w] - mad r2.xyz, r4, c13.z, r2 - add r1.w, r1.w, -c4.w + mad r3.xyz, r4, c13.z, r3 + add r1.w, r1.w, c4.w endrep - max r1, r2, c4.y - min r1, r1, -c4.w + mov r3.w, v3.w + max r1, r3, c4.y + min r1, r1, c4.w mul oD0, r1, c12 mova a0.w, r0.y mul r1.xyz, v0.y, c42[a0.w] @@ -149,10 +146,10 @@ 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, -c4.w + min oT0.z, r0.x, c4.w mov oT0.xy, v2 -// approximately 102 instruction slots used +// approximately 100 instruction slots used #endif const BYTE g_vs20_main[] = @@ -259,12 +256,8 @@ const BYTE g_vs20_main[] = 171, 171, 81, 0, 0, 5, 4, 0, 15, 160, 0, 0, 128, 64, 0, 0, 0, 0, - 0, 0, 0, 128, 0, 0, - 128, 191, 81, 0, 0, 5, - 5, 0, 15, 160, 0, 0, - 64, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, - 0, 0, 31, 0, 0, 2, + 0, 0, 64, 64, 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, @@ -371,31 +364,23 @@ const BYTE g_vs20_main[] = 7, 128, 10, 0, 228, 160, 1, 0, 170, 128, 1, 0, 244, 128, 1, 0, 0, 2, - 2, 0, 2, 128, 4, 0, - 85, 160, 12, 0, 0, 3, - 1, 0, 8, 128, 2, 0, - 85, 128, 13, 0, 255, 160, - 18, 0, 0, 4, 2, 0, - 15, 128, 1, 0, 255, 128, - 3, 0, 228, 144, 4, 0, - 234, 161, 1, 0, 0, 2, - 3, 0, 1, 128, 13, 0, + 2, 0, 1, 128, 13, 0, 0, 160, 4, 0, 0, 4, - 3, 0, 7, 128, 15, 0, - 228, 160, 3, 0, 0, 128, + 2, 0, 7, 128, 15, 0, + 228, 160, 2, 0, 0, 128, + 3, 0, 228, 144, 1, 0, + 0, 2, 3, 0, 7, 128, 2, 0, 228, 128, 1, 0, - 0, 2, 2, 0, 7, 128, - 3, 0, 228, 128, 1, 0, 0, 2, 1, 0, 8, 128, 4, 0, 85, 160, 38, 0, 0, 1, 0, 0, 228, 240, - 2, 0, 0, 3, 3, 0, + 2, 0, 0, 3, 2, 0, 8, 128, 1, 0, 255, 128, 16, 0, 0, 160, 5, 0, - 0, 3, 3, 0, 8, 128, - 3, 0, 255, 128, 5, 0, - 0, 160, 46, 0, 0, 2, - 0, 0, 8, 176, 3, 0, + 0, 3, 2, 0, 8, 128, + 2, 0, 255, 128, 4, 0, + 170, 160, 46, 0, 0, 2, + 0, 0, 8, 176, 2, 0, 255, 128, 8, 0, 0, 4, 4, 0, 1, 128, 1, 0, 228, 128, 19, 32, 228, 161, @@ -403,23 +388,25 @@ const BYTE g_vs20_main[] = 0, 3, 4, 0, 1, 128, 4, 0, 0, 128, 4, 0, 85, 160, 46, 0, 0, 2, - 0, 0, 8, 176, 3, 0, + 0, 0, 8, 176, 2, 0, 255, 128, 5, 0, 0, 4, 4, 0, 7, 128, 4, 0, 0, 128, 17, 32, 228, 160, 0, 0, 255, 176, 4, 0, - 0, 4, 2, 0, 7, 128, + 0, 4, 3, 0, 7, 128, 4, 0, 228, 128, 13, 0, - 170, 160, 2, 0, 228, 128, + 170, 160, 3, 0, 228, 128, 2, 0, 0, 3, 1, 0, 8, 128, 1, 0, 255, 128, - 4, 0, 255, 161, 39, 0, - 0, 0, 11, 0, 0, 3, - 1, 0, 15, 128, 2, 0, + 4, 0, 255, 160, 39, 0, + 0, 0, 1, 0, 0, 2, + 3, 0, 8, 128, 3, 0, + 255, 144, 11, 0, 0, 3, + 1, 0, 15, 128, 3, 0, 228, 128, 4, 0, 85, 160, 10, 0, 0, 3, 1, 0, 15, 128, 1, 0, 228, 128, - 4, 0, 255, 161, 5, 0, + 4, 0, 255, 160, 5, 0, 0, 3, 0, 0, 15, 208, 1, 0, 228, 128, 12, 0, 228, 160, 46, 0, 0, 2, @@ -552,7 +539,7 @@ const BYTE g_vs20_main[] = 0, 0, 0, 128, 14, 0, 255, 160, 10, 0, 0, 3, 0, 0, 4, 224, 0, 0, - 0, 128, 4, 0, 255, 161, + 0, 128, 4, 0, 255, 160, 1, 0, 0, 2, 0, 0, 3, 224, 2, 0, 228, 144, 255, 255, 0, 0 diff --git a/src/d3d/shaders/standardConstants.h b/src/d3d/shaders/standardConstants.h index 96895b0..088df7d 100644 --- a/src/d3d/shaders/standardConstants.h +++ b/src/d3d/shaders/standardConstants.h @@ -9,7 +9,6 @@ float4 ambientLight : register(c15); #define surfAmbient (surfProps.x) #define surfSpecular (surfProps.y) #define surfDiffuse (surfProps.z) -#define surfPrelight (surfProps.w) #define fogStart (fogData.x) #define fogEnd (fogData.y)