Merge branch 'master' into DashEffect
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"/>
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<PlayerSpawn xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PlayerSpawn.xsd"/>
|
||||
<PlayerSpawn xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PlayerSpawn.xsd">
|
||||
<AssaultFile>Schema/Entities/PlayerAssaultBlue.xml</AssaultFile>
|
||||
<DefenderFile>Schema/Entities/PlayerDefenderBlue.xml</DefenderFile>
|
||||
<SniperFile></SniperFile>
|
||||
</PlayerSpawn>
|
||||
@@ -7,5 +7,12 @@
|
||||
<xs:annotation>
|
||||
<xs:documentation>Combined with a Spawner and a Team component, defines a spawn point for a player team.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="AssaultFile" type="t:string" minOccurs="0"/>
|
||||
<xs:element name="DefenderFile" type="t:string" minOccurs="0"/>
|
||||
<xs:element name="SniperFile" type="t:string" minOccurs="0"/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
||||
@@ -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
File diff suppressed because it is too large
Load Diff
@@ -2,18 +2,58 @@
|
||||
<Entity name="ScoreBoard_Main_Origin" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
<c:NetworkComponent/>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="4.71199989" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity name="Spawner_2">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/ScoreBoard_Red.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="-16.5" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Background_Main">
|
||||
<Components>
|
||||
<c:Model>
|
||||
<GlowIntensity>0.80000019073486328</GlowIntensity>
|
||||
<Resource>Models/Props/ScoreBoard/Scoreboard.mesh</Resource>
|
||||
<Shadow>false</Shadow>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Orientation X="0" Y="3.13400006" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Background_Spectator">
|
||||
<Components>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCube.mesh</Resource>
|
||||
<GlowIntensity>0.70000028610229492</GlowIntensity>
|
||||
<Resource>Models/Props/ScoreBoard/Spectatorboard.mesh</Resource>
|
||||
<Shadow>false</Shadow>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="-19" Z="0"/>
|
||||
<Scale X="30" Y="12" Z="1"/>
|
||||
<Orientation X="0" Y="3.13300014" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Spawner_1">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/ScoreBoard_Blue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="16.5" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
@@ -30,48 +70,6 @@
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Background_Main">
|
||||
<Components>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitCube.mesh</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Scale X="69" Y="25" Z="1"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Spawner_1">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/ScoreBoard_Red.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="16.5" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="Spawner_2">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/ScoreBoard_Blue.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="-16.5" Y="0" Z="0"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity name="EndScreenCameraSpawner">
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/EndScreen.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
|
||||
@@ -150,12 +150,13 @@
|
||||
<Components>
|
||||
<c:BoneAttachment>
|
||||
<BoneName>R_Ammo_Joint</BoneName>
|
||||
<ScaleOffset X="0.600000024" Y="0.600000024" Z="0.600000024"/>
|
||||
<InheritScale>true</InheritScale>
|
||||
</c:BoneAttachment>
|
||||
<c:Transform>
|
||||
<Position X="0.0540262833" Y="-0.0954347998" Z="-0.225546911"/>
|
||||
<Orientation X="0.00124507793" Y="0.077417776" Z="0.00737103401"/>
|
||||
<Scale X="0.5" Y="0.50000006" Z="0.499999911"/>
|
||||
<Scale X="0.300000012" Y="0.300000042" Z="0.299999952"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
@@ -224,7 +225,7 @@
|
||||
<EntityFile>Schema/Entities/FriendlyBoostBlueHUD.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="-0.000110394583" Y="-0.0960000008" Z="6.07890324e-05"/>
|
||||
<Position X="-0.0762779638" Y="-0.04478902" Z="6.07890324e-05"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
|
||||
@@ -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