apetavern / grubs

A worms-inspired artillery game for s&box with randomly generated levels.
MIT License
34 stars 7 forks source link

Basic scorch effect from explosions #257

Closed Metapyziks closed 1 year ago

Metapyziks commented 1 year ago

Foundation for #255

I've added a shader gr_foreground_scorch as an extension of gr_foreground with a basic scorch effect. It reads from a texture generated by a new scorch.sdflayer, which is added to during explosions.

I've modified the sand_a and sand_shells materials to use this new shader, and the sand.sdflayer layer so that it references the scorch layer:

image

The "Layer Textures" entry shown above is what causes the scorch.sdflayer SDF to be sent to the material as a texture.

I've repurposed some existing textures to make a proof-of-concept, feel free to swap them out for whatever. Here's how it looks:

sbox-dev_IQQP0gmPvD

You can freely specify completely different textures for each material using the gr_foreground_scorch shader.