From d6e99a696aa582b81018078b68f6600c8030d643 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 7 Nov 2023 02:51:42 +0000 Subject: WIP typedefing all the things - headers --- gfx/gl/sceneRenderer.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gfx/gl/sceneRenderer.h') diff --git a/gfx/gl/sceneRenderer.h b/gfx/gl/sceneRenderer.h index 55df84d..87f474b 100644 --- a/gfx/gl/sceneRenderer.h +++ b/gfx/gl/sceneRenderer.h @@ -11,18 +11,18 @@ class SceneRenderer { public: - explicit SceneRenderer(glm::ivec2 size, GLuint output); + explicit SceneRenderer(ScreenAbsCoord size, GLuint output); void render(const SceneProvider &) const; - void setAmbientLight(const glm::vec3 & colour) const; - void setDirectionalLight(const glm::vec3 & colour, const glm::vec3 & direction, const SceneProvider &) const; + void setAmbientLight(const RGB & colour) const; + void setDirectionalLight(const RGB & colour, const Direction3D & direction, const SceneProvider &) const; Camera camera; private: void renderQuad() const; - glm::ivec2 size; + ScreenAbsCoord size; GLuint output; glFrameBuffer gBuffer; glTexture gPosition, gNormal, gAlbedoSpec, gIllumination; @@ -39,7 +39,7 @@ private: DirectionalLightProgram(); using Program::use; - void setDirectionalLight(const glm::vec3 &, const glm::vec3 &, const std::span, + void setDirectionalLight(const RGB &, const Direction3D &, const std::span, const std::span, std::size_t maps) const; private: -- cgit v1.2.3 From d771fbda2c171cfbc36cc0eb3122c1a02ffbb081 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 9 Nov 2023 01:57:27 +0000 Subject: WIP typedefing just about everything else --- gfx/gl/sceneRenderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gfx/gl/sceneRenderer.h') diff --git a/gfx/gl/sceneRenderer.h b/gfx/gl/sceneRenderer.h index 87f474b..30fd8d3 100644 --- a/gfx/gl/sceneRenderer.h +++ b/gfx/gl/sceneRenderer.h @@ -40,7 +40,7 @@ private: using Program::use; void setDirectionalLight(const RGB &, const Direction3D &, const std::span, - const std::span, std::size_t maps) const; + const std::span, std::size_t maps) const; private: RequiredUniformLocation directionLoc, colourLoc, lightViewProjectionLoc, lightViewProjectionCountLoc, -- cgit v1.2.3 From e4b85a5f84f73548def2162fc534625470404df1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 13 Dec 2023 01:46:36 +0000 Subject: Basic support for saving intermediate render buffers --- gfx/gl/sceneRenderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gfx/gl/sceneRenderer.h') diff --git a/gfx/gl/sceneRenderer.h b/gfx/gl/sceneRenderer.h index 30fd8d3..7f72d76 100644 --- a/gfx/gl/sceneRenderer.h +++ b/gfx/gl/sceneRenderer.h @@ -19,7 +19,7 @@ public: Camera camera; -private: +protected: void renderQuad() const; ScreenAbsCoord size; -- cgit v1.2.3 From 467ef27cafa072bac1c9df633a99e33c0bbf0299 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 17 Dec 2023 12:13:19 +0000 Subject: Use a separate framebuffer for illumination phase --- gfx/gl/sceneRenderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gfx/gl/sceneRenderer.h') diff --git a/gfx/gl/sceneRenderer.h b/gfx/gl/sceneRenderer.h index 7f72d76..c935f93 100644 --- a/gfx/gl/sceneRenderer.h +++ b/gfx/gl/sceneRenderer.h @@ -24,7 +24,7 @@ protected: ScreenAbsCoord size; GLuint output; - glFrameBuffer gBuffer; + glFrameBuffer gBuffer, gBufferIll; glTexture gPosition, gNormal, gAlbedoSpec, gIllumination; glRenderBuffer depth; -- cgit v1.2.3 From edb63bcb5fd140d0d4db71e170a43f767a4b70be Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 17 Dec 2023 18:58:53 +0000 Subject: Run shadow mapper in camera relative space --- gfx/gl/sceneRenderer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gfx/gl/sceneRenderer.h') diff --git a/gfx/gl/sceneRenderer.h b/gfx/gl/sceneRenderer.h index c935f93..797ecf1 100644 --- a/gfx/gl/sceneRenderer.h +++ b/gfx/gl/sceneRenderer.h @@ -39,12 +39,12 @@ protected: DirectionalLightProgram(); using Program::use; - void setDirectionalLight(const RGB &, const Direction3D &, const std::span, - const std::span, std::size_t maps) const; + void setDirectionalLight(const RGB &, const Direction3D &, const GlobalPosition3D &, + const std::span, const std::span, std::size_t maps) const; private: - RequiredUniformLocation directionLoc, colourLoc, lightViewProjectionLoc, lightViewProjectionCountLoc, - lightViewShadowMapRegionLoc; + RequiredUniformLocation directionLoc, colourLoc, lightPointLoc, lightViewProjectionLoc, + lightViewProjectionCountLoc, lightViewShadowMapRegionLoc; }; DeferredLightProgram lighting; -- cgit v1.2.3