Fix spelling bug in fragment shader

This commit is contained in:
noil 2021-04-18 01:08:17 -04:00
parent 9c038d7406
commit 11b1539d74
1 changed files with 3 additions and 3 deletions

View File

@ -2,14 +2,14 @@
#version 120 #version 120
// Sampler, contains the texture of the Entity FBO // Sampler, contains the texture of the Entity FBO
uniform sampler2D DiffuseSamper; uniform sampler2D DiffuseSampler;
// Contains the size of one texel // Contains the size of one texel
uniform vec2 TexelSize; uniform vec2 TexelSize;
void main() { void main() {
// Color of the texel at this fragment // Color of the texel at this fragment
vec4 centerCol = texture2D(DiffuseSamper, gl_TexCoord[0].st); vec4 centerCol = texture2D(DiffuseSampler, gl_TexCoord[0].st);
// Holds the average color (for blur/glow) // Holds the average color (for blur/glow)
vec4 colAvg = vec4(0, 0, 0, 0); vec4 colAvg = vec4(0, 0, 0, 0);
@ -17,7 +17,7 @@ void main() {
for(int xo = -7; xo < 7; xo++) { for(int xo = -7; xo < 7; xo++) {
for(int yo = -7; yo < 7; yo++) { for(int yo = -7; yo < 7; yo++) {
// Get surrounding texel color // Get surrounding texel color
vec4 currCol = texture2D(DiffuseSamper, gl_TexCoord[0].st + vec2(xo * TexelSize.x, yo * TexelSize.y)); vec4 currCol = texture2D(DiffuseSampler, gl_TexCoord[0].st + vec2(xo * TexelSize.x, yo * TexelSize.y));
// If color has been changed (!= 0), add to average color. Alpha depends on distance to center texel // If color has been changed (!= 0), add to average color. Alpha depends on distance to center texel
if(currCol.r != 0.0F || currCol.g != 0.0F || currCol.b != 0.0F) { if(currCol.r != 0.0F || currCol.g != 0.0F || currCol.b != 0.0F) {