mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
Gaussian blur
bug fixes
This commit is contained in:
+6
-2
@@ -4,7 +4,8 @@ in vec2 texCoords;
|
||||
|
||||
flat in int id;
|
||||
|
||||
out vec4 FragColor;
|
||||
layout (location=0) out vec4 FragColor;
|
||||
layout (location=1) out vec4 BrightColor;
|
||||
|
||||
uniform sampler2D tex;
|
||||
uniform vec4 color[200];
|
||||
@@ -12,6 +13,9 @@ uniform vec4 color[200];
|
||||
void main(){
|
||||
float alpha=texture(tex,texCoords).r;
|
||||
vec4 c=color[id];
|
||||
//FragColor=vec4(1,0,0,1);
|
||||
c=vec4(c.x,c.y,c.z,c.w*alpha);
|
||||
float brightness = dot(c.rgb, vec3(0.2126, 0.7152, 0.0722));
|
||||
if(brightness>1)
|
||||
BrightColor=vec4(c.rgb,1);
|
||||
FragColor=vec4(c.x,c.y,c.z,c.w*alpha);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user