summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-14 13:12:37 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-14 15:24:55 +0300
commitd83cfbeab41795b80444b960b0b604f430d56337 (patch)
treef52b25a4878416a3bd8e68906d2692dad217c91e /data
parent74b3c95070d60a19450b04780a99f4fb7a6fb2f8 (diff)
downloadmv-d83cfbeab41795b80444b960b0b604f430d56337.tar.gz
mv-d83cfbeab41795b80444b960b0b604f430d56337.tar.bz2
mv-d83cfbeab41795b80444b960b0b604f430d56337.tar.xz
mv-d83cfbeab41795b80444b960b0b604f430d56337.zip
Switch modernopengl from float into int buffers.
Diffstat (limited to 'data')
-rw-r--r--data/graphics/shaders/simple_frag.glsl7
-rw-r--r--data/graphics/shaders/simple_vertex.glsl2
2 files changed, 6 insertions, 3 deletions
diff --git a/data/graphics/shaders/simple_frag.glsl b/data/graphics/shaders/simple_frag.glsl
index 45c1ddd73..7a68c364c 100644
--- a/data/graphics/shaders/simple_frag.glsl
+++ b/data/graphics/shaders/simple_frag.glsl
@@ -8,9 +8,12 @@ uniform float alpha;
void main()
{
- outColor = texture(tex, Texcoord);
if (drawType >= 0.1)
- outColor = texture(tex, Texcoord) * vec4(1.0, 1.0, 1.0, alpha);
+ {
+ outColor = texelFetch(tex, ivec2(Texcoord.x, Texcoord.y), 0) * vec4(1.0, 1.0, 1.0, alpha);
+ }
else
+ {
outColor = color;
+ }
}
diff --git a/data/graphics/shaders/simple_vertex.glsl b/data/graphics/shaders/simple_vertex.glsl
index a10a39b13..646e72358 100644
--- a/data/graphics/shaders/simple_vertex.glsl
+++ b/data/graphics/shaders/simple_vertex.glsl
@@ -1,5 +1,5 @@
#version 150 core
-in vec4 position;
+in ivec4 position;
out vec2 Texcoord;
uniform vec2 screen;
void main()