Re-organising shaders

This commit is contained in:
Emmanuel BENOîT 2017-10-04 18:40:15 +02:00
parent d64e9f9a2e
commit b75cee8638
7 changed files with 82 additions and 65 deletions
shaders/unused

20
shaders/unused/copy.glsl Normal file
View file

@ -0,0 +1,20 @@
#version 450 core
layout( location = 0 ) uniform sampler2D u_InputTexture;
layout( location = 1 ) uniform int u_LOD;
layout( location = 0 ) out vec4 color;
void main( void )
{
#if 1
vec2 ts = textureSize( u_InputTexture , u_LOD );
vec2 tmp = gl_FragCoord.xy / vec2( 1280. , 720. );
ivec2 pos = ivec2( ts * tmp );
color = texelFetch( u_InputTexture , pos , u_LOD );
#else
vec2 tmp = gl_FragCoord.xy / vec2( 1280. , 720. );
color = textureLod( u_InputTexture , tmp , float( u_LOD ) );
#endif
}