Skip to content

Commit

Permalink
Set up tests for BW2 .modl and .out files.
Browse files Browse the repository at this point in the history
  • Loading branch information
MeltyPlayer committed Oct 23, 2023
1 parent edfcaa8 commit 26452b1
Show file tree
Hide file tree
Showing 171 changed files with 1,039 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# version 400

struct Light {
bool enabled;
vec3 position;
vec3 normal;
vec4 color;
};

uniform Light lights[8];
uniform vec3 ambientLightColor;

uniform sampler2D diffuseTexture;
uniform float useLighting;

out vec4 fragColor;

in vec4 vertexColor0;
in vec3 vertexNormal;
in vec2 uv0;

vec3 getDiffuseLightColor(Light light, vec3 vertexNormal) {
vec3 diffuseLightNormal = normalize(light.normal);
float diffuseLightAmount = max(-dot(vertexNormal, diffuseLightNormal), 0);
float lightAmount = min(diffuseLightAmount, 1);
return lightAmount * light.color.rgb;
}

vec3 getMergedDiffuseLightColor(vec3 vertexNormal) {
int enabledLightCount;

vec3 mergedLightColor;
for (int i = 0; i < 8; ++i) {
if (lights[i].enabled) {
enabledLightCount++;
mergedLightColor += getDiffuseLightColor(lights[i], vertexNormal);
}
}

return enabledLightCount == 0 ? vec3(1) : mergedLightColor / enabledLightCount;
}

vec3 applyLightingColor(vec3 diffuseColor, vec3 vertexNormal) {
vec3 mergedDiffuseLightColor = getMergedDiffuseLightColor(vertexNormal);

vec3 mergedLightColor = min(ambientLightColor + mergedDiffuseLightColor, 1);
return diffuseColor * mergedLightColor;
}

