26 Sep 2021
General: + Added Summaries Renderer ------- SM.Base: + SM.Base.Controls.Mouse now has a feature to disable tracking. + Replaced Bloom Effect with the similar system how blender use it. + You can now disable ANY post processing effects. + Interpolation for CVectors. + MathUtils + RenderPipelines now have a central list for post processing effects. ~ Log-System is now ignored if a debugger is attached. ~ Post Processing Shader does now send the texel size as the "renderedTextureTexelSize"-uniform. ~ Improved Text Rendering SM.OGL: + ColorAttachments now contain a reference to the framebuffer its connected. + ColorAttachments can now have a own size. + Framebuffer.Append(string key, Vector2 size, int pos) +Framebuffers now have a method to completely reset itself. + Framebuffers now have a Blit-method called "CopyTo". ~ Framebuffer.GetCurrentlyActive() will now return an actual SM.OGL.Framebuffer-object. ~ Renderbuffers now are a class and contain the ID by itself. ~ Renamed Uniform-function to its class-name: f.E. SetBool, SetFloat instead of SetUniform1 Optionals: Controls: + Framecache for the GameController.GetState()
This commit is contained in:
parent
dffa581596
commit
9b52d401e7
61 changed files with 1529 additions and 818 deletions
30
src/renderer/SM.Base/Legacy/PostProcessing/bloom_merge.glsl
Normal file
30
src/renderer/SM.Base/Legacy/PostProcessing/bloom_merge.glsl
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue