mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 06:26:42 +01:00
- [Preview Panel] Fix channel selector shows up incorrectly in sdf mode.
This commit is contained in:
parent
9c94901006
commit
3ff3f6c3a3
2 changed files with 13 additions and 5 deletions
|
@ -1954,8 +1954,10 @@ function Panel_Preview() : PanelContent() constructor {
|
|||
draw_set_color(COLORS.panel_toolbar_separator);
|
||||
draw_line_width(tbx + ui(12), tby - toolbar_height / 2 + ui(8), tbx + ui(12), tby + toolbar_height / 2 - ui(8), 2);
|
||||
|
||||
if(d3_active) drawNodeChannel3D(tbx, tby);
|
||||
else drawNodeChannel(tbx, tby);
|
||||
if(d3_active && _node && _node.is_3D == NODE_3D.polygon)
|
||||
drawNodeChannel3D(tbx, tby);
|
||||
else
|
||||
drawNodeChannel(tbx, tby);
|
||||
} #endregion
|
||||
|
||||
function drawSplitView() { #region
|
||||
|
|
|
@ -874,17 +874,23 @@ vec4 scene() {
|
|||
}
|
||||
}
|
||||
|
||||
vec3 ref = reflect(dir, norm);
|
||||
vec3 bgClr = background.rgb;
|
||||
// if(useEnv == 1) {
|
||||
// vec4 refC = sampleTexture(0, equirectangularUv(norm), 0);
|
||||
// bgClr *= refC.rgb;
|
||||
// }
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
float distNorm = (depth - viewRange.x) / (viewRange.y - viewRange.x);
|
||||
distNorm = 1. - distNorm;
|
||||
distNorm = smoothstep(.0, .3, distNorm);
|
||||
c = mix(c * background.rgb, c, mix(1., distNorm, depthInt));
|
||||
c = mix(c * bgClr, c, mix(1., distNorm, depthInt));
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
if(useEnv == 1) {
|
||||
vec3 ref = reflect(dir, norm);
|
||||
vec4 refC = sampleTexture(0, equirectangularUv(ref), 0);
|
||||
c = mix(c, c * refC.rgb, refl);
|
||||
}
|
||||
|
@ -893,7 +899,7 @@ vec4 scene() {
|
|||
|
||||
vec3 light = normalize(lightPosition);
|
||||
float lamo = min(1., max(0., dot(norm, light)) + ambientIntns);
|
||||
c = mix(c * background.rgb, c, lamo);
|
||||
c = mix(c * bgClr, c, lamo);
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
|
|
Loading…
Reference in a new issue