aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/shaders/Textures.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/shaders/Textures.hpp')
-rw-r--r--src/render/shaders/Textures.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp
index e99d0a49..b203ad04 100644
--- a/src/render/shaders/Textures.hpp
+++ b/src/render/shaders/Textures.hpp
@@ -1,6 +1,8 @@
#pragma once
#include <string>
+#include <format>
+#include "SharedValues.hpp"
inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVarName) -> std::string {
return R"#(
@@ -13,7 +15,9 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
pixCoord -= fullSize * 0.5 - radius;
pixCoord += vec2(1.0, 1.0) / fullSize; // center the pix dont make it top-left
- const float SMOOTHING_CONSTANT = 0.651724; // smoothing constant for the edge: more = blurrier, but smoother
+ // smoothing constant for the edge: more = blurrier, but smoother
+ const float SMOOTHING_CONSTANT = )#" +
+ std::format("{:.7f}", SHADER_ROUNDED_SMOOTHING_FACTOR) + R"#(;
if (pixCoord.x + pixCoord.y > radius) {