Skip to content

Commit 4b042ab

Browse files
committed
update readme
1 parent a72e28d commit 4b042ab

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ See [fshader.frag](https://github.com/tranvansang/bilateral-filter/blob/master/f
1212

1313
## Note:
1414
- This project is created using Qt 5.9.1
15-
- This project requires GLSL compiler ver 4.10
16-
- Tested in window 7
17-
- Currently, cannot compile in Ubuntu because of OpenGL driver problem
15+
- This project requires GLSL compiler ver 4.50
16+
- Tested in Ubuntu
1817
- Execute `BilatteralFiltering.exe` directly in Window to run program without compiling (non tested)
1918

2019
## Screenshots:

fshader.frag

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ uniform float sigmaL;
77

88
#define EPS 1e-5
99

10-
vec4 filtering;
1110
out vec4 FragColor;
1211

1312
float lum(in vec4 color) {
@@ -29,8 +28,8 @@ void main()
2928

3029
float l = lum(texture2D(texture,v_texcoord));
3130

32-
for (float i = -halfSize; i <= halfSize; i++){
33-
for (float j = -halfSize; j <= halfSize; j++){
31+
for (float i = -halfSize; i <= halfSize; i ++){
32+
for (float j = -halfSize; j <= halfSize; j ++){
3433
vec2 pos = vec2(i, j);
3534
vec4 offsetColor = texture2D(texture, v_texcoord + pos / textureSize2);
3635

@@ -46,6 +45,5 @@ void main()
4645
}
4746
}
4847

49-
filtering = sumC/sumW;
50-
FragColor = filtering;
48+
FragColor = sumC/sumW;
5149
}

0 commit comments

Comments
 (0)