summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-15 00:08:20 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-15 00:08:20 +0100
commit48ec3a869029bad34773516df193519a4fe9103a (patch)
tree9539b9a849a2bf5dbb7c407b754d7fae2fcbcfd7
parentMerge branch 'assimp' (diff)
downloadilt-48ec3a869029bad34773516df193519a4fe9103a.tar.bz2
ilt-48ec3a869029bad34773516df193519a4fe9103a.tar.xz
ilt-48ec3a869029bad34773516df193519a4fe9103a.zip
Rename lots of shader files
Names and paths still not perfect, but better and the weird name missuse is gone
-rw-r--r--gfx/gl/sceneRenderer.cpp8
-rw-r--r--gfx/gl/sceneShader.cpp21
-rw-r--r--gfx/gl/shaders/dynamicPoint.vs (renamed from gfx/gl/shaders/basicShader.vs)0
-rw-r--r--gfx/gl/shaders/fixedPoint.vs (renamed from gfx/gl/shaders/landmassShader.vs)0
-rw-r--r--gfx/gl/shaders/landmass.fs (renamed from gfx/gl/shaders/landmassShader.fs)2
-rw-r--r--gfx/gl/shaders/lighting.fs (renamed from gfx/gl/shaders/lightingShader.fs)0
-rw-r--r--gfx/gl/shaders/lighting.vs (renamed from gfx/gl/shaders/lightingShader.vs)0
-rw-r--r--gfx/gl/shaders/material.fs (renamed from gfx/gl/shaders/basicShader.fs)2
-rw-r--r--gfx/gl/shaders/materialOut.glsl (renamed from gfx/gl/shaders/geometryOut.glsl)0
-rw-r--r--gfx/gl/shaders/water.fs (renamed from gfx/gl/shaders/waterShader.fs)2
-rw-r--r--gfx/gl/shaders/water.vs (renamed from gfx/gl/shaders/waterShader.vs)0
11 files changed, 16 insertions, 19 deletions
diff --git a/gfx/gl/sceneRenderer.cpp b/gfx/gl/sceneRenderer.cpp
index 31b01ff..873dc5b 100644
--- a/gfx/gl/sceneRenderer.cpp
+++ b/gfx/gl/sceneRenderer.cpp
@@ -2,8 +2,8 @@
#include "maths.h"
#include "vertexArrayObject.hpp"
#include <gfx/gl/shaders/fs-directionalLight.h>
-#include <gfx/gl/shaders/fs-lightingShader.h>
-#include <gfx/gl/shaders/vs-lightingShader.h>
+#include <gfx/gl/shaders/fs-lighting.h>
+#include <gfx/gl/shaders/vs-lighting.h>
#include <glm/gtc/type_ptr.hpp>
static constexpr const std::array<const glm::i8vec4, 4> displayVAOdata {{
@@ -15,7 +15,7 @@ static constexpr const std::array<const glm::i8vec4, 4> displayVAOdata {{
}};
SceneRenderer::SceneRenderer(glm::ivec2 s, GLuint o) :
camera {{-1250.0F, -1250.0F, 35.0F}, quarter_pi, ratio(s), 0.1F, 10000.0F}, size {s}, output {o},
- lighting {lightingShader_vs, lightingShader_fs}, shadowMapper {{2048, 2048}}
+ lighting {lighting_vs, lighting_fs}, shadowMapper {{2048, 2048}}
{
shader.setViewPort({0, 0, size.x, size.y});
VertexArrayObject<glm::i8vec4>::configure(displayVAO, displayVBO, displayVAOdata);
@@ -126,7 +126,7 @@ SceneRenderer::renderQuad() const
}
SceneRenderer::DirectionalLightProgram::DirectionalLightProgram() :
- Program {lightingShader_vs, directionalLight_fs}, directionLoc {*this, "lightDirection"},
+ Program {lighting_vs, directionalLight_fs}, directionLoc {*this, "lightDirection"},
colourLoc {*this, "lightColour"}, lightViewProjectionLoc {*this, "lightViewProjection"},
lightViewProjectionCountLoc {*this, "lightViewProjectionCount"}, lightViewShadowMapRegionLoc {
*this, "shadowMapRegion"}
diff --git a/gfx/gl/sceneShader.cpp b/gfx/gl/sceneShader.cpp
index 981e7df..bcd0590 100644
--- a/gfx/gl/sceneShader.cpp
+++ b/gfx/gl/sceneShader.cpp
@@ -1,27 +1,24 @@
#include "sceneShader.h"
#include <array>
-#include <gfx/gl/shaders/fs-basicShader.h>
-#include <gfx/gl/shaders/fs-landmassShader.h>
+#include <gfx/gl/shaders/fs-landmass.h>
+#include <gfx/gl/shaders/fs-material.h>
#include <gfx/gl/shaders/fs-pointLight.h>
#include <gfx/gl/shaders/fs-spotLight.h>
-#include <gfx/gl/shaders/fs-waterShader.h>
+#include <gfx/gl/shaders/fs-water.h>
#include <gfx/gl/shaders/gs-pointLight.h>
#include <gfx/gl/shaders/gs-spotLight.h>
-#include <gfx/gl/shaders/vs-basicShader.h>
-#include <gfx/gl/shaders/vs-landmassShader.h>
+#include <gfx/gl/shaders/vs-dynamicPoint.h>
+#include <gfx/gl/shaders/vs-fixedPoint.h>
#include <gfx/gl/shaders/vs-pointLight.h>
#include <gfx/gl/shaders/vs-spotLight.h>
-#include <gfx/gl/shaders/vs-waterShader.h>
+#include <gfx/gl/shaders/vs-water.h>
#include <gfx/gl/vertexArrayObject.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/transform.hpp>
#include <location.hpp>
#include <maths.h>
-SceneShader::SceneShader() :
- landmass {landmassShader_vs, landmassShader_fs}, absolute {landmassShader_vs, basicShader_fs}
-{
-}
+SceneShader::SceneShader() : landmass {fixedPoint_vs, landmass_fs}, absolute {fixedPoint_vs, material_fs} { }
void
SceneShader::setViewProjection(const glm::mat4 & viewProjection) const
@@ -57,7 +54,7 @@ SceneShader::SceneProgram::setViewPort(const glm::ivec4 & viewPort) const
}
}
-SceneShader::BasicProgram::BasicProgram() : SceneProgram {basicShader_vs, basicShader_fs}, modelLoc {*this, "model"} { }
+SceneShader::BasicProgram::BasicProgram() : SceneProgram {dynamicPoint_vs, material_fs}, modelLoc {*this, "model"} { }
void
SceneShader::BasicProgram::setModel(Location const & location) const
@@ -73,7 +70,7 @@ SceneShader::BasicProgram::use(Location const & location) const
setModel(location);
}
-SceneShader::WaterProgram::WaterProgram() : SceneProgram {waterShader_vs, waterShader_fs}, waveLoc {*this, "waves"} { }
+SceneShader::WaterProgram::WaterProgram() : SceneProgram {water_vs, water_fs}, waveLoc {*this, "waves"} { }
void
SceneShader::WaterProgram::use(float waveCycle) const
diff --git a/gfx/gl/shaders/basicShader.vs b/gfx/gl/shaders/dynamicPoint.vs
index e1701ed..e1701ed 100644
--- a/gfx/gl/shaders/basicShader.vs
+++ b/gfx/gl/shaders/dynamicPoint.vs
diff --git a/gfx/gl/shaders/landmassShader.vs b/gfx/gl/shaders/fixedPoint.vs
index 0cc8153..0cc8153 100644
--- a/gfx/gl/shaders/landmassShader.vs
+++ b/gfx/gl/shaders/fixedPoint.vs
diff --git a/gfx/gl/shaders/landmassShader.fs b/gfx/gl/shaders/landmass.fs
index f3cc3e8..4dc92bb 100644
--- a/gfx/gl/shaders/landmassShader.fs
+++ b/gfx/gl/shaders/landmass.fs
@@ -1,7 +1,7 @@
#version 330 core
include(`materialInterface.glsl')
-include(`geometryOut.glsl')
+include(`materialOut.glsl')
uniform sampler2D texture0;
diff --git a/gfx/gl/shaders/lightingShader.fs b/gfx/gl/shaders/lighting.fs
index 4646b75..4646b75 100644
--- a/gfx/gl/shaders/lightingShader.fs
+++ b/gfx/gl/shaders/lighting.fs
diff --git a/gfx/gl/shaders/lightingShader.vs b/gfx/gl/shaders/lighting.vs
index e07cd0a..e07cd0a 100644
--- a/gfx/gl/shaders/lightingShader.vs
+++ b/gfx/gl/shaders/lighting.vs
diff --git a/gfx/gl/shaders/basicShader.fs b/gfx/gl/shaders/material.fs
index 57eaba2..cafb35d 100644
--- a/gfx/gl/shaders/basicShader.fs
+++ b/gfx/gl/shaders/material.fs
@@ -2,7 +2,7 @@
#extension GL_ARB_shading_language_420pack : enable
include(`materialInterface.glsl')
-include(`geometryOut.glsl')
+include(`materialOut.glsl')
layout(binding = 0) uniform sampler2D texture0;
layout(binding = 1) uniform usampler2DRect material;
diff --git a/gfx/gl/shaders/geometryOut.glsl b/gfx/gl/shaders/materialOut.glsl
index dc5f8e8..dc5f8e8 100644
--- a/gfx/gl/shaders/geometryOut.glsl
+++ b/gfx/gl/shaders/materialOut.glsl
diff --git a/gfx/gl/shaders/waterShader.fs b/gfx/gl/shaders/water.fs
index 5936da4..04aa94c 100644
--- a/gfx/gl/shaders/waterShader.fs
+++ b/gfx/gl/shaders/water.fs
@@ -2,7 +2,7 @@
#extension GL_ARB_shading_language_420pack : enable
include(`materialInterface.glsl')
-include(`geometryOut.glsl')
+include(`materialOut.glsl')
uniform sampler2D texture0;
uniform vec3 waves;
diff --git a/gfx/gl/shaders/waterShader.vs b/gfx/gl/shaders/water.vs
index a21b49f..a21b49f 100644
--- a/gfx/gl/shaders/waterShader.vs
+++ b/gfx/gl/shaders/water.vs