[Shape] Height now apply to rgb instead on alpha channel.

This commit is contained in:
Tanasart 2024-12-20 08:37:34 +07:00
parent 83f61c732a
commit 39d8ea2cae
2 changed files with 4 additions and 1 deletions

View file

@ -137,6 +137,8 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
newInput(35, nodeValue_Vec2("Point 3", self, [ 1, 0 ]))
.setUnitRef(onSurfaceSize, VALUE_UNIT.reference);
// newInput(36, nodeValue_Vec2("Point 3", self, [ 1, 0 ]))
newOutput(0, nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone));
input_display_list = [

View file

@ -477,6 +477,7 @@ void main() {
}
color = cc;
if(drawDF == 1) {
color = -d;
color = clamp((color - dfLevel.x) / (dfLevel.y - dfLevel.x), 0., 1.);
@ -485,6 +486,6 @@ void main() {
color *= cc;
}
if(drawBG == 0) gl_FragColor = vec4(v_vColour.rgb, v_vColour.a * color);
if(drawBG == 0) gl_FragColor = vec4(v_vColour.rgb * color, v_vColour.a * cc);
else gl_FragColor = mix(bgColor, v_vColour, color);
}