1.0.14
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:
parent
db7f01dca1
commit
89de4258e1
181 changed files with 584 additions and 698 deletions
|
|
@ -1,48 +0,0 @@
|
|||
using OpenTK.Graphics.OpenGL4;
|
||||
using SM.Base.PostEffects;
|
||||
using SM.Base.Window;
|
||||
using SM.OGL.Framebuffer;
|
||||
using SM.OGL.Texture;
|
||||
|
||||
namespace SM_TEST
|
||||
{
|
||||
public class TestRenderPipeline : RenderPipeline
|
||||
{
|
||||
private BloomEffect _bloom;
|
||||
private Framebuffer _postBuffer;
|
||||
|
||||
public override void Initialization()
|
||||
{
|
||||
|
||||
MainFramebuffer = CreateWindowFramebuffer(16, PixelInformation.RGBA_HDR);
|
||||
|
||||
_postBuffer = CreateWindowFramebuffer(0, PixelInformation.RGBA_HDR, depth: false);
|
||||
Framebuffers.Add(_postBuffer);
|
||||
_bloom = new BloomEffect(_postBuffer, hdr: true, .5f)
|
||||
{
|
||||
Threshold = .5f,
|
||||
};
|
||||
|
||||
|
||||
_bloom.Initilize(this);
|
||||
base.Initialization();
|
||||
}
|
||||
|
||||
protected override void RenderProcess(ref DrawContext context)
|
||||
{
|
||||
MainFramebuffer.Activate(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
|
||||
context.Scene.DrawBackground(context);
|
||||
context.Scene.DrawMainObjects(context);
|
||||
context.Scene.DrawHUD(context);
|
||||
|
||||
PostProcessUtility.ResolveMultisampledBuffers(MainFramebuffer, _postBuffer);
|
||||
|
||||
// _bloom.Draw(context);
|
||||
Framebuffer.Screen.Activate(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
|
||||
|
||||
PostProcessUtility.FinalizeHDR(_postBuffer["color"], .5f);
|
||||
|
||||
context.Scene.DrawDebug(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue