+ Bloom effect + PixelInformation + Many Summaries + Add-methods for CVectors + Exposure-Field in GenericCamera for HDR. ~ ColorAttachments now can have PixelInformation ~ Transformed MeshAttributes to a own class ~ Fixed the non-applying of transformations at texts ~ Added more information to the context ~ Improved Pipeline-Process. ~ Changed how Uniform takes arrays - Light system
21 lines
No EOL
381 B
GLSL
21 lines
No EOL
381 B
GLSL
#version 330
|
|
|
|
in vec2 vTexture;
|
|
|
|
uniform sampler2D renderedTexture;
|
|
uniform sampler2D Bloom;
|
|
|
|
uniform float Exposure;
|
|
uniform bool HDR;
|
|
|
|
layout(location = 0) out vec4 color;
|
|
|
|
void main() {
|
|
vec3 result = texture(Bloom, vTexture).rgb;
|
|
if (!HDR) {
|
|
result = vec3(1.0) - exp(-result * Exposure);
|
|
}
|
|
result += texture(renderedTexture, vTexture).rgb;
|
|
|
|
color = vec4(result, 1);
|
|
} |