BloomEffect fixed _source, fixed basic.glsl
This commit is contained in:
parent
5bb690e45f
commit
03d99ea28e
4 changed files with 7 additions and 5 deletions
|
|
@ -78,8 +78,12 @@ namespace SM.Base.PostEffects
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected override void InitProcess()
|
||||
{
|
||||
_source = Pipeline.MainFramebuffer;
|
||||
|
||||
_source.ColorAttachments["color"].PixelInformation = PixelInformation.RGBA_HDR;
|
||||
|
||||
_bloomBuffer1 = new Framebuffer(Pipeline.ConnectedWindow, _textureScale);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace SM.Base.Windows
|
|||
|
||||
public List<Framebuffer> Framebuffers { get; } = new List<Framebuffer>();
|
||||
|
||||
public virtual MaterialShader DefaultShader { get; protected set; }
|
||||
public virtual MaterialShader DefaultShader { get; protected set; } = SMRenderer.DefaultMaterialShader;
|
||||
public virtual Material DefaultMaterial { get; protected set; }
|
||||
|
||||
public bool IsInitialized { get; set; }
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ uniform sampler2D Texture;
|
|||
layout(location = 0) out vec4 color;
|
||||
|
||||
void main() {
|
||||
color = vec4(v_TexCoords, 0, 1);
|
||||
return;
|
||||
color = v_Color * Tint;
|
||||
if (UseTexture) color = texture(Texture, v_TexCoords);
|
||||
if (UseTexture) color *= texture(Texture, v_TexCoords);
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ namespace SM_TEST
|
|||
|
||||
public override void Initialization()
|
||||
{
|
||||
_bloom = new BloomEffect(1);
|
||||
_bloom = new BloomEffect(hdr: true);
|
||||
|
||||
MainFramebuffer = CreateWindowFramebuffer();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue