mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-10 12:34:06 +01:00
- [Preview Panel] Fix 3D preview depth error.
This commit is contained in:
parent
39942f7271
commit
824c5f4323
@ -41,6 +41,8 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||
|
||||
static getSingleValue = function(_index, _arr = preview_index, output = false) {
|
||||
var _l = output? outputs : inputs;
|
||||
if(_index < 0 || _index >= ds_list_size(_l)) return 0;
|
||||
|
||||
var _n = _l[| _index];
|
||||
var _in = output? _n.getValue() : getInputData(_index);
|
||||
|
||||
|
@ -56,7 +56,10 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||
var ww = surface_get_width_safe(_surf) * _s;
|
||||
var hh = surface_get_height_safe(_surf) * _s;
|
||||
|
||||
var hv = inputs[| 3].drawOverlay(hover, active, _x + ww / 2, _y + hh / 2, _s, _mx, _my, _snx, _sny); _hov |= hv;
|
||||
var _typ = getSingleValue(11);
|
||||
|
||||
if(_typ == 0) { var hv = inputs[| 3].drawOverlay(hover, active, _x + ww / 2, _y + hh / 2, _s, _mx, _my, _snx, _sny); _hov |= hv; }
|
||||
else if(_typ == 1) { var hv = inputs[| 12].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; }
|
||||
|
||||
return _hov;
|
||||
}
|
||||
@ -87,8 +90,8 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||
var _shay = _shf[1];
|
||||
|
||||
if(_posi == 1) {
|
||||
_shax = _lgh[0] - _dim[0] / 2;
|
||||
_shay = _lgh[1] - _dim[1] / 2;
|
||||
_shax = _dim[0] / 2 - _lgh[0];
|
||||
_shay = _dim[1] / 2 - _lgh[1];
|
||||
}
|
||||
|
||||
surface_set_shader(pass1, sh_outline_only);
|
||||
|
@ -950,6 +950,8 @@ function Panel_Preview() : PanelContent() constructor {
|
||||
} #endregion
|
||||
|
||||
function draw3DPolygon(_node) { #region
|
||||
surface_depth_disable(false);
|
||||
|
||||
_node.previewing = 1;
|
||||
|
||||
d3_scene_preview = struct_has(_node, "scene")? _node.scene : d3_scene;
|
||||
@ -1134,6 +1136,8 @@ function Panel_Preview() : PanelContent() constructor {
|
||||
#endregion
|
||||
|
||||
d3_scene_preview.camera.resetCamera();
|
||||
|
||||
surface_depth_disable(true);
|
||||
} #endregion
|
||||
|
||||
function draw3DSdf(_node) { #region
|
||||
|
Loading…
Reference in New Issue
Block a user