Merge remote-tracking branch 'origin/master' into Importer

# Conflicts:
#	assets
This commit is contained in:
antc13
2016-02-11 00:08:17 +01:00
11 changed files with 74 additions and 33 deletions
@@ -4,5 +4,8 @@
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="Collidable">
<xs:annotation>
<xs:documentation>Needs a Model or AABB component to work, uses AABB if both are attached.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>
+3
View File
@@ -4,5 +4,8 @@
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="Trigger">
<xs:annotation>
<xs:documentation>Needs a Model or AABB component to work, uses AABB if both are attached.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>
@@ -9,8 +9,14 @@
<Entity>
<Components>
<c:SceneLight/>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Model>
<Resource>Models/Test/SplatMapTest.mesh</Resource>
<Resource>Models/Ground.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
+10 -10
View File
@@ -151,8 +151,6 @@ vec4 CalcNormalMappedValue(vec3 normal, vec3 tangent, vec3 bitangent, vec2 textu
return vec4(TBN * normalize(NormalMap), 0.0);
}
#define TEXTURE_TILE 5.0
vec4 CalcBlendedTexel(vec4 blendValue, sampler2D R, sampler2D G, sampler2D B, sampler2D A, sampler2D D,
vec2 R_TileValues, vec2 G_TileValues, vec2 B_TileValues, vec2 A_TileValues, vec2 D_TileValues){
vec4 R_Channel = texture2D(R, Input.TextureCoordinate * R_TileValues);
@@ -163,10 +161,11 @@ vec4 CalcBlendedTexel(vec4 blendValue, sampler2D R, sampler2D G, sampler2D B, sa
float total = blendValue.r + blendValue.g + blendValue.b + blendValue.a;
if(total > 1.0f){
blendValue.r / total;
blendValue.g / total;
blendValue.b / total;
blendValue.a / total;
float totalDiv = 1.0f / total;
blendValue.r = blendValue.r * totalDiv;
blendValue.g = blendValue.g * totalDiv;
blendValue.b = blendValue.b * totalDiv;
blendValue.a = blendValue.a * totalDiv;
}
float D_percent = clamp( 1.0f - total, 0.0f, 1.0f);
@@ -188,10 +187,11 @@ vec4 CalcBlendedNormal(vec4 blendValue, sampler2D R, sampler2D G, sampler2D B, s
float total = blendValue.r + blendValue.g + blendValue.b + blendValue.a;
if(total > 1.0f){
blendValue.r / total;
blendValue.g / total;
blendValue.b / total;
blendValue.a / total;
float totalDiv = 1 / total;
blendValue.r = blendValue.r * totalDiv;
blendValue.g = blendValue.g * totalDiv;
blendValue.b = blendValue.b * totalDiv;
blendValue.a = blendValue.a * totalDiv;
}
float D_percent = clamp( 1.0f - total, 0.0f, 1.0f);