From 5229a55f68138748e34eb6b6fd953fa18bfa11f8 Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Mon, 14 Jun 2021 21:40:32 +0530 Subject: [PATCH] Dump DtsTexture, fix the blending bugs and shit, fix triggers --- src/ParticleSystem.hx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ParticleSystem.hx b/src/ParticleSystem.hx index 8ad47a4b..2386f811 100644 --- a/src/ParticleSystem.hx +++ b/src/ParticleSystem.hx @@ -291,6 +291,7 @@ class ParticleManager { particleShader.scale = instance.scale; particleShader.rotation = instance.rotation; batch.meshBatch.material.blendMode = instance.o.blending; + batch.meshBatch.material.mainPass.setPassName("overlay"); batch.meshBatch.material.color.load(instance.color); batch.meshBatch.shadersChanged = true; batch.meshBatch.setScale(instance.scale); @@ -321,9 +322,11 @@ class ParticleManager { prim.uvs = [new UV(0, 0), new UV(0, 1), new UV(1, 0), new UV(1, 1)]; prim.addNormals(); var mat = Material.create(particleData.texture); - mat.mainPass.addShader(new h3d.shader.pbr.PropsValues(1, 0, 0, 1)); + // matshader.texture = mat.texture; + mat.mainPass.enableLights = false; + mat.mainPass.setPassName("overlay"); + // mat.mainPass.addShader(new h3d.shader.pbr.PropsValues(1, 0, 0, 1)); mat.texture.wrap = Wrap.Repeat; - mat.blendMode = Alpha; var billboardShader = new Billboard(); mat.mainPass.addShader(billboardShader); var mb = new MeshBatch(prim, mat, this.scene);