Skip to content

Custom shader support for particles#1736

Merged
jankrassnigg merged 5 commits into
devfrom
user/jk/particle-shader
Dec 8, 2025
Merged

Custom shader support for particles#1736
jankrassnigg merged 5 commits into
devfrom
user/jk/particle-shader

Conversation

@jankrassnigg
Copy link
Copy Markdown
Member

Particles can now be rendered with custom shaders. In the particle "quad" or "trail" type, select "Custom Material". For the custom particle material, create a custom shader, either through the shader template, or via visual shaders (VSE). Important: On the material asset set the "Asset Filter Tag" to "QuadParticle" or "TrailParticle", to be able to pick the material in the asset browser as a custom particle material. Using a custom shader you can create more advanced rendering effects. In VSE there are a particle specific nodes for input and output. VSE currently only supports quad particles (no trails), but that would be trivial to add, as well.

Also fixed a few issues in VSE. The same texture can now be sampled multiple times with different UVs by using the texture 2D node with the same name multiple times. Also removed the hard coded "BaseTexture" and other nodes. Also added a "ScreenCoord" node for sampling the screen textures.

Currently there is only a single sample, the "CustomParticleShader" material in the Testing Chambers project.

Custom shader:

pfx shader

In particle editor:

image

In use:

image

@jankrassnigg jankrassnigg added new feature improvement Improves an existing feature labels Dec 8, 2025
@jankrassnigg jankrassnigg added this to the Next Release milestone Dec 8, 2025
Comment thread Data/Tools/ezEditor/ShaderTemplates/Particle.ezShaderTemplate Outdated
jankrassnigg and others added 4 commits December 8, 2025 16:33
Particles can now be rendered with custom shaders.
In the particle "quad" or "trail" type, select "Custom Material".
For the custom particle material, create a custom shader, either through the shader template, or via visual shaders (VSE).
Important: On the material asset set the "Asset Filter Tag" to "QuadParticle" or "TrailParticle", to be able to pick the material in the asset browser as a custom particle material.
Using a custom shader you can create more advanced rendering effects. In VSE there are a particle specific nodes for input and output.
VSE currently only supports quad particles (no trails), but that would be trivial to add, as well.

Also fixed a few issues in VSE. The same texture can now be sampled multiple times with different UVs by using the texture 2D node with the same name multiple times. Also removed the hard coded "BaseTexture" and other nodes.
Also added a "ScreenCoord" node for sampling the screen textures.

Currently there is only a single sample, the "CustomParticleShader" material in the Testing Chambers project.
@jankrassnigg jankrassnigg force-pushed the user/jk/particle-shader branch from 70a2953 to 8b475e4 Compare December 8, 2025 15:33
@jankrassnigg jankrassnigg merged commit 865fc8c into dev Dec 8, 2025
1 of 11 checks passed
@jankrassnigg jankrassnigg deleted the user/jk/particle-shader branch December 8, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants