aboutsummaryrefslogtreecommitdiff
path: root/src/Engine/Engine.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2025-08-22 04:48:42 +0200
committerhachem <im@hachem.wtf>2025-08-22 04:48:42 +0200
commitb9c20fccac64e7aadd28ea6c621c4ffda2561c54 (patch)
treec0efeabd28e53d136f253fa5a7bab19c0fb765f6 /src/Engine/Engine.h
parentf469a1d1e8413e07f3e3033e719161ffd17fe463 (diff)
[add]: add bloom and blur
Diffstat (limited to 'src/Engine/Engine.h')
-rw-r--r--src/Engine/Engine.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Engine/Engine.h b/src/Engine/Engine.h
index a0b25b5..83f0b19 100644
--- a/src/Engine/Engine.h
+++ b/src/Engine/Engine.h
@@ -66,6 +66,7 @@ namespace Donut
~Engine() = default;
void DrawFullScreenQuad();
+ void DrawBlurPass();
void DispatchCompute(const Camera& cam);
void UploadCameraUBO(const Camera& cam);
void UploadObjectsUBO(const std::vector<ObjectData>& objs);
@@ -109,6 +110,12 @@ namespace Donut
float GetRotationSpeed() const { return m_RotationSpeed; }
void SetRotationSpeed(float speed) { m_RotationSpeed = speed; }
+ float GetBlurStrength() const { return m_BlurStrength; }
+ void SetBlurStrength(float strength) { m_BlurStrength = strength; }
+
+ float GetGlowIntensity() const { return m_GlowIntensity; }
+ void SetGlowIntensity(float intensity) { m_GlowIntensity = intensity; }
+
void LoadObjectsFromScene(const std::vector<Donut::Object>& objects);
void ExportHighResFrame(const std::string& filename, int width = 4096, int height = 3072);
void PrintObjectInfo() const;
@@ -120,6 +127,7 @@ namespace Donut
Ref<Texture2D> m_Texture;
Ref<Shader> m_ShaderProgram;
Ref<Shader> m_ComputeProgram;
+ Ref<Shader> m_BlurShader;
Ref<UniformBuffer> m_CameraUBO;
Ref<UniformBuffer> m_DiskUBO;
Ref<UniformBuffer> m_ObjectsUBO;
@@ -145,7 +153,9 @@ namespace Donut
float m_EarlyExitDistance = 5e11f;
float m_DiskThickness = 0.1;
- float m_DiskDensity = 1.2f;
+ float m_DiskDensity = 0.1f;
float m_RotationSpeed = 1.0f;
+ float m_BlurStrength = 2.0f;
+ float m_GlowIntensity = 0.1f;
};
};