Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 330
- in vec2 texCoord0;
- uniform sampler2D texture0;
- uniform sampler2D texture1;
- uniform float exposure;
- out vec4 outColor;
- void main()
- {
- //const float gamma = 2.2;
- vec3 originalColor = texture(texture0, texCoord0).rgb;
- vec3 blurColor = texture(texture1, texCoord0).rgb;
- // blend both together additively
- vec3 bloomColor = originalColor + blurColor;
- // tone mapping
- //vec3 toneMapping = vec3(1.0) - exp(-bloomColor * exposure);
- // gamma correction
- //toneMapping = pow(toneMapping, vec3(1.0 / gamma));
- outColor = vec4(bloomColor, 1.0);
- //outColor += vec4(toneMapping, 1.0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement