Use uvec2 instead of sampler2D

This commit is contained in:
Vincent Lejeune 2014-08-29 01:26:27 +02:00
parent ae18730c92
commit 99b110cc99
4 changed files with 10 additions and 10 deletions

View File

@ -2,14 +2,14 @@ layout(triangles) in;
layout(triangle_strip, max_vertices=3) out;
#ifdef GL_ARB_bindless_texture
flat in sampler2D hdle[3];
flat in uvec2 hdle[3];
#endif
in vec2 tc[3];
in int layerId[3];
out vec2 uv;
#ifdef GL_ARB_bindless_texture
out flat sampler2D handle;
out flat uvec2 handle;
#endif
void main(void)

View File

@ -3,7 +3,7 @@ uniform sampler2D tex;
#endif
#ifdef GL_ARB_bindless_texture
flat in sampler2D handle;
flat in uvec2 handle;
#endif
in vec2 uv;
in vec4 color;
@ -12,7 +12,7 @@ out vec4 FragColor;
void main(void)
{
#ifdef GL_ARB_bindless_texture
vec4 col = texture(handle, uv);
vec4 col = texture(sampler2D(handle), uv);
#else
vec4 col = texture(tex, uv);
#endif

View File

@ -10,7 +10,7 @@ layout(location = 7) in vec3 Origin;
layout(location = 8) in vec3 Orientation;
layout(location = 9) in vec3 Scale;
#ifdef GL_ARB_bindless_texture
layout(location = 10) in sampler2D Handle;
layout(location = 10) in uvec2 Handle;
#endif
#else
@ -26,13 +26,13 @@ in vec3 Scale;
#ifdef VSLayer
out vec2 uv;
#ifdef GL_ARB_bindless_texture
flat out sampler2D handle;
flat out uvec2 handle;
#endif
#else
out vec2 tc;
out int layerId;
#ifdef GL_ARB_bindless_texture
flat out sampler2D hdle;
flat out uvec2 hdle;
#endif
#endif

View File

@ -8,7 +8,7 @@ layout(location = 7) in vec3 Origin;
layout(location = 8) in vec3 Orientation;
layout(location = 9) in vec3 Scale;
#ifdef GL_ARB_bindless_texture
layout(location = 10) in sampler2D Handle;
layout(location = 10) in uvec2 Handle;
#endif
#else
@ -23,13 +23,13 @@ in vec3 Scale;
#ifdef VSLayer
out vec2 uv;
#ifdef GL_ARB_bindless_texture
flat out sampler2D handle;
flat out uvec2 handle;
#endif
#else
out vec2 tc;
out int layerId;
#ifdef GL_ARB_bindless_texture
flat out sampler2D hdle;
flat out uvec2 hdle;
#endif
#endif