void main() {
vec4 diffuseColor = texture(diffuseTexture, uv0);

fragColor = diffuseColor * vertexColor0;
fragColor.rgb =
mix(fragColor.rgb, applyLightingColor(fragColor.rgb, vertexNormal), useLighting);

if (fragColor.a < .95) {
discard;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# version 330

uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;

layout(location = 0) in vec3 in_Position;
layout(location = 1) in vec3 in_Normal;
layout(location = 2) in vec4 in_Tangent;
layout(location = 3) in vec2 in_Uvs[4];
layout(location = 7) in vec4 in_Colors[2];

out vec3 vertexNormal;
out vec3 tangent;
out vec3 binormal;
out vec2 normalUv;
out vec2 uv0;
out vec2 uv1;
out vec2 uv2;
out vec2 uv3;
out vec4 vertexColor0;
out vec4 vertexColor1;
void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4(in_Position, 1);
vertexNormal = normalize(modelViewMatrix * vec4(in_Normal, 0)).xyz;
tangent = normalize(modelViewMatrix * vec4(in_Tangent)).xyz;
binormal = cross(vertexNormal, tangent);
normalUv = normalize(projectionMatrix * modelViewMatrix * vec4(in_Normal, 0)).xy;
uv0 = in_Uvs[0];
uv1 = in_Uvs[1];
uv2 = in_Uvs[2];
uv3 = in_Uvs[3];
vertexColor0 = in_Colors[0];
vertexColor1 = in_Colors[1];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# version 400

struct Light {
bool enabled;
vec3 position;
vec3 normal;
vec4 color;
};

uniform Light lights[8];
uniform vec3 ambientLightColor;

uniform sampler2D diffuseTexture;
uniform float useLighting;

out vec4 fragColor;

in vec4 vertexColor0;
in vec3 vertexNormal;
in vec2 uv0;

vec3 getDiffuseLightColor(Light light, vec3 vertexNormal) {
vec3 diffuseLightNormal = normalize(light.normal);
float diffuseLightAmount = max(-dot(vertexNormal, diffuseLightNormal), 0);
float lightAmount = min(diffuseLightAmount, 1);
return lightAmount * light.color.rgb;
}

vec3 getMergedDiffuseLightColor(vec3 vertexNormal) {
int enabledLightCount;

vec3 mergedLightColor;
for (int i = 0; i < 8; ++i) {
if (lights[i].enabled) {
enabledLightCount++;
mergedLightColor += getDiffuseLightColor(lights[i], vertexNormal);
}
}

return enabledLightCount == 0 ? vec3(1) : mergedLightColor / enabledLightCount;
}

vec3 applyLightingColor(vec3 diffuseColor, vec3 vertexNormal) {
vec3 mergedDiffuseLightColor = getMergedDiffuseLightColor(vertexNormal);

vec3 mergedLightColor = min(ambientLightColor + mergedDiffuseLightColor, 1);
return diffuseColor * mergedLightColor;
}

void main() {
vec4 diffuseColor = texture(diffuseTexture, uv0);

fragColor = diffuseColor * vertexColor0;
fragColor.rgb =
mix(fragColor.rgb, applyLightingColor(fragColor.rgb, vertexNormal), useLighting);

if (fragColor.a < .95) {
discard;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# version 330

uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;

layout(location = 0) in vec3 in_Position;
layout(location = 1) in vec3 in_Normal;
layout(location = 2) in vec4 in_Tangent;
layout(location = 3) in vec2 in_Uvs[4];
layout(location = 7) in vec4 in_Colors[2];

out vec3 vertexNormal;
out vec3 tangent;
out vec3 binormal;
out vec2 normalUv;
out vec2 uv0;
out vec2 uv1;
out vec2 uv2;
out vec2 uv3;
out vec4 vertexColor0;
out vec4 vertexColor1;
void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4(in_Position, 1);
vertexNormal = normalize(modelViewMatrix * vec4(in_Normal, 0)).xyz;
tangent = normalize(modelViewMatrix * vec4(in_Tangent)).xyz;
binormal = cross(vertexNormal, tangent);
normalUv = normalize(projectionMatrix * modelViewMatrix * vec4(in_Normal, 0)).xy;
uv0 = in_Uvs[0];
uv1 = in_Uvs[1];
uv2 = in_Uvs[2];
uv3 = in_Uvs[3];
vertexColor0 = in_Colors[0];
vertexColor1 = in_Colors[1];
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# version 400

uniform sampler2D texture0;
uniform sampler2D texture1;

in vec4 vertexColor0;
in vec2 uv0;
in vec2 uv1;

out vec4 fragColor;

void main() {
vec3 colorComponent = vertexColor0.rgb*(texture(texture0, uv0).rgb*vec3(1 + -1*vertexColor0.a) + texture(texture1, uv1).rgb*vec3(vertexColor0.a));

float alphaComponent = 1;

fragColor = vec4(colorComponent, alphaComponent);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# version 330

uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;

layout(location = 0) in vec3 in_Position;
layout(location = 1) in vec3 in_Normal;
layout(location = 2) in vec4 in_Tangent;
layout(location = 3) in vec2 in_Uvs[4];
layout(location = 7) in vec4 in_Colors[2];

out vec3 vertexNormal;
out vec3 tangent;
out vec3 binormal;
out vec2 normalUv;
out vec2 uv0;
out vec2 uv1;
out vec2 uv2;
out vec2 uv3;
out vec4 vertexColor0;
out vec4 vertexColor1;
void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4(in_Position, 1);
vertexNormal = normalize(modelViewMatrix * vec4(in_Normal, 0)).xyz;
tangent = normalize(modelViewMatrix * vec4(in_Tangent)).xyz;
binormal = cross(vertexNormal, tangent);
normalUv = normalize(projectionMatrix * modelViewMatrix * vec4(in_Normal, 0)).xy;
uv0 = in_Uvs[0];
uv1 = in_Uvs[1];
uv2 = in_Uvs[2];
uv3 = in_Uvs[3];
vertexColor0 = in_Colors[0];
vertexColor1 = in_Colors[1];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# version 400

uniform sampler2D texture0;
uniform sampler2D texture1;

in vec4 vertexColor0;
in vec2 uv0;
in vec2 uv1;

out vec4 fragColor;

void main() {
vec3 colorComponent = vertexColor0.rgb*(texture(texture0, uv0).rgb*vec3(1 + -1*vertexColor0.a) + texture(texture1, uv1).rgb*vec3(vertexColor0.a));

float alphaComponent = 1;

fragColor = vec4(colorComponent, alphaComponent);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# version 330

uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;

layout(location = 0) in vec3 in_Position;
layout(location = 1) in vec3 in_Normal;
layout(location = 2) in vec4 in_Tangent;
layout(location = 3) in vec2 in_Uvs[4];
layout(location = 7) in vec4 in_Colors[2];

out vec3 vertexNormal;
out vec3 tangent;
out vec3 binormal;
out vec2 normalUv;
out vec2 uv0;
out vec2 uv1;
out vec2 uv2;
out vec2 uv3;
out vec4 vertexColor0;
out vec4 vertexColor1;
void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4(in_Position, 1);
vertexNormal = normalize(modelViewMatrix * vec4(in_Normal, 0)).xyz;
tangent = normalize(modelViewMatrix * vec4(in_Tangent)).xyz;
binormal = cross(vertexNormal, tangent);
normalUv = normalize(projectionMatrix * modelViewMatrix * vec4(in_Normal, 0)).xy;
uv0 = in_Uvs[0];
uv1 = in_Uvs[1];
uv2 = in_Uvs[2];
uv3 = in_Uvs[3];
vertexColor0 = in_Colors[0];
vertexColor1 = in_Colors[1];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# version 400

uniform sampler2D texture0;
uniform sampler2D texture1;

in vec4 vertexColor0;
in vec2 uv0;
in vec2 uv1;

out vec4 fragColor;

void main() {
vec3 colorComponent = vertexColor0.rgb*(texture(texture0, uv0).rgb*vec3(1 + -1*vertexColor0.a) + texture(texture1, uv1).rgb*vec3(vertexColor0.a));

float alphaComponent = 1;

fragColor = vec4(colorComponent, alphaComponent);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# version 330

uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;

layout(location = 0) in vec3 in_Position;
layout(location = 1) in vec3 in_Normal;
layout(location = 2) in vec4 in_Tangent;
layout(location = 3) in vec2 in_Uvs[4];
layout(location = 7) in vec4 in_Colors[2];

out vec3 vertexNormal;
out vec3 tangent;
out vec3 binormal;
out vec2 normalUv;
out vec2 uv0;
out vec2 uv1;
out vec2 uv2;
out vec2 uv3;
out vec4 vertexColor0;
out vec4 vertexColor1;
void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4(in_Position, 1);
vertexNormal = normalize(modelViewMatrix * vec4(in_Normal, 0)).xyz;
tangent = normalize(modelViewMatrix * vec4(in_Tangent)).xyz;
binormal = cross(vertexNormal, tangent);
normalUv = normalize(projectionMatrix * modelViewMatrix * vec4(in_Normal, 0)).xy;
uv0 = in_Uvs[0];
uv1 = in_Uvs[1];
uv2 = in_Uvs[2];
uv3 = in_Uvs[3];
vertexColor0 = in_Colors[0];
vertexColor1 = in_Colors[1];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# version 400

uniform sampler2D texture0;
uniform sampler2D texture1;

in vec4 vertexColor0;
in vec2 uv0;
in vec2 uv1;

out vec4 fragColor;

void main() {
vec3 colorComponent = vertexColor0.rgb*(texture(texture0, uv0).rgb*vec3(1 + -1*vertexColor0.a) + texture(texture1, uv1).rgb*vec3(vertexColor0.a));

float alphaComponent = 1;

fragColor = vec4(colorComponent, alphaComponent);
}
Loading

0 comments on commit 26452b1

Please sign in to comment.