NUGET-Changes:
+ Materials now have a method to draw. That should allow more freedom on how materials can have a effect on the resulting shader.

~ PostProcessEffect.Draw now needs a source ColorAttachment.
~ Added some missing summaries

GIT-/SOLUTION-Changes:
Remade the folder structure, to something more senseable.
This commit is contained in:
Michel Fedde 2021-05-14 21:38:50 +02:00
parent db7f01dca1
commit 89de4258e1
181 changed files with 584 additions and 698 deletions

View file

@ -1,30 +0,0 @@
#version 330
in vec2 vTexture;
in vec2 TransformedTexture;
uniform sampler2D Scene;
uniform sampler2D Bloom;
uniform float MinAmount;
uniform float MaxAmount;
uniform sampler2D AmountMap;
uniform bool HasAmountMap;
uniform float Exposure;
uniform bool HDR;
layout(location = 0) out vec4 color;
void main() {
vec3 result = texture(Bloom, vTexture).rgb;
if (HasAmountMap) result *= clamp(length(texture(AmountMap, TransformedTexture).rgb) * (MaxAmount - MinAmount) + MinAmount, 0, 1);
if (!HDR) {
result = vec3(1.0) - exp(-result * Exposure);
}
result = texture(Scene, vTexture).rgb + result;
color = vec4(result, 1);
}