- Fix node interpolation not save and load properly.

This commit is contained in:
MakhamDev 2023-10-21 20:41:05 +07:00
parent 6c283eec85
commit 70d6876fe7
4 changed files with 12 additions and 12 deletions

View File

@ -26,10 +26,10 @@
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER;
VERSION = 11551;
VERSION = 11552;
SAVE_VERSION = 11550;
VERSION_STRING = "1.15.5.1";
BUILD_NUMBER = 11551;
VERSION_STRING = "1.15.5.2";
BUILD_NUMBER = 11552;
globalvar APPEND_MAP;
APPEND_MAP = ds_map_create();

View File

@ -61,20 +61,20 @@
}
function attribute_interpolation(label = false) {
attributes.interpolation = 0;
attributes.oversample = 0;
attributes.interpolate = 0;
attributes.oversample = 0;
if(label) array_push(attributeEditors, "Surface");
array_push(attributeEditors, ["Texture interpolation", function() { return attributes.interpolation; },
array_push(attributeEditors, ["Texture interpolation", function() { return attributes.interpolate; },
new scrollBox(global.SURFACE_INTERPOLATION, function(val) {
attributes.interpolation = val;
attributes.interpolate = val;
triggerRender();
}, false)]);
}
function attribute_oversample(label = false) {
attributes.interpolation = 0;
attributes.oversample = 0;
attributes.interpolate = 0;
attributes.oversample = 0;
if(label) array_push(attributeEditors, "Surface");
array_push(attributeEditors, ["Oversample", function() { return attributes.oversample; },

View File

@ -166,7 +166,7 @@ function shader_set_palette(pal, pal_uni = "palette", amo_uni = "paletteAmount",
function shader_preset_interpolation(shader = sh_sample) {
gml_pragma("forceinline");
var intp = attributes.interpolation;
var intp = attributes.interpolate;
gpu_set_tex_filter(intp);
shader_set_uniform_i(shader_get_uniform(shader, "interpolation"), intp);
@ -188,7 +188,7 @@ function shader_set_palette(pal, pal_uni = "palette", amo_uni = "paletteAmount",
function shader_set_interpolation(surface) {
gml_pragma("forceinline");
var intp = attributes.interpolation;
var intp = attributes.interpolate;
gpu_set_tex_filter(intp);
shader_set_i("interpolation", intp);

View File

@ -6,7 +6,7 @@ function struct_override(original, override) {
for( var i = 0, n = array_length(args); i < n; i++ ) {
var _key = args[i];
if(!struct_has(original, _key)) continue;
if(!struct_has(original, _key)) continue;
original[$ _key] = override[$ _key];
}