mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
Merge branch 'master' of https://github.com/JoeyDeVries/LearnOpenGL
This commit is contained in:
@@ -27,14 +27,14 @@ void main()
|
|||||||
-1, -1, -1
|
-1, -1, -1
|
||||||
);
|
);
|
||||||
|
|
||||||
vec3 sample[9];
|
vec3 sampleTex[9];
|
||||||
for(int i = 0; i < 9; i++)
|
for(int i = 0; i < 9; i++)
|
||||||
{
|
{
|
||||||
sample[i] = vec3(texture(screenTexture, TexCoords.st + offsets[i]));
|
sampleTex[i] = vec3(texture(screenTexture, TexCoords.st + offsets[i]));
|
||||||
}
|
}
|
||||||
vec3 col;
|
vec3 col;
|
||||||
for(int i = 0; i < 9; i++)
|
for(int i = 0; i < 9; i++)
|
||||||
col += sample[i] * kernel[i];
|
col += sampleTex[i] * kernel[i];
|
||||||
|
|
||||||
color = vec4(col, 1.0);
|
color = vec4(col, 1.0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user