27 Sep 2021
+ Added Amount Map to the new Bloom system. ~ Moved all projects to .NetFramework 4.5.2 ~ Made sure, you can't get a higher multisampling as 8.
This commit is contained in:
parent
2c0517ca48
commit
17cbebcf6a
15 changed files with 125 additions and 21 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>SM_TEST</RootNamespace>
|
||||
<AssemblyName>SM_TEST</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using OpenTK.Graphics.OpenGL4;
|
||||
using SM.Base.Legacy.PostProcessing;
|
||||
using SM.Base.PostEffects;
|
||||
using SM.Base.Textures;
|
||||
using SM.Base.Window;
|
||||
using SM.Intergrations.ShaderTool;
|
||||
using SM.OGL.Framebuffer;
|
||||
|
|
@ -10,20 +11,19 @@ namespace SM_TEST
|
|||
{
|
||||
public class TestRenderPipeline : RenderPipeline
|
||||
{
|
||||
private BloomEffectOld _bloomObsolete;
|
||||
private BloomEffect _bloom;
|
||||
private STPostProcessEffect _vittage;
|
||||
|
||||
private Framebuffer _postBuffer;
|
||||
|
||||
public override void Initialization()
|
||||
{
|
||||
|
||||
MainFramebuffer = CreateWindowFramebuffer(0, PixelInformation.RGBA_HDR, true);
|
||||
MainFramebuffer = CreateWindowFramebuffer(8, PixelInformation.RGBA_HDR, true);
|
||||
_postBuffer = CreateWindowFramebuffer(0, PixelInformation.RGB_HDR, false);
|
||||
|
||||
_bloom = new BloomEffect(true)
|
||||
{
|
||||
Radius = 20,
|
||||
AmountMap = new Texture(new System.Drawing.Bitmap("bloom_amountMap.png"))
|
||||
};
|
||||
PostProcessEffects.Add(_bloom);
|
||||
|
||||
|
|
@ -52,17 +52,13 @@ namespace SM_TEST
|
|||
context.Scene.DrawHUD(context);
|
||||
|
||||
GL.Disable(EnableCap.DepthTest);
|
||||
//_postBuffer.Activate(ClearBufferMask.ColorBufferBit);
|
||||
//PostProcessUtility.ResolveMultisampledBuffers(MainFramebuffer, _postBuffer);
|
||||
_postBuffer.Activate(ClearBufferMask.ColorBufferBit);
|
||||
PostProcessUtility.ResolveMultisampledBuffers(MainFramebuffer, _postBuffer);
|
||||
|
||||
//_vittage.Draw(MainFramebuffer["color"], context);
|
||||
//_bloom.Draw(MainFramebuffer["color"], context);
|
||||
_bloomObsolete.Draw(MainFramebuffer["color"], context);
|
||||
_bloom.Draw(_postBuffer["color"], context);
|
||||
Framebuffer.Screen.Activate(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
|
||||
|
||||
PostProcessUtility.FinalizeHDR(MainFramebuffer["color"], 1f);
|
||||
|
||||
//context.Scene.DrawDebug(context);
|
||||
PostProcessUtility.FinalizeHDR(_postBuffer["color"], 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue