- [Preview Panel] Fix onion skin error.

This commit is contained in:
Tanasart 2024-05-05 09:59:13 +07:00
parent ddf0de00d0
commit 60ab580249
4 changed files with 2 additions and 6 deletions

View file

@ -97,7 +97,7 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _
var amo = array_length(_tar);
for( var i = 0; i < amo; i++ ) matchTemplate(i / amo, temp_surface[0], _bas, _tar[i], _cthr, _pthr, _fst);
return temp_surface[0];
//return temp_surface[0];
_outSurf = surface_verify(_outSurf, _sw, _sh);
surface_set_target(_outSurf);

View file

@ -728,7 +728,7 @@ function Panel_Preview() : PanelContent() constructor {
switch(tileMode) {
case 0 :
if(PROJECT.onion_skin.enabled) drawOnionSkin(node, psx, psy, ss);
if(PROJECT.onion_skin.enabled) drawOnionSkin(_node, psx, psy, ss);
else draw_surface_ext(preview_surface[0], psx, psy, ss, ss, 0, c_white, preview_node[0].preview_alpha);
break;

View file

@ -24,7 +24,6 @@ void main() {
if(wg.r == 1. && abs(wg.g - index) < 0.01) {
gl_FragColor = texture2D( replace, (replace_dim - vec2(i, j) - 1. + .5) / replace_dim );
//gl_FragColor = vec4((replace_dim - vec2(i, j)) / replace_dim, 0., 1.);
return;
}
}

View file

@ -29,7 +29,6 @@ float matchTemplate(vec2 pos) {
for( float i = 0.; i < targetDimension.x; i++ )
for( float j = 0.; j < targetDimension.y; j++ ) {
vec4 targ = texture2D( target, vec2(0.5 + i, 0.5 + j) * targTx );
if(targ.a == 0.) continue;
vec2 bpx = pos + vec2(i, j);
vec4 base = texture2D( gm_BaseTexture, bpx * baseTx );
@ -45,8 +44,6 @@ void main() {
gl_FragColor = vec4(0.);
vec4 base = texture2D( gm_BaseTexture, v_vTexcoord );
if(base.a == 0.)
return;
vec2 px = v_vTexcoord * dimension;