diff --git a/assets b/assets
index 01a73005..763d7c5c 160000
--- a/assets
+++ b/assets
@@ -1 +1 @@
-Subproject commit 01a73005d45c1d5574428536be88f085f4f844ce
+Subproject commit 763d7c5c0dcb84722221490b5ef9ed0aad18be06
diff --git a/resources/Schema/Entities/EditorTestWorld.xml b/resources/Schema/Entities/EditorTestWorld.xml
index 6ffbad89..3c521e3f 100755
--- a/resources/Schema/Entities/EditorTestWorld.xml
+++ b/resources/Schema/Entities/EditorTestWorld.xml
@@ -43,15 +43,25 @@
-
+
+
+ true
+
+
+ 0.9332666733480437
+ 5
+
+ 3
+
Models/Assault.mesh
+ true
@@ -62,23 +72,17 @@
- Models/DefenderGunBlue.mesh
+ Models/AssaultWeapon.mesh
+ true
-
-
- true
-
- 0.33345697685444975
-
-
Models/DefenderGunRed.mesh
true
@@ -105,7 +109,7 @@
Run
-
+
1
@@ -121,7 +125,7 @@
Walk
-
+
1
@@ -183,7 +187,7 @@
-
+
@@ -247,7 +251,7 @@
-
+
@@ -279,7 +283,7 @@
-
+
@@ -322,7 +326,7 @@
- 2
+ 1.3999999761581421
diff --git a/resources/Shaders/ExplosionEffect.geom.glsl b/resources/Shaders/ExplosionEffect.geom.glsl
index 34e6230d..44b44aa6 100644
--- a/resources/Shaders/ExplosionEffect.geom.glsl
+++ b/resources/Shaders/ExplosionEffect.geom.glsl
@@ -21,6 +21,7 @@ in VertexData{
vec3 BiTangent;
vec2 TextureCoordinate;
vec4 ExplosionColor;
+ float ExplosionPercentageElapsed;
}Input[];
out VertexData{
@@ -30,6 +31,7 @@ out VertexData{
vec3 BiTangent;
vec2 TextureCoordinate;
vec4 ExplosionColor;
+ float ExplosionPercentageElapsed;
}Output;
layout(triangles) in;
@@ -118,12 +120,17 @@ void main()
{
// calculate the max distance (s) the triangle will move
float s = (randomVelocity.x * ExplosionDuration) + (0.5 * a * pow(ExplosionDuration, 2));
+ float te = (length(triangleCenter2ExplosionRadius) / s);
- Output.ExplosionColor = EndColor * (length(triangleCenter2ExplosionRadius) / s);
+ Output.ExplosionColor = EndColor;
+ Output.ExplosionPercentageElapsed = te;
+
}
else
{
- Output.ExplosionColor = EndColor * timePercetage;
+ Output.ExplosionColor = EndColor;
+ Output.ExplosionPercentageElapsed = timePercetage;
+
}
// for every vertex on the triangle...
@@ -160,11 +167,14 @@ void main()
// if explosion color should be affected by distance instead of time...
if (ColorByDistance == true)
{
- Output.ExplosionColor = vec4(1.0);
+ Output.ExplosionColor = EndColor;
+ Output.ExplosionPercentageElapsed = 0.0;
}
else
{
- Output.ExplosionColor = EndColor * timePercetage;
+ Output.ExplosionColor = EndColor;
+ Output.ExplosionPercentageElapsed = timePercetage;
+
}
// for every vertex on the triangle...
diff --git a/resources/Shaders/ForwardPlus.frag.glsl b/resources/Shaders/ForwardPlus.frag.glsl
index d2c1c628..3431ed6b 100644
--- a/resources/Shaders/ForwardPlus.frag.glsl
+++ b/resources/Shaders/ForwardPlus.frag.glsl
@@ -55,6 +55,7 @@ in VertexData{
vec3 BiTangent;
vec2 TextureCoordinate;
vec4 ExplosionColor;
+ float ExplosionPercentageElapsed;
}Input;
out vec4 sceneColor;
@@ -148,7 +149,7 @@ void main()
totalLighting.Specular += light_result.Specular;
}
- vec4 color_result = Color * diffuseTexel * DiffuseColor * Input.ExplosionColor;
+ vec4 color_result = mix((Color * diffuseTexel * DiffuseColor), Input.ExplosionColor, Input.ExplosionPercentageElapsed);
color_result = color_result * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel));
//vec4 color_result = (DiffuseColor + Input.ExplosionColor) * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)) * diffuseTexel * Color;
diff --git a/resources/Shaders/ForwardPlus.vert.glsl b/resources/Shaders/ForwardPlus.vert.glsl
index 4e1f8734..3b3e931c 100644
--- a/resources/Shaders/ForwardPlus.vert.glsl
+++ b/resources/Shaders/ForwardPlus.vert.glsl
@@ -20,6 +20,7 @@ out VertexData{
vec3 BiTangent;
vec2 TextureCoordinate;
vec4 ExplosionColor;
+ float ExplosionPercentageElapsed;
}Output;
void main()
@@ -42,4 +43,5 @@ void main()
Output.Tangent = vec3(M * vec4(Tangent, 0.0));
Output.BiTangent = vec3(M * vec4(BiTangent, 0.0));
Output.ExplosionColor = vec4(1.0);
+ Output.ExplosionPercentageElapsed = 0.0;
}
\ No newline at end of file