From 791b3f354b378769bffe623b05f1305c91b77101 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 3 Jun 2022 23:30:01 -0700 Subject: Changeset: 64 [WIP] Rename directories --- .../.stationary/Shaders/Default.glsl | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 ProjectBrusselAssets/.stationary/Shaders/Default.glsl (limited to 'ProjectBrusselAssets/.stationary/Shaders/Default.glsl') diff --git a/ProjectBrusselAssets/.stationary/Shaders/Default.glsl b/ProjectBrusselAssets/.stationary/Shaders/Default.glsl new file mode 100644 index 0000000..1d93471 --- /dev/null +++ b/ProjectBrusselAssets/.stationary/Shaders/Default.glsl @@ -0,0 +1,38 @@ +#type vertex +#version 330 core + +layout(location = 0) in vec3 pos; +layout(location = 1) in vec4 color; +layout(location = 2) in vec2 texcoord; + +out Vertex2Fragmnet { + vec4 color; + vec2 texcoord; +} v2f; + +// Autofill uniforms +uniform mat4 transformation; + +void main() { + gl_Position = transformation * vec4(pos, 1.0); + v2f.color = color; + v2f.texcoord = texcoord; +} + +#type fragment +#version 330 core + +in Vertex2Fragmnet { + vec4 color; + vec2 texcoord; +} v2f; + +out vec4 fragColor; + +// Material uniforms +uniform sampler2D textureAtlas; +uniform vec4 taint; + +void main() { + fragColor = texture(textureAtlas, v2f.texcoord) * v2f.color * taint; +} -- cgit v1.2.3-70-g09d2