Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/application
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-07-07 07:32:06 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-07-07 07:32:06 +1000
commitbc2e805d01d385d7171cc810425ffbe38bcc5179 (patch)
tree1fab980c21cd08ae782a7290b3845ebf58268370 /source/application
parentd313a3ceb35e167c1f47399ec5c787f94140a5b1 (diff)
Bump shader versions
#78
Diffstat (limited to 'source/application')
-rw-r--r--source/application/StarRenderer_opengl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/application/StarRenderer_opengl.cpp b/source/application/StarRenderer_opengl.cpp
index 411bfa5..2e1c47d 100644
--- a/source/application/StarRenderer_opengl.cpp
+++ b/source/application/StarRenderer_opengl.cpp
@@ -8,7 +8,7 @@ namespace Star {
size_t const MultiTextureCount = 4;
char const* DefaultVertexShader = R"SHADER(
-#version 130
+#version 140
uniform vec2 textureSize0;
uniform vec2 textureSize1;
@@ -49,7 +49,7 @@ void main() {
)SHADER";
char const* DefaultFragmentShader = R"SHADER(
-#version 130
+#version 140
uniform sampler2D texture0;
uniform sampler2D texture1;
@@ -65,13 +65,13 @@ out vec4 outColor;
void main() {
vec4 texColor;
if (fragmentTextureIndex == 3)
- texColor = texture2D(texture3, fragmentTextureCoordinate);
+ texColor = texture(texture3, fragmentTextureCoordinate);
else if (fragmentTextureIndex == 2)
- texColor = texture2D(texture2, fragmentTextureCoordinate);
+ texColor = texture(texture2, fragmentTextureCoordinate);
else if (fragmentTextureIndex == 1)
- texColor = texture2D(texture1, fragmentTextureCoordinate);
+ texColor = texture(texture1, fragmentTextureCoordinate);
else
- texColor = texture2D(texture0, fragmentTextureCoordinate);
+ texColor = texture(texture0, fragmentTextureCoordinate);
if (texColor.a <= 0.0)
discard;