mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
Merge pull request #8 from zwookie/master
sample keyword is reserved in OpenGL 4.2+
This commit is contained in:
@@ -27,14 +27,14 @@ void main()
|
||||
-1, -1, -1
|
||||
);
|
||||
|
||||
vec3 sample[9];
|
||||
vec3 sampleTex[9];
|
||||
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;
|
||||
for(int i = 0; i < 9; i++)
|
||||
col += sample[i] * kernel[i];
|
||||
col += sampleTex[i] * kernel[i];
|
||||
|
||||
color = vec4(col, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user