mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 23:40:02 +01:00
New Blending with pre-multiplied alpha
Finally found how to improve blending modes by pre-multiplying color by alpha in the shader, so that the blending equations can be applied on top of the apha manipulation.
This commit is contained in:
@@ -274,7 +274,7 @@ void SessionGroupSource::init()
|
||||
{
|
||||
if ( resolution_.x > 0.f && resolution_.y > 0.f ) {
|
||||
|
||||
session_->setResolution( resolution_ );
|
||||
session_->setResolution( resolution_, true );
|
||||
|
||||
// update to draw framebuffer
|
||||
session_->update( dt_ );
|
||||
@@ -283,7 +283,7 @@ void SessionGroupSource::init()
|
||||
texturesurface_->setTextureIndex( session_->frame()->texture() );
|
||||
|
||||
// create Frame buffer matching size of session
|
||||
FrameBuffer *renderbuffer = new FrameBuffer( session_->frame()->resolution() );
|
||||
FrameBuffer *renderbuffer = new FrameBuffer( session_->frame()->resolution(), true );
|
||||
|
||||
// set the renderbuffer of the source and attach rendering nodes
|
||||
attach(renderbuffer);
|
||||
|
||||
Reference in New Issue
Block a user