summaryrefslogtreecommitdiffstats
path: root/src/extras/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'src/extras/shaders')
-rw-r--r--src/extras/shaders/Makefile23
-rw-r--r--src/extras/shaders/colourfilterLCS.frag20
-rw-r--r--src/extras/shaders/colourfilterLCS_PS.csobin0 -> 292 bytes
-rw-r--r--src/extras/shaders/colourfilterLCS_PS.hlsl13
-rw-r--r--src/extras/shaders/colourfilterLCS_PS.inc27
-rw-r--r--src/extras/shaders/colourfilterLCS_fs_gl.inc22
-rw-r--r--src/extras/shaders/colourfilterVC.frag27
-rw-r--r--src/extras/shaders/colourfilterVC_PS.csobin648 -> 0 bytes
-rw-r--r--src/extras/shaders/colourfilterVC_PS.hlsl23
-rw-r--r--src/extras/shaders/colourfilterVC_PS.inc56
-rw-r--r--src/extras/shaders/colourfilterVC_fs_gl.inc29
-rw-r--r--src/extras/shaders/leedsBuilding.vert26
-rw-r--r--src/extras/shaders/leedsBuilding_VS.csobin0 -> 628 bytes
-rw-r--r--src/extras/shaders/leedsBuilding_VS.hlsl44
-rw-r--r--src/extras/shaders/leedsBuilding_VS.inc55
-rw-r--r--src/extras/shaders/leedsBuilding_vs_gl.inc28
-rw-r--r--src/extras/shaders/scale.frag18
-rw-r--r--src/extras/shaders/scale_PS.csobin0 -> 368 bytes
-rw-r--r--src/extras/shaders/scale_PS.hlsl19
-rw-r--r--src/extras/shaders/scale_PS.inc33
-rw-r--r--src/extras/shaders/scale_fs_gl.inc20
21 files changed, 342 insertions, 141 deletions
diff --git a/src/extras/shaders/Makefile b/src/extras/shaders/Makefile
index 5089e16a..355d71af 100644
--- a/src/extras/shaders/Makefile
+++ b/src/extras/shaders/Makefile
@@ -1,19 +1,20 @@
all: im2d_gl.inc simple_fs_gl.inc default_UV2_gl.inc \
- colourfilterVC_fs_gl.inc contrast_fs_gl.inc \
+ colourfilterLCS_fs_gl.inc contrast_fs_gl.inc \
neoRim_gl.inc neoRimSkin_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
+ im2d_UV2_gl.inc screenDroplet_fs_gl.inc \
+ leedsBuilding_vs_gl.inc scale_fs_gl.inc
im2d_gl.inc: im2d.vert
(echo 'const char *im2d_vert_src =';\
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
+colourfilterLCS_fs_gl.inc: colourfilterLCS.frag
+ (echo 'const char *colourfilterLCS_frag_src =';\
+ sed 's/..*/"&\\n"/' colourfilterLCS.frag;\
+ echo ';') >colourfilterLCS_fs_gl.inc
simple_fs_gl.inc: simple.frag
(echo 'const char *simple_frag_src =';\
sed 's/..*/"&\\n"/' simple.frag;\
@@ -76,3 +77,13 @@ screenDroplet_fs_gl.inc: screenDroplet.frag
(echo 'const char *screenDroplet_frag_src =';\
sed 's/..*/"&\\n"/' screenDroplet.frag;\
echo ';') >screenDroplet_fs_gl.inc
+
+leedsBuilding_vs_gl.inc: leedsBuilding.vert
+ (echo 'const char *leedsBuilding_vert_src =';\
+ sed 's/..*/"&\\n"/' leedsBuilding.vert;\
+ echo ';') >leedsBuilding_vs_gl.inc
+
+scale_fs_gl.inc: scale.frag
+ (echo 'const char *scale_frag_src =';\
+ sed 's/..*/"&\\n"/' scale.frag;\
+ echo ';') >scale_fs_gl.inc
diff --git a/src/extras/shaders/colourfilterLCS.frag b/src/extras/shaders/colourfilterLCS.frag
new file mode 100644
index 00000000..67348d0c
--- /dev/null
+++ b/src/extras/shaders/colourfilterLCS.frag
@@ -0,0 +1,20 @@
+uniform sampler2D tex0;
+uniform vec4 u_blurcolor;
+
+FSIN vec4 v_color;
+FSIN vec2 v_tex0;
+FSIN float v_fog;
+
+void
+main(void)
+{
+ vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));
+ dst += dst*u_blurcolor;
+
+ vec4 color;
+ color.rgb = dst.rgb;
+ color.a = 1.0f;
+
+ FRAGCOLOR(color);
+}
+
diff --git a/src/extras/shaders/colourfilterLCS_PS.cso b/src/extras/shaders/colourfilterLCS_PS.cso
new file mode 100644
index 00000000..e5ffa3f1
--- /dev/null
+++ b/src/extras/shaders/colourfilterLCS_PS.cso
Binary files differ
diff --git a/src/extras/shaders/colourfilterLCS_PS.hlsl b/src/extras/shaders/colourfilterLCS_PS.hlsl
new file mode 100644
index 00000000..bd91567d
--- /dev/null
+++ b/src/extras/shaders/colourfilterLCS_PS.hlsl
@@ -0,0 +1,13 @@
+sampler2D tex : register(s0);
+float4 blurcol : register(c10);
+
+//float4 blurcols[10] : register(c15);
+
+
+float4 main(in float2 texcoord : TEXCOORD0) : COLOR0
+{
+ float4 dst = tex2D(tex, texcoord.xy);
+ dst += dst*blurcol;
+ dst.a = 1.0;
+ return dst;
+}
diff --git a/src/extras/shaders/colourfilterLCS_PS.inc b/src/extras/shaders/colourfilterLCS_PS.inc
new file mode 100644
index 00000000..f9eeab52
--- /dev/null
+++ b/src/extras/shaders/colourfilterLCS_PS.inc
@@ -0,0 +1,27 @@
+static unsigned char colourfilterLCS_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, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80,
+ 0x00, 0x00, 0xe4, 0x80, 0x0a, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xe4, 0x80,
+ 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0,
+ 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80,
+ 0xff, 0xff, 0x00, 0x00
+};
diff --git a/src/extras/shaders/colourfilterLCS_fs_gl.inc b/src/extras/shaders/colourfilterLCS_fs_gl.inc
new file mode 100644
index 00000000..2c8e3532
--- /dev/null
+++ b/src/extras/shaders/colourfilterLCS_fs_gl.inc
@@ -0,0 +1,22 @@
+const char *colourfilterLCS_frag_src =
+"uniform sampler2D tex0;\n"
+"uniform vec4 u_blurcolor;\n"
+
+"FSIN vec4 v_color;\n"
+"FSIN vec2 v_tex0;\n"
+"FSIN float v_fog;\n"
+
+"void\n"
+"main(void)\n"
+"{\n"
+" vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n"
+" dst += dst*u_blurcolor;\n"
+
+" vec4 color;\n"
+" color.rgb = dst.rgb;\n"
+" color.a = 1.0f;\n"
+
+" FRAGCOLOR(color);\n"
+"}\n"
+
+;
diff --git a/src/extras/shaders/colourfilterVC.frag b/src/extras/shaders/colourfilterVC.frag
deleted file mode 100644
index 9db3950e..00000000
--- a/src/extras/shaders/colourfilterVC.frag
+++ /dev/null
@@ -1,27 +0,0 @@
-uniform sampler2D tex0;
-uniform vec4 u_blurcolor;
-
-FSIN vec4 v_color;
-FSIN vec2 v_tex0;
-FSIN float v_fog;
-
-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*doublec*a;
- tmp += prev*u_blurcolor;
- tmp += prev*u_blurcolor;
- prev = clamp(tmp, 0.0, 1.0);
- }
- vec4 color;
- color.rgb = prev.rgb;
- color.a = 1.0f;
-
- FRAGCOLOR(color);
-}
-
diff --git a/src/extras/shaders/colourfilterVC_PS.cso b/src/extras/shaders/colourfilterVC_PS.cso
deleted file mode 100644
index 4b0e9f3f..00000000
--- a/src/extras/shaders/colourfilterVC_PS.cso
+++ /dev/null
Binary files differ
diff --git a/src/extras/shaders/colourfilterVC_PS.hlsl b/src/extras/shaders/colourfilterVC_PS.hlsl
deleted file mode 100644
index 1e62950b..00000000
--- a/src/extras/shaders/colourfilterVC_PS.hlsl
+++ /dev/null
@@ -1,23 +0,0 @@
-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 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;
- return prev;
-}
diff --git a/src/extras/shaders/colourfilterVC_PS.inc b/src/extras/shaders/colourfilterVC_PS.inc
deleted file mode 100644
index daa18360..00000000
--- a/src/extras/shaders/colourfilterVC_PS.inc
+++ /dev/null
@@ -1,56 +0,0 @@
-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/colourfilterVC_fs_gl.inc b/src/extras/shaders/colourfilterVC_fs_gl.inc
deleted file mode 100644
index 1f9bf6d8..00000000
--- a/src/extras/shaders/colourfilterVC_fs_gl.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-const char *colourfilterVC_frag_src =
-"uniform sampler2D tex0;\n"
-"uniform vec4 u_blurcolor;\n"
-
-"FSIN vec4 v_color;\n"
-"FSIN vec2 v_tex0;\n"
-"FSIN float v_fog;\n"
-
-"void\n"
-"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*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"
-" color.rgb = prev.rgb;\n"
-" color.a = 1.0f;\n"
-
-" FRAGCOLOR(color);\n"
-"}\n"
-
-;
diff --git a/src/extras/shaders/leedsBuilding.vert b/src/extras/shaders/leedsBuilding.vert
new file mode 100644
index 00000000..67dd7938
--- /dev/null
+++ b/src/extras/shaders/leedsBuilding.vert
@@ -0,0 +1,26 @@
+uniform vec4 u_amb;
+uniform vec4 u_emiss;
+
+VSIN(ATTRIB_POS) vec3 in_pos;
+
+VSOUT vec4 v_color;
+VSOUT vec2 v_tex0;
+VSOUT float v_fog;
+
+void
+main(void)
+{
+ vec4 Vertex = u_world * vec4(in_pos, 1.0);
+ gl_Position = u_proj * u_view * Vertex;
+ vec3 Normal = mat3(u_world) * in_normal;
+
+ v_tex0 = in_tex0;
+
+ v_color = in_color;
+ v_color.rgb *= u_amb.rgb;
+ v_color.rgb += u_emiss.rgb;
+ v_color = clamp(v_color, 0.0, 1.0);
+ v_color.a *= u_matColor.a;
+
+ v_fog = DoFog(gl_Position.w);
+}
diff --git a/src/extras/shaders/leedsBuilding_VS.cso b/src/extras/shaders/leedsBuilding_VS.cso
new file mode 100644
index 00000000..1ec92fb1
--- /dev/null
+++ b/src/extras/shaders/leedsBuilding_VS.cso
Binary files differ
diff --git a/src/extras/shaders/leedsBuilding_VS.hlsl b/src/extras/shaders/leedsBuilding_VS.hlsl
new file mode 100644
index 00000000..dd3592e9
--- /dev/null
+++ b/src/extras/shaders/leedsBuilding_VS.hlsl
@@ -0,0 +1,44 @@
+#include "standardConstants.h"
+
+float4 emissive : register(c41);
+float4 ambient : register(c42);
+
+struct VS_in
+{
+ float4 Position : POSITION;
+ float3 Normal : NORMAL;
+ float2 TexCoord : TEXCOORD0;
+ float2 TexCoord1 : TEXCOORD1;
+ float4 Prelight : COLOR0;
+};
+
+struct VS_out {
+ float4 Position : POSITION;
+ float3 TexCoord0 : TEXCOORD0; // also fog
+ float2 TexCoord1 : TEXCOORD1;
+ float4 Color : COLOR0;
+};
+
+
+VS_out main(in VS_in input)
+{
+ VS_out output;
+
+ output.Position = mul(combinedMat, input.Position);
+ float3 Vertex = mul(worldMat, input.Position).xyz;
+ float3 Normal = mul(normalMat, input.Normal);
+
+ output.TexCoord0.xy = input.TexCoord;
+ output.TexCoord1.xy = input.TexCoord1;
+
+ output.Color = input.Prelight;
+ output.Color.rgb *= ambient.rgb;
+ output.Color.rgb += emissive.rgb;
+
+ output.Color = clamp(output.Color, 0.0, 1.0);
+ output.Color.a *= matCol.a;
+
+ output.TexCoord0.z = clamp((output.Position.w - fogEnd)*fogRange, fogDisable, 1.0);
+
+ return output;
+}
diff --git a/src/extras/shaders/leedsBuilding_VS.inc b/src/extras/shaders/leedsBuilding_VS.inc
new file mode 100644
index 00000000..d24f45b0
--- /dev/null
+++ b/src/extras/shaders/leedsBuilding_VS.inc
@@ -0,0 +1,55 @@
+static unsigned char leedsBuilding_VS_cso[] = {
+ 0x00, 0x02, 0xfe, 0xff, 0xfe, 0xff, 0x42, 0x00, 0x43, 0x54, 0x41, 0x42,
+ 0x1c, 0x00, 0x00, 0x00, 0xd3, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff,
+ 0x05, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0xcc, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x2a, 0x00,
+ 0x01, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x98, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00,
+ 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x29, 0x00, 0x01, 0x00, 0xa6, 0x00, 0x88, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0e, 0x00,
+ 0x01, 0x00, 0x3a, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xc5, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x32, 0x00,
+ 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x6d, 0x62, 0x69,
+ 0x65, 0x6e, 0x74, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6d, 0x62,
+ 0x69, 0x6e, 0x65, 0x64, 0x4d, 0x61, 0x74, 0x00, 0x03, 0x00, 0x03, 0x00,
+ 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x76, 0x65, 0x00, 0x66, 0x6f, 0x67,
+ 0x44, 0x61, 0x74, 0x61, 0x00, 0x6d, 0x61, 0x74, 0x43, 0x6f, 0x6c, 0x00,
+ 0x76, 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,
+ 0x04, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x00, 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,
+ 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02,
+ 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02,
+ 0x0a, 0x00, 0x00, 0x80, 0x03, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x07, 0x80, 0x2a, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x07, 0x80, 0x03, 0x00, 0xe4, 0x90, 0x00, 0x00, 0xe4, 0x80,
+ 0x29, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80,
+ 0x03, 0x00, 0xff, 0x90, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80,
+ 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x03,
+ 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x55, 0xa0,
+ 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0xff, 0x80,
+ 0x0c, 0x00, 0xff, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0xd0,
+ 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80,
+ 0x00, 0x00, 0x55, 0x90, 0x01, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90,
+ 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80,
+ 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80,
+ 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0,
+ 0x00, 0x00, 0xff, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03,
+ 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0xff, 0x80, 0x0e, 0x00, 0x55, 0xa1,
+ 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0xe4, 0x80,
+ 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80,
+ 0x0e, 0x00, 0xaa, 0xa0, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80,
+ 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03,
+ 0x00, 0x00, 0x04, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x55, 0xa0,
+ 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90,
+ 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, 0x90,
+ 0xff, 0xff, 0x00, 0x00
+};
diff --git a/src/extras/shaders/leedsBuilding_vs_gl.inc b/src/extras/shaders/leedsBuilding_vs_gl.inc
new file mode 100644
index 00000000..4e2db0d0
--- /dev/null
+++ b/src/extras/shaders/leedsBuilding_vs_gl.inc
@@ -0,0 +1,28 @@
+const char *leedsBuilding_vert_src =
+"uniform vec4 u_amb;\n"
+"uniform vec4 u_emiss;\n"
+
+"VSIN(ATTRIB_POS) vec3 in_pos;\n"
+
+"VSOUT vec4 v_color;\n"
+"VSOUT vec2 v_tex0;\n"
+"VSOUT float v_fog;\n"
+
+"void\n"
+"main(void)\n"
+"{\n"
+" vec4 Vertex = u_world * vec4(in_pos, 1.0);\n"
+" gl_Position = u_proj * u_view * Vertex;\n"
+" vec3 Normal = mat3(u_world) * in_normal;\n"
+
+" v_tex0 = in_tex0;\n"
+
+" v_color = in_color;\n"
+" v_color.rgb *= u_amb.rgb;\n"
+" v_color.rgb += u_emiss.rgb;\n"
+" v_color = clamp(v_color, 0.0, 1.0);\n"
+" v_color.a *= u_matColor.a;\n"
+
+" v_fog = DoFog(gl_Position.w);\n"
+"}\n"
+;
diff --git a/src/extras/shaders/scale.frag b/src/extras/shaders/scale.frag
new file mode 100644
index 00000000..29165154
--- /dev/null
+++ b/src/extras/shaders/scale.frag
@@ -0,0 +1,18 @@
+uniform sampler2D tex0;
+uniform vec4 u_colorscale;
+
+FSIN vec4 v_color;
+FSIN vec2 v_tex0;
+FSIN float v_fog;
+
+void
+main(void)
+{
+ vec4 color;
+ color = v_color*texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y))*u_colorscale;
+ color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog);
+ DoAlphaTest(color.a);
+
+ FRAGCOLOR(color);
+}
+
diff --git a/src/extras/shaders/scale_PS.cso b/src/extras/shaders/scale_PS.cso
new file mode 100644
index 00000000..d7f7374c
--- /dev/null
+++ b/src/extras/shaders/scale_PS.cso
Binary files differ
diff --git a/src/extras/shaders/scale_PS.hlsl b/src/extras/shaders/scale_PS.hlsl
new file mode 100644
index 00000000..92466e94
--- /dev/null
+++ b/src/extras/shaders/scale_PS.hlsl
@@ -0,0 +1,19 @@
+struct VS_out {
+ float4 Position : POSITION;
+ float3 TexCoord0 : TEXCOORD0;
+ float4 Color : COLOR0;
+};
+
+sampler2D tex0 : register(s0);
+
+float4 fogColor : register(c0);
+float4 colorscale : register(c1);
+
+float4 main(VS_out input) : COLOR
+{
+ float4 color = input.Color;
+ color *= tex2D(tex0, input.TexCoord0.xy);
+ color *= colorscale;
+ color.rgb = lerp(fogColor.rgb, color.rgb, input.TexCoord0.z);
+ return color;
+}
diff --git a/src/extras/shaders/scale_PS.inc b/src/extras/shaders/scale_PS.inc
new file mode 100644
index 00000000..5f711ac8
--- /dev/null
+++ b/src/extras/shaders/scale_PS.inc
@@ -0,0 +1,33 @@
+static unsigned char scale_PS_cso[] = {
+ 0x00, 0x02, 0xff, 0xff, 0xfe, 0xff, 0x34, 0x00, 0x43, 0x54, 0x41, 0x42,
+ 0x1c, 0x00, 0x00, 0x00, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff,
+ 0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x94, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x06, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00,
+ 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x84, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x63, 0x61,
+ 0x6c, 0x65, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x6f, 0x67, 0x43,
+ 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x74, 0x65, 0x78, 0x30, 0x00, 0xab, 0xab,
+ 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,
+ 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, 0xb0,
+ 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90,
+ 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, 0x00, 0x00, 0x0f, 0x80,
+ 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02,
+ 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0xa0,
+ 0x01, 0x00, 0xe4, 0x81, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x08, 0x80,
+ 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xff, 0xa0, 0x04, 0x00, 0x00, 0x04,
+ 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xaa, 0xb0, 0x00, 0x00, 0xe4, 0x80,
+ 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80,
+ 0x01, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00
+};
diff --git a/src/extras/shaders/scale_fs_gl.inc b/src/extras/shaders/scale_fs_gl.inc
new file mode 100644
index 00000000..8d9563e2
--- /dev/null
+++ b/src/extras/shaders/scale_fs_gl.inc
@@ -0,0 +1,20 @@
+const char *scale_frag_src =
+"uniform sampler2D tex0;\n"
+"uniform vec4 u_colorscale;\n"
+
+"FSIN vec4 v_color;\n"
+"FSIN vec2 v_tex0;\n"
+"FSIN float v_fog;\n"
+
+"void\n"
+"main(void)\n"
+"{\n"
+" vec4 color;\n"
+" color = v_color*texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y))*u_colorscale;\n"
+" color.rgb = mix(u_fogColor.rgb, color.rgb, v_fog);\n"
+" DoAlphaTest(color.a);\n"
+
+" FRAGCOLOR(color);\n"
+"}\n"
+
+;