From d0186d81127056ac2647807dcf05b454e234a7cb Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 11 Apr 2023 22:54:44 +0100 Subject: Move the vertex/fragment shader interface for materials into an include --- gfx/gl/shaders/materialInterface.glsl | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 gfx/gl/shaders/materialInterface.glsl (limited to 'gfx/gl/shaders/materialInterface.glsl') diff --git a/gfx/gl/shaders/materialInterface.glsl b/gfx/gl/shaders/materialInterface.glsl new file mode 100644 index 0000000..3e09c85 --- /dev/null +++ b/gfx/gl/shaders/materialInterface.glsl @@ -0,0 +1,4 @@ +ifelse(TYPE, .fs, in, out) vec3 FragPos; +ifelse(TYPE, .fs, in, out) vec2 TexCoords; +ifelse(TYPE, .fs, in, out) vec3 Normal; +ifelse(TYPE, .fs, in, out) vec4 Colour; -- cgit v1.2.3 From f16a7df6135262c91fee2a2f6c46ad2f3caa7157 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 13 Apr 2023 02:15:41 +0100 Subject: Update shaders to use material to conditionally lookup sub-texture in the atlas --- gfx/gl/shaders/materialInterface.glsl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gfx/gl/shaders/materialInterface.glsl') diff --git a/gfx/gl/shaders/materialInterface.glsl b/gfx/gl/shaders/materialInterface.glsl index 3e09c85..5735cf9 100644 --- a/gfx/gl/shaders/materialInterface.glsl +++ b/gfx/gl/shaders/materialInterface.glsl @@ -2,3 +2,6 @@ ifelse(TYPE, .fs, in, out) vec3 FragPos; ifelse(TYPE, .fs, in, out) vec2 TexCoords; ifelse(TYPE, .fs, in, out) vec3 Normal; ifelse(TYPE, .fs, in, out) vec4 Colour; +flat +ifelse(TYPE, .fs, in, out) +uint Material; -- cgit v1.2.3