summaryrefslogtreecommitdiff
path: root/src/render/shaders
diff options
context:
space:
mode:
authorDarksome <dev@darkso.me>2022-07-21 19:18:03 +0300
committerDarksome <dev@darkso.me>2022-07-21 19:18:03 +0300
commiteb8a1939e6dddaaf81f6b623d1c657b801978487 (patch)
treed62d4ca30d4114fe2e2745e36907b65ac4be20af /src/render/shaders
parent68cfc1a496f556f360c032651b75d33ddb576517 (diff)
parent7f660fed0d4a8133ccde21c3e092dbc8c6e08c60 (diff)
Merge upstream
Diffstat (limited to 'src/render/shaders')
-rw-r--r--src/render/shaders/Textures.hpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp
index d01e7775..13cdc92a 100644
--- a/src/render/shaders/Textures.hpp
+++ b/src/render/shaders/Textures.hpp
@@ -34,8 +34,7 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
distances = distances / 4.0;
- gl_FragColor = )#" + colorVarName + R"#( * distances;
- return;
+ )#" + colorVarName + R"#( = )#" + colorVarName + R"#( * distances;
}
}
} else if (pixCoord[1] > bottomRight[1]) {
@@ -66,8 +65,7 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
distances = distances / 4.0;
- gl_FragColor = )#" + colorVarName + R"#( * distances;
- return;
+ )#" + colorVarName + R"#( = )#" + colorVarName + R"#( * distances;
}
}
}
@@ -102,8 +100,7 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
distances = distances / 4.0;
- gl_FragColor = )#" + colorVarName + R"#( * distances;
- return;
+ )#" + colorVarName + R"#( = )#" + colorVarName + R"#( * distances;
}
}
} else if (pixCoord[1] > bottomRight[1]) {
@@ -134,8 +131,7 @@ inline static constexpr auto ROUNDED_SHADER_FUNC = [](const std::string colorVar
distances = distances / 4.0;
- gl_FragColor = )#" + colorVarName + R"#( * distances;
- return;
+ )#" + colorVarName + R"#( = )#" + colorVarName + R"#( * distances;
}
}
}
@@ -176,11 +172,13 @@ void main() {
return;
}
+ vec4 pixColor = v_color;
+
vec2 pixCoord = fullSize * v_texcoord;
- )#" + ROUNDED_SHADER_FUNC("v_color") + R"#(
+ )#" + ROUNDED_SHADER_FUNC("pixColor") + R"#(
- gl_FragColor = v_color;
+ gl_FragColor = pixColor;
})#";
inline const std::string TEXVERTSRC = R"#(