merged trilinear fixes
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
#define M_PI 3.1415926535897932384626433832795
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
uniform sampler2D image;
|
||||
|
||||
//uniform float radius;
|
||||
>>>>>>> master
|
||||
uniform float sigma;
|
||||
uniform vec2 resolution;
|
||||
uniform bool horiz_blur;
|
||||
@@ -15,13 +21,13 @@ float gaussian2(float x, float y, float sigma) {
|
||||
}
|
||||
|
||||
vec4 process(vec4 col) {
|
||||
float rad = ceil(sigma);
|
||||
float rad = ceil(3.0 * sigma);
|
||||
|
||||
float sum = 0.0;
|
||||
|
||||
vec4 color = vec4(0.0);
|
||||
|
||||
bool radius_is_zero = (rad == 0.0);
|
||||
bool radius_is_zero = (rad == 0.0 || sigma == 0.0);
|
||||
|
||||
if (!radius_is_zero) {
|
||||
for (float x=-rad+0.5;x<=rad;x+=2.0) {
|
||||
|
||||
@@ -21,5 +21,6 @@ vec4 process(vec4 col) {
|
||||
tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c)));
|
||||
}
|
||||
tc += center;
|
||||
|
||||
return texture2D(texture, tc / resolution);
|
||||
}
|
||||
Reference in New Issue
Block a user