Rearranging the shaders and scripts to hopefully make the project easier to work on

This commit is contained in:
Rezmason
2021-10-29 09:27:28 -07:00
parent dd4fe3cac6
commit 94f5f1e5ec
21 changed files with 12 additions and 12 deletions

View File

@@ -0,0 +1,14 @@
precision mediump float;
uniform sampler2D tex;
uniform sampler2D bloomTex;
uniform sampler2D backgroundTex;
varying vec2 vUV;
void main() {
vec3 bgColor = texture2D(backgroundTex, vUV).rgb;
// Combine the texture and bloom, then blow it out to reveal more of the image
float brightness = pow(min(1., texture2D(tex, vUV).r * 2.) + texture2D(bloomTex, vUV).r, 1.5);
gl_FragColor = vec4(bgColor * brightness, 1.0);
}