From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Date: Thu, 1 Mar 2012 14:07:08 +0000 (+0200)
Subject: Cubemap reflections for all fluid types, for much better water slime and lava
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=49197f85393c0060e68dbffaedce9e8036990ff0;p=voretournament%2Fvoretournament.git

Cubemap reflections for all fluid types, for much better water slime and lava
---

diff --git a/data/scripts/morphed.shader b/data/scripts/morphed.shader
index 34b17960..e8241e58 100644
--- a/data/scripts/morphed.shader
+++ b/data/scripts/morphed.shader
@@ -14,7 +14,7 @@ textures/morphed/gelslime
 		map textures/morphed/gelslime.tga
 		rgbGen identity
 		depthWrite
-		blendfunc blend
+		blendfunc add
 	}
 	{
 		map $lightmap
@@ -23,6 +23,13 @@ textures/morphed/gelslime
 		tcGen lightmap
 		depthFunc equal
 	}
+	dpreflectcube cubemaps/default/sky
+	{
+		map $lightmap
+		blendfunc add
+		tcGen lightmap
+	}
+	//dp_water 0.1 0.9  3 3  1 1 1  1 1 1  0.4 // disabled for performance
 }
 
 textures/morphed/gelslime_warp
@@ -42,7 +49,7 @@ textures/morphed/gelslime_warp
 		map textures/morphed/gelslime.tga
 		rgbGen identity
 		depthWrite
-		blendfunc blend
+		blendfunc add
 	}
 	{
 		map $lightmap
@@ -51,6 +58,13 @@ textures/morphed/gelslime_warp
 		tcGen lightmap
 		depthFunc equal
 	}
+	dpreflectcube cubemaps/default/sky
+	{
+		map $lightmap
+		blendfunc add
+		tcGen lightmap
+	}
+	//dp_water 0.1 0.9  3 3  1 1 1  1 1 1  0.4 // disabled for performance
 }
 
 
@@ -73,6 +87,12 @@ textures/morphed/gelslime_bright
 		tcMod turb 1 0.15 0 0.15
 		tcMod scroll 0 0.2
 	}
+	dpreflectcube cubemaps/default/sky
+	{
+		map $lightmap
+		blendfunc add
+		tcGen lightmap
+	}
 }
 
 
@@ -93,5 +113,10 @@ textures/morphed/gelslime_bright_warp
 		blendFunc add
 		rgbGen identity
 	}
+	dpreflectcube cubemaps/default/sky
+	{
+		map $lightmap
+		blendfunc add
+		tcGen lightmap
+	}
 }
-
diff --git a/data/scripts/stormkeep.shader b/data/scripts/stormkeep.shader
index a52a0635..e9dede94 100644
--- a/data/scripts/stormkeep.shader
+++ b/data/scripts/stormkeep.shader
@@ -36,6 +36,12 @@ textures/stormkeep/lava
 		map textures/stormkeep/lava.tga
 		blendfunc add
 	}
+	dpreflectcube cubemaps/default/sky
+	{
+		map $lightmap
+		blendfunc add
+		tcGen lightmap
+	}
 }
 
 textures/stormkeep/lava_flow
@@ -51,5 +57,11 @@ textures/stormkeep/lava_flow
 		blendfunc add
 		tcMod scroll 0 -0.25
 	}
+	dpreflectcube cubemaps/default/sky
+	{
+		map $lightmap
+		blendfunc add
+		tcGen lightmap
+	}
 }
 
diff --git a/data/scripts/water.shader b/data/scripts/water.shader
index e9be30c8..034d6294 100644
--- a/data/scripts/water.shader
+++ b/data/scripts/water.shader
@@ -3,24 +3,6 @@
 textures/water/water0
 {
 	qer_editorimage textures/water/water0.tga
-	qer_trans 20
-	surfaceparm nomarks
-	surfaceparm trans
-	surfaceparm water
-	surfaceparm nolightmap
-	cull none
-	q3map_globaltexture
-	{
-		map textures/water/water0.tga
-		tcMod scroll 0.07 0.07
-		tcmod scale 1.2 0.7
-		blendfunc blend
-	}
-	dp_water 0.1 0.8  3 3  1 1 1  1 1 1  0.125
-}
-
-textures/water/water0_cubemap
-{
 	qer_trans 20
 	surfaceparm nomarks
 	surfaceparm trans
@@ -29,7 +11,6 @@ textures/water/water0_cubemap
 	cull none
 	q3map_globaltexture
 	tessSize 256
-	qer_editorimage textures/water/water0_reflect.tga
 	{
 		map textures/water/water0.tga
 		tcMod turb 0 0.4 0 0.08
@@ -41,6 +22,7 @@ textures/water/water0_cubemap
 		blendfunc add
 		tcGen lightmap
 	}
+	dp_water 0.1 0.9  3 3  1 1 1  1 1 1  0.4
 }
 
 textures/water/water1
