Sha256: 41594c4c5b04a08e06773067ef3cfc0b93c63cb9c2bec8fc4e62843cc933402f

Contents?: true

Size: 642 Bytes

Versions: 3

Compression:

Stored size: 642 Bytes

Contents

#version 330 core

// <vec2 position, vec2 texCoords, vec3 normal, vec3 tangent>
layout (location = 0) in vec3 vertex;
layout (location = 1) in vec2 texCoord;
layout (location = 2) in vec3 normal;
layout (location = 3) in vec3 tangent;
layout (location = 7) in mat4 model;

out vec2 TexCoord;
out vec3 Normal;
out vec3 Tangent;
out vec3 FragPos;

uniform mat4 camera;

void main()
{
    TexCoord = texCoord;
    mat3 normalMatrix = mat3(transpose(inverse(model)));
    Normal = normalMatrix * normal;
    Tangent = normalMatrix * tangent;
    FragPos = vec3(model * vec4(vertex, 1.0));
    gl_Position = camera * model * vec4(vertex, 1.0);
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_rpg-0.0.4 lib/engine/shaders/mesh_vertex.glsl
ruby_rpg-0.0.3 lib/engine/shaders/mesh_vertex.glsl
ruby_rpg-0.0.2 lib/engine/shaders/mesh_vertex.glsl