diff options
Diffstat (limited to 'src/extras/shaders')
-rw-r--r-- | src/extras/shaders/Makefile | 21 | ||||
-rw-r--r-- | src/extras/shaders/colourfilterIII_PS.cso | bin | 452 -> 0 bytes | |||
-rw-r--r-- | src/extras/shaders/colourfilterIII_PS.inc | 40 | ||||
-rw-r--r-- | src/extras/shaders/colourfilterVC.frag (renamed from src/extras/shaders/colourfilterIII.frag) | 5 | ||||
-rw-r--r-- | src/extras/shaders/colourfilterVC_PS.cso | bin | 0 -> 648 bytes | |||
-rw-r--r-- | src/extras/shaders/colourfilterVC_PS.hlsl (renamed from src/extras/shaders/colourfilterIII_PS.hlsl) | 10 | ||||
-rw-r--r-- | src/extras/shaders/colourfilterVC_PS.inc | 56 | ||||
-rw-r--r-- | src/extras/shaders/colourfilterVC_fs_gl.inc (renamed from src/extras/shaders/colourfilterIII_fs_gl.inc) | 7 | ||||
-rw-r--r-- | src/extras/shaders/neoWorldIII_PS.cso | bin | 528 -> 0 bytes | |||
-rw-r--r-- | src/extras/shaders/neoWorldVC.frag (renamed from src/extras/shaders/neoWorldIII.frag) | 3 | ||||
-rw-r--r-- | src/extras/shaders/neoWorldVC_PS.cso | bin | 0 -> 524 bytes | |||
-rw-r--r-- | src/extras/shaders/neoWorldVC_PS.hlsl (renamed from src/extras/shaders/neoWorldIII_PS.hlsl) | 2 | ||||
-rw-r--r-- | src/extras/shaders/neoWorldVC_PS.inc (renamed from src/extras/shaders/neoWorldIII_PS.inc) | 30 | ||||
-rw-r--r-- | src/extras/shaders/neoWorldVC_fs_gl.inc (renamed from src/extras/shaders/neoWorldIII_fs_gl.inc) | 5 |
14 files changed, 105 insertions, 74 deletions
diff --git a/src/extras/shaders/Makefile b/src/extras/shaders/Makefile index 51e009d6..5089e16a 100644 --- a/src/extras/shaders/Makefile +++ b/src/extras/shaders/Makefile @@ -1,7 +1,7 @@ all: im2d_gl.inc simple_fs_gl.inc default_UV2_gl.inc \ - colourfilterIII_fs_gl.inc contrast_fs_gl.inc \ + colourfilterVC_fs_gl.inc contrast_fs_gl.inc \ neoRim_gl.inc neoRimSkin_gl.inc \ - neoWorldIII_fs_gl.inc neoGloss_vs_gl.inc neoGloss_fs_gl.inc \ + neoWorldVC_fs_gl.inc neoGloss_vs_gl.inc neoGloss_fs_gl.inc \ neoVehicle_vs_gl.inc neoVehicle_fs_gl.inc \ im2d_UV2_gl.inc screenDroplet_fs_gl.inc @@ -10,6 +10,10 @@ im2d_gl.inc: im2d.vert sed 's/..*/"&\\n"/' im2d.vert;\ echo ';') >im2d_gl.inc +colourfilterVC_fs_gl.inc: colourfilterVC.frag + (echo 'const char *colourfilterVC_frag_src =';\ + sed 's/..*/"&\\n"/' colourfilterVC.frag;\ + echo ';') >colourfilterVC_fs_gl.inc simple_fs_gl.inc: simple.frag (echo 'const char *simple_frag_src =';\ sed 's/..*/"&\\n"/' simple.frag;\ @@ -22,11 +26,6 @@ default_UV2_gl.inc: default_UV2.vert -colourfilterIII_fs_gl.inc: colourfilterIII.frag - (echo 'const char *colourfilterIII_frag_src =';\ - sed 's/..*/"&\\n"/' colourfilterIII.frag;\ - echo ';') >colourfilterIII_fs_gl.inc - contrast_fs_gl.inc: contrast.frag (echo 'const char *contrast_frag_src =';\ sed 's/..*/"&\\n"/' contrast.frag;\ @@ -43,10 +42,10 @@ neoRimSkin_gl.inc: neoRimSkin.vert sed 's/..*/"&\\n"/' neoRimSkin.vert;\ echo ';') >neoRimSkin_gl.inc -neoWorldIII_fs_gl.inc: neoWorldIII.frag - (echo 'const char *neoWorldIII_frag_src =';\ - sed 's/..*/"&\\n"/' neoWorldIII.frag;\ - echo ';') >neoWorldIII_fs_gl.inc +neoWorldVC_fs_gl.inc: neoWorldVC.frag + (echo 'const char *neoWorldVC_frag_src =';\ + sed 's/..*/"&\\n"/' neoWorldVC.frag;\ + echo ';') >neoWorldVC_fs_gl.inc neoGloss_fs_gl.inc: neoGloss.frag (echo 'const char *neoGloss_frag_src =';\ diff --git a/src/extras/shaders/colourfilterIII_PS.cso b/src/extras/shaders/colourfilterIII_PS.cso Binary files differdeleted file mode 100644 index cc41bcec..00000000 --- a/src/extras/shaders/colourfilterIII_PS.cso +++ /dev/null diff --git a/src/extras/shaders/colourfilterIII_PS.inc b/src/extras/shaders/colourfilterIII_PS.inc deleted file mode 100644 index db49de6c..00000000 --- a/src/extras/shaders/colourfilterIII_PS.inc +++ /dev/null @@ -1,40 +0,0 @@ -static unsigned char colourfilterIII_PS_cso[] = { - 0x00, 0x02, 0xff, 0xff, 0xfe, 0xff, 0x2b, 0x00, 0x43, 0x54, 0x41, 0x42, - 0x1c, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, - 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, - 0x70, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, - 0x01, 0x00, 0x2a, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x6c, 0x75, 0x72, - 0x63, 0x6f, 0x6c, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x00, - 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x32, 0x5f, 0x30, 0x00, 0x4d, - 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, - 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, - 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, - 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, - 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0xb0, - 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, - 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xb0, - 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, - 0x00, 0x00, 0xe4, 0x80, 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, - 0x02, 0x00, 0x17, 0x80, 0x0a, 0x00, 0xff, 0xa0, 0x01, 0x00, 0xe4, 0x80, - 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, - 0x02, 0x00, 0xe4, 0x80, 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, - 0x02, 0x00, 0x17, 0x80, 0x0a, 0x00, 0xff, 0xa0, 0x01, 0x00, 0xe4, 0x80, - 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, - 0x02, 0x00, 0xe4, 0x80, 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, - 0x02, 0x00, 0x17, 0x80, 0x0a, 0x00, 0xff, 0xa0, 0x01, 0x00, 0xe4, 0x80, - 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, - 0x02, 0x00, 0xe4, 0x80, 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, - 0x02, 0x00, 0x17, 0x80, 0x0a, 0x00, 0xff, 0xa0, 0x01, 0x00, 0xe4, 0x80, - 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, - 0x02, 0x00, 0xe4, 0x80, 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, - 0x02, 0x00, 0x17, 0x80, 0x0a, 0x00, 0xff, 0xa0, 0x01, 0x00, 0xe4, 0x80, - 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x08, 0x80, - 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, - 0x02, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00 -}; diff --git a/src/extras/shaders/colourfilterIII.frag b/src/extras/shaders/colourfilterVC.frag index b41cb94a..9db3950e 100644 --- a/src/extras/shaders/colourfilterIII.frag +++ b/src/extras/shaders/colourfilterVC.frag @@ -9,10 +9,13 @@ void main(void) { float a = u_blurcolor.a; + vec4 doublec = clamp(u_blurcolor*2.0, 0.0, 1.0); vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y)); vec4 prev = dst; for(int i = 0; i < 5; i++){ - vec4 tmp = dst*(1.0-a) + prev*u_blurcolor*a; + vec4 tmp = dst*(1.0-a) + prev*doublec*a; + tmp += prev*u_blurcolor; + tmp += prev*u_blurcolor; prev = clamp(tmp, 0.0, 1.0); } vec4 color; diff --git a/src/extras/shaders/colourfilterVC_PS.cso b/src/extras/shaders/colourfilterVC_PS.cso Binary files differnew file mode 100644 index 00000000..4b0e9f3f --- /dev/null +++ b/src/extras/shaders/colourfilterVC_PS.cso diff --git a/src/extras/shaders/colourfilterIII_PS.hlsl b/src/extras/shaders/colourfilterVC_PS.hlsl index 27f099ef..1e62950b 100644 --- a/src/extras/shaders/colourfilterIII_PS.hlsl +++ b/src/extras/shaders/colourfilterVC_PS.hlsl @@ -1,13 +1,21 @@ sampler2D tex : register(s0); float4 blurcol : register(c10); +//float4 blurcols[10] : register(c15); + + float4 main(in float2 texcoord : TEXCOORD0) : COLOR0 { float a = blurcol.a; + + float4 doublec = saturate(blurcol*2); float4 dst = tex2D(tex, texcoord.xy); float4 prev = dst; for(int i = 0; i < 5; i++){ - float4 tmp = dst*(1-a) + prev*blurcol*a; +// float4 doublec = saturate(blurcol*2); + float4 tmp = dst*(1-a) + prev*doublec*a; + tmp += prev*blurcol; + tmp += prev*blurcol; prev = saturate(tmp); } prev.a = 1.0f; diff --git a/src/extras/shaders/colourfilterVC_PS.inc b/src/extras/shaders/colourfilterVC_PS.inc new file mode 100644 index 00000000..daa18360 --- /dev/null +++ b/src/extras/shaders/colourfilterVC_PS.inc @@ -0,0 +1,56 @@ +static unsigned char colourfilterVC_PS_cso[] = { + 0x00, 0x02, 0xff, 0xff, 0xfe, 0xff, 0x2b, 0x00, 0x43, 0x54, 0x41, 0x42, + 0x1c, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, + 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x70, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, + 0x01, 0x00, 0x2a, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, + 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x6c, 0x75, 0x72, + 0x63, 0x6f, 0x6c, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x00, + 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x32, 0x5f, 0x30, 0x00, 0x4d, + 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, + 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, + 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, + 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x40, + 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0xb0, + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, + 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xb0, + 0x00, 0x08, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x17, 0x80, + 0x0a, 0x00, 0xe4, 0xa0, 0x0a, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, + 0x02, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, + 0x12, 0x00, 0x00, 0x04, 0x03, 0x00, 0x07, 0x80, 0x0a, 0x00, 0xff, 0xa0, + 0x02, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, + 0x02, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x0a, 0x00, 0xe4, 0xa0, + 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x17, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0x00, 0xa0, 0x03, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, + 0x03, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0x80, + 0x0a, 0x00, 0xff, 0xa0, 0x03, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, + 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x17, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, + 0x03, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0x80, + 0x0a, 0x00, 0xff, 0xa0, 0x03, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, + 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x17, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, + 0x03, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0x80, + 0x0a, 0x00, 0xff, 0xa0, 0x03, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, + 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x17, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0x00, 0xa0, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, + 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x0a, 0x00, 0xe4, 0xa0, 0x12, 0x00, 0x00, 0x04, 0x03, 0x00, 0x07, 0x80, + 0x0a, 0x00, 0xff, 0xa0, 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x17, 0x80, 0x02, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0x00, 0xa0, 0x03, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, + 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00 +}; diff --git a/src/extras/shaders/colourfilterIII_fs_gl.inc b/src/extras/shaders/colourfilterVC_fs_gl.inc index 6fd1935b..1f9bf6d8 100644 --- a/src/extras/shaders/colourfilterIII_fs_gl.inc +++ b/src/extras/shaders/colourfilterVC_fs_gl.inc @@ -1,4 +1,4 @@ -const char *colourfilterIII_frag_src = +const char *colourfilterVC_frag_src = "uniform sampler2D tex0;\n" "uniform vec4 u_blurcolor;\n" @@ -10,10 +10,13 @@ const char *colourfilterIII_frag_src = "main(void)\n" "{\n" " float a = u_blurcolor.a;\n" +" vec4 doublec = clamp(u_blurcolor*2.0, 0.0, 1.0);\n" " vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" " vec4 prev = dst;\n" " for(int i = 0; i < 5; i++){\n" -" vec4 tmp = dst*(1.0-a) + prev*u_blurcolor*a;\n" +" vec4 tmp = dst*(1.0-a) + prev*doublec*a;\n" +" tmp += prev*u_blurcolor;\n" +" tmp += prev*u_blurcolor;\n" " prev = clamp(tmp, 0.0, 1.0);\n" " }\n" " vec4 color;\n" diff --git a/src/extras/shaders/neoWorldIII_PS.cso b/src/extras/shaders/neoWorldIII_PS.cso Binary files differdeleted file mode 100644 index 817888ef..00000000 --- a/src/extras/shaders/neoWorldIII_PS.cso +++ /dev/null diff --git a/src/extras/shaders/neoWorldIII.frag b/src/extras/shaders/neoWorldVC.frag index d8bb7159..08cae743 100644 --- a/src/extras/shaders/neoWorldIII.frag +++ b/src/extras/shaders/neoWorldVC.frag @@ -14,7 +14,8 @@ main(void) vec4 t0 = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y)); vec4 t1 = texture(tex1, vec2(v_tex1.x, 1.0-v_tex1.y)); - vec4 color = t0*v_color*(1.0 + u_lightMap*(2.0*t1-1.0)); + vec4 color; + color = t0*v_color*(1.0 + u_lightMap*(t1-1.0)); color.a = v_color.a*t0.a*u_lightMap.a; color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog); diff --git a/src/extras/shaders/neoWorldVC_PS.cso b/src/extras/shaders/neoWorldVC_PS.cso Binary files differnew file mode 100644 index 00000000..5e8d1696 --- /dev/null +++ b/src/extras/shaders/neoWorldVC_PS.cso diff --git a/src/extras/shaders/neoWorldIII_PS.hlsl b/src/extras/shaders/neoWorldVC_PS.hlsl index 8a3d5d86..fc4f1de9 100644 --- a/src/extras/shaders/neoWorldIII_PS.hlsl +++ b/src/extras/shaders/neoWorldVC_PS.hlsl @@ -16,7 +16,7 @@ main(PS_INPUT IN) : COLOR float4 t0 = tex2D(Diffuse, IN.Tex0.xy); float4 t1 = tex2D(Light, IN.Tex1); - float4 col = t0*IN.Color*(1 + lm*(2*t1-1)); + float4 col = t0*IN.Color*(1 + lm*(t1-1)); col.a = IN.Color.a*t0.a*lm.a; col.rgb = lerp(fogColor.rgb, col.rgb, IN.Tex0.z); diff --git a/src/extras/shaders/neoWorldIII_PS.inc b/src/extras/shaders/neoWorldVC_PS.inc index a4631efb..eb8bf2ee 100644 --- a/src/extras/shaders/neoWorldIII_PS.inc +++ b/src/extras/shaders/neoWorldVC_PS.inc @@ -1,4 +1,4 @@ -static unsigned char neoWorldIII_PS_cso[] = { +static unsigned char neoWorldVC_PS_cso[] = { 0x00, 0x02, 0xff, 0xff, 0xfe, 0xff, 0x3e, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, @@ -21,7 +21,7 @@ static unsigned char neoWorldIII_PS_cso[] = { 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, + 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, 0xb0, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, @@ -30,17 +30,17 @@ static unsigned char neoWorldIII_PS_cso[] = { 0x01, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xb0, 0x01, 0x08, 0xe4, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xb0, 0x00, 0x08, 0xe4, 0xa0, - 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, - 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x08, 0x80, 0x02, 0x00, 0xaa, 0xa0, 0x04, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xe4, 0x80, - 0x00, 0x00, 0xff, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, - 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x05, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x08, 0x80, 0x01, 0x00, 0xff, 0x80, 0x00, 0x00, 0xff, 0x90, - 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, - 0x01, 0x00, 0xff, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, - 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0xa1, - 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, 0x80, 0x00, 0x00, 0xaa, 0xb0, - 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, - 0x00, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00 + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, + 0x02, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, + 0x02, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, + 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xff, 0x80, + 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0xe4, 0x90, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08, 0x80, + 0x01, 0x00, 0xff, 0x80, 0x00, 0x00, 0xff, 0x90, 0x05, 0x00, 0x00, 0x03, + 0x02, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xff, 0xa0, + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0xa1, 0x04, 0x00, 0x00, 0x04, + 0x02, 0x00, 0x07, 0x80, 0x00, 0x00, 0xaa, 0xb0, 0x00, 0x00, 0xe4, 0x80, + 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, + 0x02, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00 }; diff --git a/src/extras/shaders/neoWorldIII_fs_gl.inc b/src/extras/shaders/neoWorldVC_fs_gl.inc index afd75f57..b4385fc7 100644 --- a/src/extras/shaders/neoWorldIII_fs_gl.inc +++ b/src/extras/shaders/neoWorldVC_fs_gl.inc @@ -1,4 +1,4 @@ -const char *neoWorldIII_frag_src = +const char *neoWorldVC_frag_src = "uniform sampler2D tex0;\n" "uniform sampler2D tex1;\n" @@ -15,7 +15,8 @@ const char *neoWorldIII_frag_src = " vec4 t0 = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" " vec4 t1 = texture(tex1, vec2(v_tex1.x, 1.0-v_tex1.y));\n" -" vec4 color = t0*v_color*(1.0 + u_lightMap*(2.0*t1-1.0));\n" +" vec4 color;\n" +" color = t0*v_color*(1.0 + u_lightMap*(t1-1.0));\n" " color.a = v_color.a*t0.a*u_lightMap.a;\n" " color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog);\n" |