@@ -53,11 +35,17 @@ textures/water/water1
 	surfaceparm nolightmap
 	cull none
 	q3map_globaltexture
+	tessSize 256
 	{
 		map textures/water/water1.tga
-		tcMod scroll 0.07 0.07
-		tcmod scale 1.2 0.7
-		blendfunc blend
+		tcMod turb 0 0.4 0 0.08
+		blendfunc add
+	}
+	dpreflectcube cubemaps/default/sky
+	{
+		map $lightmap
+		blendfunc add
+		tcGen lightmap
 	}
 	dp_water 0.1 0.8  3 3  1 1 1  1 1 1  0.125
 }
@@ -72,11 +60,17 @@ textures/water/water2
 	surfaceparm nolightmap
 	cull none
 	q3map_globaltexture
+	tessSize 256
 	{
 		map textures/water/water2.tga
-		tcMod scroll 0.07 0.07
-		tcmod scale 1.2 0.7
-		blendfunc blend
+		tcMod turb 0 0.4 0 0.08
+		blendfunc add
+	}
+	dpreflectcube cubemaps/default/sky
+	{
+		map $lightmap
+		blendfunc add
+		tcGen lightmap
 	}
 	dp_water 0.1 0.8  3 3  1 1 1  1 1 1  0.125
 }
@@ -91,11 +85,17 @@ textures/water/slime1
 	surfaceparm nolightmap
 	cull none
 	q3map_globaltexture
+	tessSize 256
 	{
 		map textures/water/slime1.tga
-		tcMod scroll 0.07 0.07
-		tcmod scale 1.2 0.7
-		blendfunc blend
+		tcMod turb 0 0.4 0 0.08
+		blendfunc add
+	}
+	dpreflectcube cubemaps/default/sky
+	{
+		map $lightmap
+		blendfunc add
+		tcGen lightmap
 	}
 	dp_water 0.1 0.8  3 3  0.5 1 0.5  0.5 1 0.5  0.75
 }
@@ -110,11 +110,17 @@ textures/water/slime2
 	surfaceparm nolightmap
 	cull none
 	q3map_globaltexture
+	tessSize 256
 	{
 		map textures/water/slime1.tga
-		tcMod scroll 0.07 0.07
-		tcmod scale 1.2 0.7
-		blendfunc blend
+		tcMod turb 0 0.4 0 0.08
+		blendfunc add
+	}
+	dpreflectcube cubemaps/default/sky
+	{
+		map $lightmap
+		blendfunc add
+		tcGen lightmap
 	}
 	dp_water 0.1 0.8  3 3  1 1 0.5  1 1 0.5  0.75
 }
diff --git a/data/textures/morphed/gelslime_reflect.jpg b/data/textures/morphed/gelslime_reflect.jpg
new file mode 100644
index 00000000..811e46a3
Binary files /dev/null and b/data/textures/morphed/gelslime_reflect.jpg differ
diff --git a/data/textures/stormkeep/lava_reflect.tga b/data/textures/stormkeep/lava_reflect.tga
new file mode 100644
index 00000000..12b27ee7
Binary files /dev/null and b/data/textures/stormkeep/lava_reflect.tga differ
diff --git a/data/textures/water/slime1_reflect.tga b/data/textures/water/slime1_reflect.tga
new file mode 100644
index 00000000..d69cdc51
Binary files /dev/null and b/data/textures/water/slime1_reflect.tga differ
diff --git a/data/textures/water/slime2_reflect.tga b/data/textures/water/slime2_reflect.tga
new file mode 100644
index 00000000..d69cdc51
Binary files /dev/null and b/data/textures/water/slime2_reflect.tga differ
diff --git a/data/textures/water/water1_reflect.tga b/data/textures/water/water1_reflect.tga
new file mode 100644
index 00000000..d69cdc51
Binary files /dev/null and b/data/textures/water/water1_reflect.tga differ
diff --git a/data/textures/water/water2_reflect.tga b/data/textures/water/water2_reflect.tga
new file mode 100644
index 00000000..d69cdc51
Binary files /dev/null and b/data/textures/water/water2_reflect.tga differ