Improve compatibility with GLES back-end
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
// from https://github.com/kosua20/Rendu/blob/master/resources/common/shaders/screens/convolution-pyramid/downscale.frag
|
||||
|
||||
#version 330
|
||||
|
||||
in vec2 v_texCoord0;
|
||||
|
||||
uniform vec2 targetSize;
|
||||
@@ -43,7 +40,8 @@ void main(){
|
||||
continue;
|
||||
//accum = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
}
|
||||
accum += h1[dx+2] * h1[dy+2] * texelFetch(tex0, newPix,0);
|
||||
accum += h1[dx+2] * h1[dy+2] * texelFetch(tex0, newPix,0
|
||||
);
|
||||
}
|
||||
}
|
||||
o_output = accum;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// from https://github.com/kosua20/Rendu/blob/master/resources/common/shaders/screens/convolution-pyramid/fill-boundary.frag
|
||||
|
||||
#version 330
|
||||
|
||||
in vec2 v_texCoord0;
|
||||
uniform sampler2D tex0;
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// from https://github.com/kosua20/Rendu/blob/master/resources/common/shaders/screens/convolution-pyramid/fill-combine.frag
|
||||
|
||||
#version 330
|
||||
|
||||
in vec2 v_texCoord0;
|
||||
|
||||
uniform sampler2D tex0; // result of pyramid convolution
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// from https://github.com/kosua20/Rendu/blob/master/resources/common/shaders/screens/convolution-pyramid/filter.frag
|
||||
|
||||
#version 330
|
||||
|
||||
//layout(binding = 0) uniform sampler2D screenTexture; ///< Level to filter.
|
||||
|
||||
uniform sampler2D tex0;
|
||||
@@ -24,7 +22,7 @@ void main(){
|
||||
vec4 accum = vec4(0.0);
|
||||
ivec2 size = textureSize(tex0, 0).xy;
|
||||
|
||||
ivec2 coords = ivec2(v_texCoord0 * size);
|
||||
ivec2 coords = ivec2(v_texCoord0 * vec2(size));
|
||||
|
||||
for(int dy = -1; dy <=1; dy++){
|
||||
for(int dx = -1; dx <=1; dx++){
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
// from https://github.com/kosua20/Rendu/blob/master/resources/common/shaders/screens/convolution-pyramid/upscale.frag
|
||||
|
||||
#version 330
|
||||
|
||||
in vec2 v_texCoord0;
|
||||
|
||||
uniform sampler2D tex0; ///< Current h1 filtered level.
|
||||
@@ -27,7 +25,7 @@ bool isOutside(ivec2 pos, ivec2 size){
|
||||
void main(){
|
||||
vec4 accum = vec4(0.0);
|
||||
ivec2 size = textureSize(tex0, 0).xy;
|
||||
ivec2 coords = ivec2(v_texCoord0 * size);
|
||||
ivec2 coords = ivec2(v_texCoord0 * vec2(size));
|
||||
|
||||
for(int dy = -1; dy <=1; dy++){
|
||||
for(int dx = -1; dx <=1; dx++){
|
||||
|
||||
Reference in New Issue
Block a user