Skip to content

Instantly share code, notes, and snippets.

@dlannan
dlannan / pbr.glsl
Created August 15, 2023 02:45 — forked from galek/pbr.glsl
PBR GLSL SHADER
in vec2 v_texcoord; // texture coords
in vec3 v_normal; // normal
in vec3 v_binormal; // binormal (for TBN basis calc)
in vec3 v_pos; // pixel view space position
out vec4 color;
layout(std140) uniform Transforms
{
mat4x4 world_matrix; // object's world position