mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-02-03 08:45:17 +01:00
[Scatter, Bend, 3D Transform] Fix pixel interpolation not working.
This commit is contained in:
parent
c7e22ff2bd
commit
9665e4ef6e
3 changed files with 7 additions and 15 deletions
|
@ -108,7 +108,7 @@ function Node_3D_Transform_Image(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y,
|
|||
camera_set_view_mat(camera, viewMat);
|
||||
camera_set_proj_mat(camera, projMat);
|
||||
camera_apply(camera);
|
||||
gpu_set_texfilter(getAttribute("interpolate"));
|
||||
gpu_set_texfilter(getAttribute("interpolate") > 1);
|
||||
|
||||
object.transform.submitMatrix();
|
||||
matrix_set(matrix_world, matrix_stack_top());
|
||||
|
|
|
@ -248,7 +248,7 @@ function Node_Bend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
|||
|
||||
var n = array_length(mesh);
|
||||
|
||||
gpu_set_texfilter(getAttribute("interpolate"));
|
||||
gpu_set_texfilter(getAttribute("interpolate") > 1);
|
||||
for( var k = 0; k < n; k += 100 ) {
|
||||
draw_primitive_begin_texture(pr_trianglelist, surface_get_texture(_surf));
|
||||
|
||||
|
|
|
@ -378,7 +378,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
var _outSurf = _outData[0];
|
||||
|
||||
surface_set_target(_outSurf);
|
||||
gpu_set_tex_filter(getAttribute("interpolate"));
|
||||
gpu_set_tex_filter(getAttribute("interpolate") > 1);
|
||||
|
||||
DRAW_CLEAR
|
||||
switch(blend) {
|
||||
|
@ -616,24 +616,16 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
}
|
||||
|
||||
if(_useAtl) {
|
||||
if(!is_instanceof(_atl, SurfaceAtlasFast)) _atl = new SurfaceAtlasFast(surf, _x, _y, _r, _scx, _scy, clr, alp);
|
||||
if(!is(_atl, SurfaceAtlasFast)) _atl = new SurfaceAtlasFast(surf, _x, _y, _r, _scx, _scy, clr, alp);
|
||||
else _atl.set(surf, _x, _y, _r, _scx, _scy, clr, alp);
|
||||
|
||||
_atl.w = sw;
|
||||
_atl.h = sh;
|
||||
} else {
|
||||
if(_atl == noone) _atl = {};
|
||||
if(!is(_atl, SurfaceAtlasFast)) _atl = new SurfaceAtlasFast(surf, _x, _y, _r, _scx, _scy, clr, alp);
|
||||
|
||||
_atl.surface = surf ;
|
||||
_atl.x = _x ;
|
||||
_atl.y = _y ;
|
||||
_atl.rotation = _r ;
|
||||
_atl.sx = _scx ;
|
||||
_atl.sy = _scy ;
|
||||
_atl.blend = clr ;
|
||||
_atl.alpha = alp ;
|
||||
_atl.w = sw ;
|
||||
_atl.h = sh ;
|
||||
_atl.w = sw;
|
||||
_atl.h = sh;
|
||||
}
|
||||
|
||||
_sct[_sct_len] = _atl;
|
||||
|
|
Loading…
Reference in a new issue