Advertisement
Guest User

Untitled

a guest
Apr 10th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement