Skip to content

Commit

Permalink
Uh some of these didn't get included last time.
Browse files Browse the repository at this point in the history
  • Loading branch information
MeltyPlayer committed Oct 27, 2023
1 parent bb3fbbd commit 07889bf
Show file tree
Hide file tree
Showing 206 changed files with 4,812 additions and 0 deletions.
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.
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.
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.
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.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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,61 @@
# 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,61 @@
# 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,61 @@
# 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];
}
Loading

0 comments on commit 07889bf

Please sign in to comment.