This commit is contained in:
luboslenco
2025-08-09 23:23:55 +02:00
parent e7e2fae574
commit 821b5f3625
8 changed files with 2 additions and 23 deletions
-4
View File
@@ -1,6 +1,5 @@
function make_particle_mask(kong: node_shader_t) {
///if arm_physics
node_shader_add_out(kong, "wpos: float4");
node_shader_add_constant(kong, "W: float4x4", "_world_matrix");
node_shader_write_attrib_vert(kong, "output.wpos = constants.W * float4(input.pos.xyz, 1.0);");
@@ -16,7 +15,4 @@ function make_particle_mask(kong: node_shader_t) {
node_shader_write_frag(kong, "var str: float = clamp(pow(1.0 / dist * constants.brush_hardness * 0.2, 4.0), 0.0, 1.0) * opacity;");
node_shader_write_frag(kong, "if (constants.particle_hit.x == 0.0 && constants.particle_hit.y == 0.0 && constants.particle_hit.z == 0.0) { str = 0.0; }");
node_shader_write_frag(kong, "if (str == 0.0) { discard; }");
///else
node_shader_write_frag(kong, "var str: float = 0.0;");
///end
}