[Bf-blender-cvs] [28e8ccf6683] temp-greasepencil-vfx: Fix problems with Blur FX

Antonio Vazquez noreply at git.blender.org
Thu Jun 28 11:48:00 CEST 2018


Commit: 28e8ccf6683b4068b4986d876f28128760f3ab13
Author: Antonio Vazquez
Date:   Thu Jun 28 11:47:53 2018 +0200
Branches: temp-greasepencil-vfx
https://developer.blender.org/rB28e8ccf6683b4068b4986d876f28128760f3ab13

Fix problems with Blur FX

The FX passes needed BLEND state enabled to get the right result.

Also, the multisample texture does not need 32F and can back to the default 16F.

===================================================================

M	source/blender/draw/engines/gpencil/gpencil_engine.c

===================================================================

diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index da252a92394..6ba517dd369 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -93,7 +93,7 @@ void DRW_gpencil_multisample_ensure(GPENCIL_Data *vedata, int rect_w, int rect_h
 			fbl->multisample_fb = GPU_framebuffer_create();
 			if (fbl->multisample_fb) {
 				if (txl->multisample_color == NULL) {
-					txl->multisample_color = GPU_texture_create_2D_multisample(rect_w, rect_h, GPU_RGBA32F, NULL, samples, NULL);
+					txl->multisample_color = GPU_texture_create_2D_multisample(rect_w, rect_h, GPU_RGBA16F, NULL, samples, NULL);
 				}
 				if (txl->multisample_depth == NULL) {
 					txl->multisample_depth = GPU_texture_create_2D_multisample(rect_w, rect_h, GPU_DEPTH24_STENCIL8, NULL, samples, NULL);
@@ -244,7 +244,8 @@ static void GPENCIL_create_fx_shaders(void)
 
 static void GPENCIL_create_fx_passes(GPENCIL_PassList *psl)
 {
-	DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS;
+	DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND |
+					 DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS;
 	/* FX passes */
 	psl->fx_blur_pass = DRW_pass_create("GPencil FX Blur Pass", state);



More information about the Bf-blender-cvs mailing list