Pushed virtually all the shader source into shader files that load as assets.

This commit is contained in:
Rezmason
2021-10-20 03:20:46 -07:00
parent 39742d73f3
commit d8a1409907
17 changed files with 556 additions and 536 deletions

11
shaders/imagePass.frag Normal file
View File

@@ -0,0 +1,11 @@
precision mediump float;
uniform sampler2D tex;
uniform sampler2D bloomTex;
uniform sampler2D backgroundTex;
varying vec2 vUV;
void main() {
vec3 bgColor = texture2D(backgroundTex, vUV).rgb;
float brightness = pow(min(1., texture2D(tex, vUV).r * 2.) + texture2D(bloomTex, vUV).r, 1.5);
gl_FragColor = vec4(bgColor * brightness, 1.0);
}