Use uvec2 instead of sampler2D
This commit is contained in:
parent
ae18730c92
commit
99b110cc99
@ -2,14 +2,14 @@ layout(triangles) in;
|
|||||||
layout(triangle_strip, max_vertices=3) out;
|
layout(triangle_strip, max_vertices=3) out;
|
||||||
|
|
||||||
#ifdef GL_ARB_bindless_texture
|
#ifdef GL_ARB_bindless_texture
|
||||||
flat in sampler2D hdle[3];
|
flat in uvec2 hdle[3];
|
||||||
#endif
|
#endif
|
||||||
in vec2 tc[3];
|
in vec2 tc[3];
|
||||||
in int layerId[3];
|
in int layerId[3];
|
||||||
|
|
||||||
out vec2 uv;
|
out vec2 uv;
|
||||||
#ifdef GL_ARB_bindless_texture
|
#ifdef GL_ARB_bindless_texture
|
||||||
out flat sampler2D handle;
|
out flat uvec2 handle;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
|
@ -3,7 +3,7 @@ uniform sampler2D tex;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GL_ARB_bindless_texture
|
#ifdef GL_ARB_bindless_texture
|
||||||
flat in sampler2D handle;
|
flat in uvec2 handle;
|
||||||
#endif
|
#endif
|
||||||
in vec2 uv;
|
in vec2 uv;
|
||||||
in vec4 color;
|
in vec4 color;
|
||||||
@ -12,7 +12,7 @@ out vec4 FragColor;
|
|||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
#ifdef GL_ARB_bindless_texture
|
#ifdef GL_ARB_bindless_texture
|
||||||
vec4 col = texture(handle, uv);
|
vec4 col = texture(sampler2D(handle), uv);
|
||||||
#else
|
#else
|
||||||
vec4 col = texture(tex, uv);
|
vec4 col = texture(tex, uv);
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,7 +10,7 @@ layout(location = 7) in vec3 Origin;
|
|||||||
layout(location = 8) in vec3 Orientation;
|
layout(location = 8) in vec3 Orientation;
|
||||||
layout(location = 9) in vec3 Scale;
|
layout(location = 9) in vec3 Scale;
|
||||||
#ifdef GL_ARB_bindless_texture
|
#ifdef GL_ARB_bindless_texture
|
||||||
layout(location = 10) in sampler2D Handle;
|
layout(location = 10) in uvec2 Handle;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@ -26,13 +26,13 @@ in vec3 Scale;
|
|||||||
#ifdef VSLayer
|
#ifdef VSLayer
|
||||||
out vec2 uv;
|
out vec2 uv;
|
||||||
#ifdef GL_ARB_bindless_texture
|
#ifdef GL_ARB_bindless_texture
|
||||||
flat out sampler2D handle;
|
flat out uvec2 handle;
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
out vec2 tc;
|
out vec2 tc;
|
||||||
out int layerId;
|
out int layerId;
|
||||||
#ifdef GL_ARB_bindless_texture
|
#ifdef GL_ARB_bindless_texture
|
||||||
flat out sampler2D hdle;
|
flat out uvec2 hdle;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ layout(location = 7) in vec3 Origin;
|
|||||||
layout(location = 8) in vec3 Orientation;
|
layout(location = 8) in vec3 Orientation;
|
||||||
layout(location = 9) in vec3 Scale;
|
layout(location = 9) in vec3 Scale;
|
||||||
#ifdef GL_ARB_bindless_texture
|
#ifdef GL_ARB_bindless_texture
|
||||||
layout(location = 10) in sampler2D Handle;
|
layout(location = 10) in uvec2 Handle;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@ -23,13 +23,13 @@ in vec3 Scale;
|
|||||||
#ifdef VSLayer
|
#ifdef VSLayer
|
||||||
out vec2 uv;
|
out vec2 uv;
|
||||||
#ifdef GL_ARB_bindless_texture
|
#ifdef GL_ARB_bindless_texture
|
||||||
flat out sampler2D handle;
|
flat out uvec2 handle;
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
out vec2 tc;
|
out vec2 tc;
|
||||||
out int layerId;
|
out int layerId;
|
||||||
#ifdef GL_ARB_bindless_texture
|
#ifdef GL_ARB_bindless_texture
|
||||||
flat out sampler2D hdle;
|
flat out uvec2 hdle;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user