05.01.2021
+ 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
This commit is contained in:
parent
9b917ac181
commit
4c18127c88
52 changed files with 697 additions and 373 deletions
|
|
@ -12,16 +12,14 @@ namespace SM2D.Pipelines
|
|||
{
|
||||
public static Basic2DPipeline Pipeline = new Basic2DPipeline();
|
||||
|
||||
protected override MaterialShader _defaultShader { get; } = Basic2DShader.Shader;
|
||||
|
||||
private Basic2DPipeline()
|
||||
{
|
||||
Console.WriteLine();
|
||||
_defaultShader = Basic2DShader.Shader;
|
||||
}
|
||||
|
||||
protected override void Render(ref DrawContext context, Scene.Scene scene)
|
||||
protected override void RenderProcess(ref DrawContext context, Scene.Scene scene)
|
||||
{
|
||||
base.Render(ref context, scene);
|
||||
|
||||
Framebuffer.Screen.Activate(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
|
||||
if (scene != null) scene.Draw(context);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ using SM.Base;
|
|||
using SM.Base.Contexts;
|
||||
using SM.Base.Scene;
|
||||
using SM.OGL.Framebuffer;
|
||||
using SM2D.Light;
|
||||
using SM2D.Shader;
|
||||
|
||||
#endregion
|
||||
|
|
@ -17,11 +16,7 @@ namespace SM2D.Pipelines
|
|||
{
|
||||
public static Default2DPipeline Pipeline = new Default2DPipeline();
|
||||
|
||||
private Framebuffer _tempWindow;
|
||||
private Light.LightPostEffect _lightEffect;
|
||||
|
||||
protected override List<Framebuffer> _framebuffers { get; } = new List<Framebuffer>();
|
||||
|
||||
|
||||
private Default2DPipeline()
|
||||
{
|
||||
|
||||
|
|
@ -29,27 +24,19 @@ namespace SM2D.Pipelines
|
|||
|
||||
protected override void Initialization(GenericWindow window)
|
||||
{
|
||||
_tempWindow = CreateWindowFramebuffer();
|
||||
_lightEffect = new LightPostEffect();
|
||||
|
||||
_framebuffers.Add(_tempWindow);
|
||||
|
||||
_lightEffect.Init(_tempWindow);
|
||||
MainFramebuffer = CreateWindowFramebuffer();
|
||||
}
|
||||
|
||||
protected override void Render(ref DrawContext context, Scene.Scene scene)
|
||||
protected override void RenderProcess(ref DrawContext context, Scene.Scene scene)
|
||||
{
|
||||
base.Render(ref context, scene);
|
||||
|
||||
if (scene != null)
|
||||
{
|
||||
_tempWindow.Activate(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
|
||||
MainFramebuffer.Activate(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
|
||||
scene.DrawBackground(context);
|
||||
|
||||
scene.DrawMainObjects(context);
|
||||
|
||||
|
||||
Framebuffer.Screen.Activate();
|
||||
_lightEffect.Draw(_tempWindow, Framebuffer.Screen);
|
||||
|
||||
scene.DrawHUD(context);
|
||||
scene.DrawDebug(context);
|
||||
|
|
@ -59,7 +46,6 @@ namespace SM2D.Pipelines
|
|||
protected override void SceneChanged(Scene.Scene scene)
|
||||
{
|
||||
base.SceneChanged(scene);
|
||||
_lightEffect.SceneChanged(scene);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue