SHARE
TWEET

Untitled

a guest Apr 10th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #version 330
  2.  
  3. in vec2 texCoord0;
  4.  
  5. uniform sampler2D texture0;
  6. uniform sampler2D texture1;
  7. uniform float exposure;
  8.  
  9. out vec4 outColor;
  10.  
  11. void main()
  12. {            
  13.     //const float gamma = 2.2;
  14.     vec3 originalColor = texture(texture0, texCoord0).rgb;      
  15.     vec3 blurColor = texture(texture1, texCoord0).rgb;
  16.  
  17.     // blend both together additively
  18.     vec3 bloomColor = originalColor + blurColor;
  19.  
  20.     // tone mapping
  21.     //vec3 toneMapping = vec3(1.0) - exp(-bloomColor * exposure);
  22.  
  23.     // gamma correction      
  24.     //toneMapping = pow(toneMapping, vec3(1.0 / gamma));
  25.     outColor = vec4(bloomColor, 1.0);
  26.     //outColor += vec4(toneMapping, 1.0);
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top