im nauseous
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#version 330 core
|
||||
in vec2 TexCoords;
|
||||
out vec4 color;
|
||||
|
||||
uniform sampler2D text;
|
||||
uniform vec4 textColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 sampled = vec4(1.0, 1.0, 1.0, texture(text, TexCoords).r);
|
||||
color = textColor * sampled;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec4 vertex; // <vec2 pos, vec2 tex>
|
||||
out vec2 TexCoords;
|
||||
|
||||
uniform vec2 screenSize;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 ndc = (vertex.xy / screenSize) * 2.0 - 1.0;
|
||||
ndc.y = -ndc.y;
|
||||
|
||||
gl_Position = vec4(ndc, 0.0, 1.0);
|
||||
TexCoords = vertex.zw;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec2 TexCoords;
|
||||
|
||||
uniform float rounding = 0.0f;
|
||||
|
||||
uniform vec2 screenSize;
|
||||
uniform vec2 normalizedCenterPos;
|
||||
uniform vec2 normalizedCenterScale;
|
||||
uniform vec2 pixelScale;
|
||||
uniform vec2 pixelPos;
|
||||
|
||||
uniform vec4 Color = {0.0f,0.0f,0.0f,1.0f};
|
||||
uniform vec4 BackgroundColor = {0.0f,0.0f,0.0f,1.0f};
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = Color;
|
||||
|
||||
|
||||
float rounding = clamp(rounding,0.0f,1.0f);
|
||||
if (rounding != 0.0f) {
|
||||
float roundingfactor = min(pixelScale.x,pixelScale.y)/2 * rounding;
|
||||
vec2 r1 = pixelScale/2 - vec2(roundingfactor);
|
||||
vec2 absrelcoord = abs(gl_FragCoord.xy - pixelScale/2 - pixelPos);
|
||||
|
||||
if (!(absrelcoord.x < r1.x || absrelcoord.y < r1.y)) {
|
||||
if (pow(absrelcoord.y-r1.y,2) > pow(roundingfactor,2) - pow((absrelcoord.x-r1.x),2)) {
|
||||
discard;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec2 aPos;
|
||||
layout (location = 1) in vec2 aTexCoords;
|
||||
|
||||
out vec2 TexCoords;
|
||||
|
||||
uniform vec2 normalizedCenterPos;
|
||||
uniform vec2 normalizedCenterScale;
|
||||
|
||||
uniform float z;
|
||||
uniform float rotation;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(normalizedCenterPos + aPos * normalizedCenterScale,0.0f,1.0f);
|
||||
|
||||
TexCoords = aTexCoords;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec2 TexCoords;
|
||||
|
||||
uniform float rounding = 0.0f;
|
||||
|
||||
uniform vec2 screenSize;
|
||||
uniform vec2 normalizedCenterPos;
|
||||
uniform vec2 normalizedCenterScale;
|
||||
uniform vec2 pixelScale;
|
||||
uniform vec2 pixelPos;
|
||||
|
||||
uniform vec4 Color = {0.0f,0.0f,0.0f,1.0f};
|
||||
uniform vec4 BackgroundColor = {0.0f,0.0f,0.0f,1.0f};
|
||||
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = Color * texture(tex,TexCoords);
|
||||
|
||||
|
||||
float rounding = clamp(rounding,0.0f,1.0f);
|
||||
if (rounding != 0.0f) {
|
||||
float roundingfactor = min(pixelScale.x,pixelScale.y)/2 * rounding;
|
||||
vec2 r1 = pixelScale/2 - vec2(roundingfactor);
|
||||
vec2 absrelcoord = abs(gl_FragCoord.xy - pixelScale/2 - pixelPos);
|
||||
|
||||
if (!(absrelcoord.x < r1.x || absrelcoord.y < r1.y)) {
|
||||
if (pow(absrelcoord.y-r1.y,2) > pow(roundingfactor,2) - pow((absrelcoord.x-r1.x),2)) {
|
||||
discard;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec2 aPos;
|
||||
layout (location = 1) in vec2 aTexCoords;
|
||||
|
||||
out vec2 TexCoords;
|
||||
|
||||
uniform vec2 normalizedCenterPos;
|
||||
uniform vec2 normalizedCenterScale;
|
||||
|
||||
uniform float z;
|
||||
uniform float rotation;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(normalizedCenterPos + aPos * normalizedCenterScale,0.0f,1.0f);
|
||||
|
||||
TexCoords = aTexCoords;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec3 normal;
|
||||
in vec2 texCoord;
|
||||
in vec3 FragPos;
|
||||
|
||||
uniform sampler2D tex;
|
||||
uniform vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 base = texture(tex,texCoord) * color;
|
||||
if (base.w == 0.0f) {
|
||||
discard;
|
||||
}
|
||||
FragColor = base;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec3 aNormal;
|
||||
layout (location = 2) in vec2 aTex;
|
||||
layout(location = 3) in mat4 modl;
|
||||
|
||||
out vec3 normal;
|
||||
out vec2 texCoord;
|
||||
out vec3 FragPos;
|
||||
|
||||
uniform mat4 view;
|
||||
uniform mat4 proj;
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
FragPos = vec3(modl * vec4(aPos, 1.0));
|
||||
normal = aNormal;
|
||||
texCoord = aTex;
|
||||
gl_Position = proj* view * modl * vec4(aPos,1.0f);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec2 TexCoords;
|
||||
|
||||
uniform sampler2D screenTexture;
|
||||
uniform float brightness = 0.0f;
|
||||
uniform float colorContrast = 0.0f;
|
||||
uniform float saturation = 1.0f;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 originalcolor = texture(screenTexture, TexCoords).rgb;
|
||||
vec3 finalcolor = originalcolor;
|
||||
const float gamma = 2.2;
|
||||
finalcolor = pow(finalcolor, vec3(1.0 / gamma));
|
||||
|
||||
vec3 contrast = vec3(1.0f) - finalcolor;
|
||||
|
||||
finalcolor = mix(finalcolor,vec3(1.0f) - finalcolor,colorContrast);
|
||||
|
||||
float average = (finalcolor[0]+finalcolor[1]+finalcolor[2])/3.0f;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
finalcolor[i] = average + saturation * (finalcolor[i] - average);
|
||||
}
|
||||
|
||||
FragColor = vec4(finalcolor,1.0f);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec2 aPos;
|
||||
layout (location = 1) in vec2 aTexCoords;
|
||||
|
||||
out vec2 TexCoords;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(aPos.x, aPos.y, 0.0, 1.0);
|
||||
TexCoords = aTexCoords;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec3 normal;
|
||||
in vec2 texCoord;
|
||||
in vec3 FragPos;
|
||||
in vec4 fragposlightspace;
|
||||
|
||||
struct Material {
|
||||
vec3 ambient;
|
||||
vec3 diffuse;
|
||||
vec3 specular;
|
||||
float shininess;
|
||||
};
|
||||
|
||||
struct PointLight {
|
||||
vec3 position;
|
||||
|
||||
float constant;
|
||||
float linear;
|
||||
float quadratic;
|
||||
|
||||
vec3 ambient;
|
||||
vec3 diffuse;
|
||||
vec3 specular;
|
||||
};
|
||||
|
||||
struct DirLight {
|
||||
vec3 direction;
|
||||
|
||||
vec3 ambient;
|
||||
vec3 diffuse;
|
||||
vec3 specular;
|
||||
};
|
||||
|
||||
uniform DirLight dirLight;
|
||||
|
||||
uniform vec3 viewPos;
|
||||
|
||||
uniform sampler2DShadow shadowMap;
|
||||
uniform sampler2D tex;
|
||||
|
||||
float ShadowCalculation(vec4 fragposlightspace)
|
||||
{
|
||||
// perform perspective divide
|
||||
vec3 projCoords = fragposlightspace.xyz / fragposlightspace.w;
|
||||
projCoords = projCoords * 0.5 + 0.5;
|
||||
if(projCoords.z > 1.0)
|
||||
return 0.0;
|
||||
float currentDepth = projCoords.z;
|
||||
float bias = 0.01;
|
||||
float shadow = 0.0;
|
||||
return texture(shadowMap, vec3(projCoords.xy,projCoords.z));
|
||||
}
|
||||
|
||||
vec3 CalcDirLight(DirLight light, vec3 normal, vec3 viewDir)
|
||||
{
|
||||
vec3 lightDir = normalize(-light.direction);
|
||||
// diffuse shading
|
||||
float diff = max(dot(normal, lightDir), 0.0);
|
||||
// specular shading
|
||||
vec3 reflectDir = reflect(-lightDir, normal);
|
||||
float spec = pow(max(dot(viewDir, reflectDir), 0.0), 32.0f);
|
||||
// combine results
|
||||
vec3 ambient = light.ambient;
|
||||
vec3 diffuse = light.diffuse * diff;
|
||||
vec3 specular = light.specular * spec;
|
||||
return ambient + (diffuse + specular) * (ShadowCalculation(fragposlightspace));
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
float gamma = 2.2;
|
||||
|
||||
vec4 lightless = texture(tex, texCoord);
|
||||
lightless = texture(tex, texCoord);
|
||||
if (lightless.a < 0.1) {
|
||||
discard;
|
||||
}
|
||||
|
||||
vec3 norm = normalize(normal);
|
||||
vec3 viewDir = normalize(viewPos - FragPos);
|
||||
|
||||
vec4 pregamma = (lightless) * vec4(CalcDirLight(dirLight,norm,viewDir),1.0f) * vec4(vec3(1.0f-1.0f/gl_FragCoord[3]/ 200.0f), 1.0f);
|
||||
|
||||
FragColor = pregamma;
|
||||
|
||||
//FragColor = vec4(1.0f,1.0f,1.0f,1.0f);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec3 aNormal;
|
||||
layout (location = 2) in vec2 aTex;
|
||||
|
||||
out vec3 normal;
|
||||
out vec2 texCoord;
|
||||
out vec3 FragPos;
|
||||
out vec4 fragposlightspace;
|
||||
uniform mat4 modl;
|
||||
uniform mat4 view;
|
||||
uniform mat4 proj;
|
||||
|
||||
uniform mat4 lightSpaceMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragPos = vec3(modl * vec4(aPos, 1.0));
|
||||
normal = transpose(inverse(mat3(modl))) * aNormal;
|
||||
texCoord = aTex;
|
||||
fragposlightspace = lightSpaceMatrix * vec4(FragPos, 1.0);
|
||||
gl_Position = proj* view * modl * vec4(aPos,1.0f);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec2 TexCoord;
|
||||
|
||||
uniform sampler2D gPosition;
|
||||
uniform sampler2D gNormal;
|
||||
uniform sampler2D gAlbedo;
|
||||
uniform sampler2D gLightSpacePos;
|
||||
uniform sampler2DShadow shadowMap;
|
||||
|
||||
struct DirLight {
|
||||
vec3 direction;
|
||||
vec3 ambient;
|
||||
vec3 diffuse;
|
||||
vec3 specular;
|
||||
};
|
||||
uniform DirLight dirLight;
|
||||
uniform vec3 viewPos;
|
||||
|
||||
float ShadowCalculation(vec4 fragPosLightSpace)
|
||||
{
|
||||
vec3 projCoords = fragPosLightSpace.xyz / fragPosLightSpace.w;
|
||||
projCoords = projCoords * 0.5 + 0.5;
|
||||
if (projCoords.z > 1.0) return 0.0;
|
||||
return texture(shadowMap, vec3(projCoords.xy, projCoords.z));
|
||||
}
|
||||
|
||||
vec3 CalcDirLight(DirLight light, vec3 normal, vec3 viewDir, vec4 fragPosLS, vec3 albedo)
|
||||
{
|
||||
vec3 lightDir = normalize(-light.direction);
|
||||
float diff = max(dot(normal, lightDir), 0.0);
|
||||
vec3 halfwayDir = normalize(lightDir + viewDir);
|
||||
float spec = pow(max(dot(normal, halfwayDir), 0.0), 32.0);
|
||||
|
||||
vec3 ambient = light.ambient * albedo;
|
||||
vec3 diffuse = light.diffuse * diff * albedo;
|
||||
vec3 specular = light.specular * spec;
|
||||
|
||||
float shadow = ShadowCalculation(fragPosLS);
|
||||
return ambient + (diffuse + specular) * shadow;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 fragPos = texture(gPosition, TexCoord).rgb;
|
||||
vec3 normal = normalize(texture(gNormal, TexCoord).rgb);
|
||||
vec4 albedaSample = texture(gAlbedo, TexCoord);
|
||||
vec4 fragPosLS = texture(gLightSpacePos, TexCoord);
|
||||
|
||||
// Sky (no geometry written) — output clear color
|
||||
if (length(normal) < 0.1) {
|
||||
FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
return;
|
||||
}
|
||||
|
||||
vec3 viewDir = normalize(viewPos - fragPos);
|
||||
vec3 lit = CalcDirLight(dirLight, normal, viewDir, fragPosLS, albedaSample.rgb);
|
||||
|
||||
FragColor = vec4(lit, albedaSample.a);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec2 aPos;
|
||||
layout (location = 1) in vec2 aTexCoord;
|
||||
|
||||
out vec2 TexCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
TexCoord = aTexCoord;
|
||||
gl_Position = vec4(aPos, 0.0, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#version 330 core
|
||||
layout (location = 0) out vec3 gPosition;
|
||||
layout (location = 1) out vec3 gNormal;
|
||||
layout (location = 2) out vec4 gAlbedo;
|
||||
layout (location = 3) out vec4 gLightSpacePos;
|
||||
|
||||
in vec3 FragPos;
|
||||
in vec3 Normal;
|
||||
in vec2 TexCoord;
|
||||
in vec4 FragPosLightSpace;
|
||||
|
||||
uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 albedo = texture(tex, TexCoord);
|
||||
if (albedo.a < 0.1) discard;
|
||||
|
||||
gPosition = FragPos;
|
||||
gNormal = normalize(Normal);
|
||||
gAlbedo = albedo;
|
||||
gLightSpacePos = FragPosLightSpace;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec3 aNormal;
|
||||
layout (location = 2) in vec2 aTexCoord;
|
||||
|
||||
out vec3 FragPos;
|
||||
out vec3 Normal;
|
||||
out vec2 TexCoord;
|
||||
out vec4 FragPosLightSpace;
|
||||
|
||||
uniform mat4 proj;
|
||||
uniform mat4 view;
|
||||
uniform mat4 modl;
|
||||
uniform mat4 lightSpaceMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 worldPos = modl * vec4(aPos, 1.0);
|
||||
FragPos = worldPos.xyz;
|
||||
Normal = normalize(mat3(transpose(inverse(modl))) * aNormal);
|
||||
TexCoord = aTexCoord;
|
||||
FragPosLightSpace = lightSpaceMatrix * worldPos;
|
||||
gl_Position = proj * view * worldPos;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
layout (location = 1) in vec3 aNormal;
|
||||
layout (location = 2) in vec2 aTexCoord;
|
||||
layout (location = 3) in ivec4 boneIds;
|
||||
layout (location = 4) in vec4 weights;
|
||||
|
||||
out vec3 FragPos;
|
||||
out vec3 Normal;
|
||||
out vec2 TexCoord;
|
||||
out vec4 FragPosLightSpace;
|
||||
|
||||
uniform mat4 proj;
|
||||
uniform mat4 view;
|
||||
uniform mat4 modl;
|
||||
uniform mat4 lightSpaceMatrix;
|
||||
uniform mat4 finalBonesMatrices[100];
|
||||
|
||||
void main()
|
||||
{
|
||||
mat4 boneTransform = finalBonesMatrices[boneIds[0]] * weights[0];
|
||||
boneTransform += finalBonesMatrices[boneIds[1]] * weights[1];
|
||||
boneTransform += finalBonesMatrices[boneIds[2]] * weights[2];
|
||||
boneTransform += finalBonesMatrices[boneIds[3]] * weights[3];
|
||||
|
||||
vec4 localPos = boneTransform * vec4(aPos, 1.0);
|
||||
vec4 worldPos = modl * localPos;
|
||||
|
||||
FragPos = worldPos.xyz;
|
||||
Normal = normalize(mat3(transpose(inverse(modl * boneTransform))) * aNormal);
|
||||
TexCoord = aTexCoord;
|
||||
FragPosLightSpace = lightSpaceMatrix * worldPos;
|
||||
gl_Position = proj * view * worldPos;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
|
||||
uniform mat4 lightSpaceMatrix;
|
||||
uniform mat4 modl;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = lightSpaceMatrix * modl * vec4(aPos, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
#version 430 core
|
||||
|
||||
layout(location = 0) in vec3 pos;
|
||||
layout(location = 1) in vec3 norm;
|
||||
layout(location = 2) in vec2 tex;
|
||||
layout(location = 3) in ivec4 boneIds;
|
||||
layout(location = 4) in vec4 weights;
|
||||
|
||||
uniform mat4 proj;
|
||||
uniform mat4 view;
|
||||
uniform mat4 modl;
|
||||
|
||||
uniform mat4 lightSpaceMatrix;
|
||||
|
||||
const int MAX_BONES = 100;
|
||||
const int MAX_BONE_INFLUENCE = 4;
|
||||
uniform mat4 finalBonesMatrices[MAX_BONES];
|
||||
|
||||
out vec3 normal;
|
||||
out vec2 texCoord;
|
||||
out vec3 FragPos;
|
||||
out vec4 fragposlightspace;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 totalPosition = vec4(0.0);
|
||||
vec3 totalNormal = vec3(0.0);
|
||||
|
||||
int bonescontributed = 0;
|
||||
for(int i = 0; i < MAX_BONE_INFLUENCE; i++)
|
||||
{
|
||||
if(boneIds[i] == -1) continue;
|
||||
if(boneIds[i] >= MAX_BONES)
|
||||
{
|
||||
totalPosition = vec4(pos, 1.0);
|
||||
totalNormal = norm;
|
||||
break;
|
||||
}
|
||||
bonescontributed ++;
|
||||
totalPosition += (finalBonesMatrices[boneIds[i]] * vec4(pos, 1.0))* weights[i];
|
||||
totalNormal += mat3(finalBonesMatrices[boneIds[i]]) * norm * weights[i];
|
||||
}
|
||||
FragPos = vec3(modl * totalPosition);
|
||||
fragposlightspace = lightSpaceMatrix * vec4(FragPos, 1.0);
|
||||
gl_Position = proj * view * modl * totalPosition;
|
||||
normal = normalize(mat3(transpose(inverse(modl))) * totalNormal);
|
||||
texCoord = tex;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
#version 430 core
|
||||
layout(location = 0) in vec3 pos;
|
||||
layout(location = 3) in ivec4 boneIds;
|
||||
layout(location = 4) in vec4 weights;
|
||||
|
||||
uniform mat4 modl;
|
||||
uniform mat4 lightSpaceMatrix;
|
||||
|
||||
const int MAX_BONES = 100;
|
||||
const int MAX_BONE_INFLUENCE = 4;
|
||||
uniform mat4 finalBonesMatrices[MAX_BONES];
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 totalPosition = vec4(0.0);
|
||||
for (int i = 0; i < MAX_BONE_INFLUENCE; i++)
|
||||
{
|
||||
if (boneIds[i] == -1) continue;
|
||||
if (boneIds[i] >= MAX_BONES)
|
||||
{
|
||||
totalPosition = vec4(pos, 1.0);
|
||||
break;
|
||||
}
|
||||
totalPosition += finalBonesMatrices[boneIds[i]] * vec4(pos, 1.0) * weights[i];
|
||||
}
|
||||
gl_Position = lightSpaceMatrix * modl * totalPosition;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#version 330 core
|
||||
|
||||
void main()
|
||||
{
|
||||
//gl_FragDepth = gl_FragCoord.z;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
|
||||
in vec3 TexCoords;
|
||||
|
||||
uniform samplerCube skybox;
|
||||
|
||||
void main()
|
||||
{
|
||||
float gamma = 2.2;
|
||||
FragColor = vec4(pow(texture(skybox, TexCoords).rgb, vec3(gamma)),1.0f);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#version 330 core
|
||||
layout (location = 0) in vec3 aPos;
|
||||
|
||||
out vec3 TexCoords;
|
||||
|
||||
uniform mat4 proj;
|
||||
uniform mat4 view;
|
||||
|
||||
void main()
|
||||
{
|
||||
TexCoords = aPos;
|
||||
vec4 pos = proj * view * vec4(aPos, 1.0);
|
||||
//gl_Position = pos.xyww
|
||||
gl_Position = pos;
|
||||
}
|
||||
Reference in New Issue
Block a user