mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-10 20:45:35 +01:00
Draw invalid shader fix.
This commit is contained in:
parent
9d47b74b98
commit
da2f1eb4c3
@ -277,12 +277,16 @@ event_inherited();
|
||||
ds_list_add(_list, "Favourites");
|
||||
for( var i = 0; i < array_length(global.FAV_NODES); i++ ) {
|
||||
var _nodeIndex = global.FAV_NODES[i];
|
||||
if(!ds_map_exists(ALL_NODES, _nodeIndex)) continue;
|
||||
|
||||
ds_list_add(_list, ALL_NODES[? _nodeIndex]);
|
||||
}
|
||||
|
||||
ds_list_add(_list, "Recents");
|
||||
for( var i = 0; i < array_length(global.RECENT_NODES); i++ ) {
|
||||
var _nodeIndex = global.RECENT_NODES[i];
|
||||
if(!ds_map_exists(ALL_NODES, _nodeIndex)) continue;
|
||||
|
||||
ds_list_add(_list, ALL_NODES[? _nodeIndex]);
|
||||
}
|
||||
}
|
||||
|
@ -735,7 +735,8 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||
overlay_w = ww;
|
||||
overlay_h = hh;
|
||||
|
||||
if(is_surface(base)) surface_size_to(_outSurf, ww, hh, cDep);
|
||||
if(is_surface(base))
|
||||
_outSurf = surface_size_to(_outSurf, ww, hh, cDep);
|
||||
|
||||
for(var i = 0; i < 2; i++) {
|
||||
temp_surface[i] = surface_verify(temp_surface[i], surface_get_width(_outSurf), surface_get_height(_outSurf), cDep);
|
||||
|
@ -76,6 +76,12 @@ function shader_set_surface(sampler, surface) {
|
||||
}
|
||||
|
||||
function surface_set_shader(surface, shader = sh_sample, clear = true, blend = BLEND.over) {
|
||||
if(!is_surface(surface)) {
|
||||
__surface_set = false;
|
||||
return;
|
||||
}
|
||||
|
||||
__surface_set = true;
|
||||
surface_set_target(surface);
|
||||
if(clear) DRAW_CLEAR;
|
||||
|
||||
@ -90,6 +96,8 @@ function shader_set_surface(sampler, surface) {
|
||||
}
|
||||
|
||||
function surface_reset_shader() {
|
||||
if(!__surface_set) return;
|
||||
|
||||
gpu_set_tex_filter(false);
|
||||
BLEND_NORMAL;
|
||||
surface_reset_target();
|
||||
|
Loading…
Reference in New Issue
Block a user