Merge branch 'master' into Movement
# Conflicts: # include/Engine/Network/Client.h # resources/DefaultConfig.ini # resources/Schema/Entities/OverwatchCamera.xml # resources/Schema/Types/Entity.xsd
This commit is contained in:
@@ -85,4 +85,7 @@ NumIterations=2
|
||||
NumIterations=4
|
||||
|
||||
[GLOW3]
|
||||
NumIterations=6
|
||||
NumIterations=6
|
||||
|
||||
[MSAA]
|
||||
Level = 0;
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<xs:include schemaLocation="Components/NetworkComponent.xsd"/>
|
||||
<xs:include schemaLocation="Components/ServerIdentity.xsd"/>
|
||||
<xs:include schemaLocation="Components/ServerList.xsd"/>
|
||||
<xs:include schemaLocation="Components/Unpickable.xsd"/>
|
||||
<xs:include schemaLocation="Components/ConfigBtnResolution.xsd"/>
|
||||
<xs:include schemaLocation="Components/ConfigBtnFloat.xsd"/>
|
||||
<xs:include schemaLocation="Components/EndScreen.xsd"/>
|
||||
|
||||
@@ -10,5 +10,6 @@
|
||||
<KeepRatioY>false</KeepRatioY>
|
||||
<KeepRatio>false</KeepRatio>
|
||||
<Linear>true</Linear>
|
||||
<ClampToBorder>false</ClampToBorder>
|
||||
<BlurBackground>false</BlurBackground>
|
||||
</Sprite>
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
<xs:element name="Linear" type="t:bool" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>If it should use Linear or Nearest sampling method.</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="ClampToBorder" type="t:bool" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>If it should clamp to border or repeat the texture.</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element name="BlurBackground" type="t:bool" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>Wether the background should be blurred begind this sprite.</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Unpickable xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Unpickable.xsd">
|
||||
</Unpickable>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
||||
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||
|
||||
<xs:element name="Unpickable">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Makes the entity unpickable</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
+10216
-10071
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -72,6 +72,7 @@
|
||||
<xs:element ref="c:ServerIdentity" minOccurs="0"/>
|
||||
<xs:element ref="c:ServerList" minOccurs="0"/>
|
||||
<xs:element ref="c:EndScreen" minOccurs="0"/>
|
||||
<xs:element ref="c:Unpickable" minOccurs="0"/>
|
||||
<xs:element ref="c:Fade" minOccurs="0"/>
|
||||
<xs:element ref="c:ConfigBtnResolution" minOccurs="0"/>
|
||||
<xs:element ref="c:ConfigBtnFloat" minOccurs="0"/>
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
#version 430
|
||||
|
||||
uniform mat4 M;
|
||||
uniform mat4 V;
|
||||
uniform mat4 P;
|
||||
uniform vec4 Color;
|
||||
|
||||
uniform sampler2D texture0;
|
||||
|
||||
in VertexData{
|
||||
vec3 Position;
|
||||
vec4 ViewSpacePosition;
|
||||
vec3 Normal;
|
||||
vec2 TextureCoordinate;
|
||||
vec4 DiffuseColor;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#define MAX_SPLITS 4
|
||||
|
||||
uniform mat4 PVM;
|
||||
uniform mat4 M;
|
||||
uniform mat4 V;
|
||||
uniform mat4 P;
|
||||
@@ -23,6 +24,7 @@ uniform float ColorDistanceScalar;
|
||||
|
||||
in VertexData{
|
||||
vec3 Position;
|
||||
vec4 ViewSpacePosition;
|
||||
vec3 Normal;
|
||||
vec3 Tangent;
|
||||
vec3 BiTangent;
|
||||
@@ -34,6 +36,7 @@ in VertexData{
|
||||
|
||||
out VertexData{
|
||||
vec3 Position;
|
||||
vec4 ViewSpacePosition;
|
||||
vec3 Normal;
|
||||
vec3 Tangent;
|
||||
vec3 BiTangent;
|
||||
@@ -101,6 +104,7 @@ void PassThingsThrough(int index)
|
||||
// pass through vertex data
|
||||
Output.Normal = Input[index].Normal;
|
||||
Output.Position = Input[index].Position;
|
||||
Output.ViewSpacePosition = Input[index].ViewSpacePosition;
|
||||
Output.TextureCoordinate = Input[index].TextureCoordinate;
|
||||
Output.Tangent = Input[index].Tangent;
|
||||
Output.BiTangent = Input[index].BiTangent;
|
||||
@@ -175,7 +179,7 @@ void main()
|
||||
}
|
||||
|
||||
// convert to window space
|
||||
gl_Position = P * V * M * vec4(ExplodedPosition, 1.0);
|
||||
gl_Position = PVM * vec4(ExplodedPosition, 1.0);
|
||||
EmitVertex();
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#define MIN_AMBIENT_LIGHT 0.3
|
||||
#define MAX_SPLITS 4
|
||||
|
||||
uniform mat4 VM;
|
||||
uniform mat4 M;
|
||||
uniform mat4 V;
|
||||
uniform mat4 P;
|
||||
@@ -65,6 +63,7 @@ layout (std430, binding = 4) buffer LightIndexBuffer
|
||||
|
||||
in VertexData{
|
||||
vec3 Position;
|
||||
vec4 ViewSpacePosition;
|
||||
vec3 Normal;
|
||||
vec3 Tangent;
|
||||
vec3 BiTangent;
|
||||
@@ -302,11 +301,10 @@ void main()
|
||||
vec4 diffuseTexel = texture2D(DiffuseTexture, Input.TextureCoordinate * DiffuseUVRepeat);
|
||||
vec4 glowTexel = texture2D(GlowMapTexture, Input.TextureCoordinate * GlowUVRepeat);
|
||||
vec4 specularTexel = texture2D(SpecularMapTexture, Input.TextureCoordinate * SpecularUVRepeat);
|
||||
vec4 position = VM * vec4(Input.Position, 1.0);
|
||||
vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate * NormalUVRepeat, NormalMapTexture);
|
||||
normal = normalize(normal);
|
||||
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
|
||||
vec4 viewVec = normalize(-position);
|
||||
vec4 viewVec = normalize(-Input.ViewSpacePosition);
|
||||
vec3 I = normalize(vec3(M * vec4(Input.Position, 1.0)) - CameraPosition);
|
||||
vec3 R = reflect(-I, Input.Normal);
|
||||
//R = vec3(P * vec4(R, 1.0));
|
||||
@@ -333,7 +331,7 @@ void main()
|
||||
LightResult light_result;
|
||||
//These if statements should be removed.
|
||||
if(light.Type == 1) { // point
|
||||
light_result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, position, normal, light.Falloff);
|
||||
light_result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, Input.ViewSpacePosition, normal, light.Falloff);
|
||||
} else if (light.Type == 2) { //Directional
|
||||
int DepthMapIndex = getShadowIndex(FarDistance);
|
||||
light_result = CalcDirectionalLightSource(V * light.Direction, light.Color, light.Intensity, viewVec, normal);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#version 430
|
||||
uniform mat4 PVM;
|
||||
uniform mat4 VM;
|
||||
#define MAX_SPLITS 4
|
||||
uniform mat4 TIM;
|
||||
|
||||
@@ -17,6 +18,7 @@ layout(location = 4) in vec2 TextureCoords;
|
||||
|
||||
out VertexData{
|
||||
vec3 Position;
|
||||
vec4 ViewSpacePosition;
|
||||
vec3 Normal;
|
||||
vec3 Tangent;
|
||||
vec3 BiTangent;
|
||||
@@ -31,6 +33,7 @@ void main()
|
||||
gl_Position = PVM * vec4(Position, 1.0);
|
||||
//mat4 TIM = transpose(inverse(M));
|
||||
Output.Position = Position;
|
||||
Output.ViewSpacePosition = VM * vec4(Position, 1.0);
|
||||
Output.TextureCoordinate = TextureCoords;
|
||||
Output.Normal = vec3(TIM * vec4(Normal, 0.0));
|
||||
Output.Tangent = vec3(TIM * vec4(Tangent, 0.0));
|
||||
|
||||
@@ -65,6 +65,7 @@ layout (std430, binding = 4) buffer LightIndexBuffer
|
||||
|
||||
in VertexData{
|
||||
vec3 Position;
|
||||
vec4 ViewSpacePosition;
|
||||
vec3 Normal;
|
||||
vec3 Tangent;
|
||||
vec3 BiTangent;
|
||||
@@ -141,11 +142,10 @@ void main()
|
||||
vec4 diffuseTexel = texture2D(DiffuseTexture, Input.TextureCoordinate * DiffuseUVRepeat);
|
||||
vec4 glowTexel = texture2D(GlowMapTexture, Input.TextureCoordinate * GlowUVRepeat);
|
||||
vec4 specularTexel = texture2D(SpecularMapTexture, Input.TextureCoordinate * SpecularUVRepeat);
|
||||
vec4 position = VM * vec4(Input.Position, 1.0);
|
||||
vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate * NormalUVRepeat, NormalMapTexture);
|
||||
normal = normalize(normal);
|
||||
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
|
||||
vec4 viewVec = normalize(-position);
|
||||
vec4 viewVec = normalize(-Input.ViewSpacePosition);
|
||||
vec3 I = normalize(vec3(M * vec4(Input.Position, 1.0)) - CameraPosition);
|
||||
vec3 R = reflect(-I, Input.Normal);
|
||||
//R = vec3(P * vec4(R, 1.0));
|
||||
@@ -170,7 +170,7 @@ void main()
|
||||
LightResult light_result;
|
||||
//These if statements should be removed.
|
||||
if(light.Type == 1) { // point
|
||||
light_result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, position, normal, light.Falloff);
|
||||
light_result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, Input.ViewSpacePosition, normal, light.Falloff);
|
||||
} else if (light.Type == 2) { //Directional
|
||||
light_result = CalcDirectionalLightSource(V * light.Direction, light.Color, light.Intensity, viewVec, normal);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#define MAX_SPLITS 4
|
||||
|
||||
uniform mat4 PVM;
|
||||
uniform mat4 VM;
|
||||
uniform mat4 TIM;
|
||||
uniform mat4 M;
|
||||
uniform mat4 V;
|
||||
@@ -21,6 +22,7 @@ layout(location = 6) in vec4 BoneWeights;
|
||||
|
||||
out VertexData{
|
||||
vec3 Position;
|
||||
vec4 ViewSpacePosition;
|
||||
vec3 Normal;
|
||||
vec3 Tangent;
|
||||
vec3 BiTangent;
|
||||
@@ -34,16 +36,15 @@ void main()
|
||||
{
|
||||
mat4 boneTransform = mat4(1);
|
||||
|
||||
if(BoneWeights[0] > 0.0f){
|
||||
boneTransform = BoneWeights[0] * Bones[int(BoneIndices[0])]
|
||||
+ BoneWeights[1] * Bones[int(BoneIndices[1])]
|
||||
+ BoneWeights[2] * Bones[int(BoneIndices[2])]
|
||||
+ BoneWeights[3] * Bones[int(BoneIndices[3])];
|
||||
}
|
||||
|
||||
gl_Position = PVM*boneTransform * vec4(Position, 1.0);
|
||||
|
||||
Output.Position = (boneTransform * vec4(Position, 1.0)).xyz;
|
||||
Output.ViewSpacePosition = VM * vec4(Position, 1.0);
|
||||
Output.TextureCoordinate = TextureCoords;
|
||||
Output.Normal = vec3(M * boneTransform * vec4(Normal, 0.0));
|
||||
Output.Tangent = vec3(M * vec4(Tangent, 0.0));
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#define MIN_AMBIENT_LIGHT 0.3
|
||||
#define MAX_SPLITS 4
|
||||
|
||||
uniform mat4 VM;
|
||||
uniform mat4 M;
|
||||
uniform mat4 V;
|
||||
uniform mat4 P;
|
||||
@@ -82,6 +80,7 @@ layout (std430, binding = 4) buffer LightIndexBuffer
|
||||
|
||||
in VertexData{
|
||||
vec3 Position;
|
||||
vec4 ViewSpacePosition;
|
||||
vec3 Normal;
|
||||
vec3 Tangent;
|
||||
vec3 BiTangent;
|
||||
@@ -362,13 +361,12 @@ void main()
|
||||
GlowUVRepeat1, GlowUVRepeat2, GlowUVRepeat3);
|
||||
vec4 specularTexel = CalcBlendedTexel(splatTexel, SpecularMapTexture1, SpecularMapTexture2, SpecularMapTexture3,
|
||||
SpecularUVRepeat1, SpecularUVRepeat2, SpecularUVRepeat3);
|
||||
vec4 position = VM * vec4(Input.Position, 1.0);
|
||||
//vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate, SplatMapTexture);
|
||||
vec4 normal = V * CalcBlendedNormal(splatTexel, NormalMapTexture1, NormalMapTexture2, NormalMapTexture3,
|
||||
NormalUVRepeat1, NormalUVRepeat2, NormalUVRepeat3);
|
||||
normal = normalize(normal);
|
||||
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
|
||||
vec4 viewVec = normalize(-position);
|
||||
vec4 viewVec = normalize(-Input.ViewSpacePosition);
|
||||
|
||||
vec2 tilePos;
|
||||
tilePos.x = int(gl_FragCoord.x/TILE_SIZE);
|
||||
@@ -391,7 +389,7 @@ void main()
|
||||
LightResult light_result;
|
||||
//These if statements should be removed.
|
||||
if(light.Type == 1) { // point
|
||||
light_result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, position, normal, light.Falloff);
|
||||
light_result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, Input.ViewSpacePosition, normal, light.Falloff);
|
||||
} else if (light.Type == 2) { //Directional
|
||||
int DepthMapIndex = getShadowIndex(FarDistance);
|
||||
light_result = CalcDirectionalLightSource(V * light.Direction, light.Color, light.Intensity, viewVec, normal);
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#define MIN_AMBIENT_LIGHT 0.3
|
||||
#define MAX_SPLITS 4
|
||||
|
||||
uniform mat4 VM;
|
||||
uniform mat4 M;
|
||||
uniform mat4 V;
|
||||
uniform mat4 P;
|
||||
@@ -80,6 +78,7 @@ layout (std430, binding = 4) buffer LightIndexBuffer
|
||||
|
||||
in VertexData{
|
||||
vec3 Position;
|
||||
vec4 ViewSpacePosition;
|
||||
vec3 Normal;
|
||||
vec3 Tangent;
|
||||
vec3 BiTangent;
|
||||
@@ -193,13 +192,12 @@ void main()
|
||||
GlowUVRepeat1, GlowUVRepeat2, GlowUVRepeat3);
|
||||
vec4 specularTexel = CalcBlendedTexel(splatTexel, SpecularMapTexture1, SpecularMapTexture2, SpecularMapTexture3,
|
||||
SpecularUVRepeat1, SpecularUVRepeat2, SpecularUVRepeat3);
|
||||
vec4 position = VM * vec4(Input.Position, 1.0);
|
||||
//vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate, SplatMapTexture);
|
||||
vec4 normal = V * CalcBlendedNormal(splatTexel, NormalMapTexture1, NormalMapTexture2, NormalMapTexture3,
|
||||
NormalUVRepeat1, NormalUVRepeat2, NormalUVRepeat3);
|
||||
normal = normalize(normal);
|
||||
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
|
||||
vec4 viewVec = normalize(-position);
|
||||
vec4 viewVec = normalize(-Input.ViewSpacePosition);
|
||||
|
||||
vec2 tilePos;
|
||||
tilePos.x = int(gl_FragCoord.x/TILE_SIZE);
|
||||
@@ -220,7 +218,7 @@ void main()
|
||||
LightResult light_result;
|
||||
//These if statements should be removed.
|
||||
if(light.Type == 1) { // point
|
||||
light_result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, position, normal, light.Falloff);
|
||||
light_result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, Input.ViewSpacePosition, normal, light.Falloff);
|
||||
} else if (light.Type == 2) { //Directional
|
||||
light_result = CalcDirectionalLightSource(V * light.Direction, light.Color, light.Intensity, viewVec, normal);
|
||||
}
|
||||
|
||||
@@ -17,12 +17,10 @@ out VertexData{
|
||||
void main()
|
||||
{
|
||||
mat4 boneTransform = mat4(1);
|
||||
if(BoneWeights[0] > 0.0f){
|
||||
boneTransform = BoneWeights[0] * Bones[int(BoneIndices[0])]
|
||||
+ BoneWeights[1] * Bones[int(BoneIndices[1])]
|
||||
+ BoneWeights[2] * Bones[int(BoneIndices[2])]
|
||||
+ BoneWeights[3] * Bones[int(BoneIndices[3])];
|
||||
}
|
||||
|
||||
gl_Position = PVM*boneTransform * vec4(Position, 1.0);
|
||||
Output.Position = (boneTransform * vec4(Position, 1.0)).xyz;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#version 430
|
||||
|
||||
uniform mat4 M;
|
||||
uniform mat4 V;
|
||||
uniform mat4 P;
|
||||
uniform mat4 PVM;
|
||||
|
||||
layout (location = 0) in vec3 Position;
|
||||
layout (location = 4) in vec2 TextureCoords;
|
||||
@@ -13,6 +11,6 @@ out VertexData{
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = P * V * M * vec4(Position, 1.0);
|
||||
gl_Position = PVM * vec4(Position, 1.0);
|
||||
Output.TextureCoordinate = TextureCoords;
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
#version 430
|
||||
|
||||
uniform mat4 M;
|
||||
uniform mat4 V;
|
||||
uniform mat4 P;
|
||||
uniform mat4 PVM;
|
||||
uniform mat4 Bones[100];
|
||||
|
||||
layout (location = 0) in vec3 Position;
|
||||
@@ -17,13 +15,11 @@ out VertexData{
|
||||
void main()
|
||||
{
|
||||
mat4 boneTransform = mat4(1);
|
||||
if(BoneWeights[0] > 0.0f){
|
||||
boneTransform = BoneWeights[0] * Bones[int(BoneIndices[0])]
|
||||
+ BoneWeights[1] * Bones[int(BoneIndices[1])]
|
||||
+ BoneWeights[2] * Bones[int(BoneIndices[2])]
|
||||
+ BoneWeights[3] * Bones[int(BoneIndices[3])];
|
||||
}
|
||||
|
||||
gl_Position = P * V * M * boneTransform * vec4(Position, 1.0);
|
||||
gl_Position = PVM * boneTransform * vec4(Position, 1.0);
|
||||
Output.TextureCoordinate = TextureCoords;
|
||||
}
|
||||
Reference in New Issue
Block a user