WebGPU gpu particle error

I’m using webgpu engine
Here is how my particle looks like
Texture is 512x512

When I add the size gradient it throws a lot of webgpu errors in the console + white screen crash (it works fine if I switch back to WebGL2 engine)

particleSystem.addSizeGradient(0, 0)
particleSystem.addSizeGradient(1, 1)
const particleSystem = new GPUParticleSystem('Smoke particles', { capacity: 50 }, scene)

particleSystem.particleTexture = texture
particleSystem.emitter = emitter
particleSystem.minEmitBox = new Vector3(-1, -0.1, -3)
particleSystem.maxEmitBox = new Vector3(1, 0.1, -3.2)

particleSystem.color1 = Color4.FromHexString('#7B7B7BFF')
particleSystem.color2 = Color4.FromHexString('#7B7B7BFF')
particleSystem.colorDead = new Color4(0, 0, 0, 0)

particleSystem.minSize = 0.1
particleSystem.maxSize = 2

particleSystem.addSizeGradient(0, 0)
particleSystem.addSizeGradient(1, 1)

particleSystem.minLifeTime = 0.3
particleSystem.maxLifeTime = 0.8

particleSystem.emitRate = 0

particleSystem.blendMode = ParticleSystem.BLENDMODE_ADD

particleSystem.gravity = new Vector3(0, 4, 0)

particleSystem.direction1 = new Vector3(0, 0, -5)

particleSystem.minAngularSpeed = 0
particleSystem.maxAngularSpeed = Math.PI

particleSystem.minEmitPower = 0.1
particleSystem.maxEmitPower = 1
particleSystem.updateSpeed = 0.008

particleSystem.forceDepthWrite = true

return particleSystem

Any ideas

1 Like

cc @sebavan

Works for me.

Create a PG with your PS.

You probably need to enable the “float32-filterable” extension. The easiest way is to set enableAllFeatures: true in the option object passed to the WebGPU constructor.

2 Likes

Is there any negative impact on having enableAllFeatures to true ?

1 Like

Not that I know of.

2 Likes