A downloadable asset pack

Buy Now
On Sale!
60% Off
$15.00 $6.00 USD or more

A complete shader system that lets you shoot projectiles to infect surfaces. Infection spreads organically from impact points with glowing veins, pulsing animation, and realistic merging.


Features

Organic spreading - Grows from hit points with animated veins and pustules

Smooth merging - Multiple infections blend into one unified blob

Full PBR support - Works with albedo, normal, roughness, AO, displacement, and emission textures

Customizable appearance - Use procedural or custom textures for both healthy and infected states

Performance optimized - Distance culling and early exit

FPS controller included - Ready-to-use player with shooting mechanics


How to Use

1. Setup InfectionManager (One-time)

1. Add `InfectionManager.gd` to your project

2. Go to **Project > Project Settings > Autoload**

3. Add `InfectionManager.gd` as autoload named "InfectionManager"

2. Make an Object Infectable

**Scene Structure:**

```

YourObject (StaticBody3D or RigidBody3D)

├── MeshInstance3D (with infection shader material)

├── CollisionShape3D

└── Script: InfectableObject.gd


1. Create your 3D object (floor, wall, sphere, etc.)

2. Apply `infection_spread.gdshader` to its material

3. Attach `InfectableObject.gd` script

4. In the script's `_ready()`, add this line:

mesh_instance.set_surface_override_material(0, material.duplicate())


3. Create Projectiles

1. Create a **RigidBody3D** scene

2. Add **MeshInstance3D** (sphere) with `infection_projectile.gdshader`

3. Add **CollisionShape3D**

4. Attach `InfectionProjectile.gd` script

5. Save scene as `infection_projectile.tscn`


4. Adjust Settings

**In Material Inspector:**

- `infection_spread_distance` - How far infection spreads (try 10-30)

- `max_infection_points` - Max points per object (50-100 recommended)

- `corruption_color` - Change infection color

- `healthy_uv_scale` / `corrupted_uv_scale` - Texture tiling

**That's it!** Shoot objects to infect them and watch the infection spread.

---

What's Included

- `infection_spread.gdshader` - Main infection shader

- `infection_projectile.gdshader` - Projectile shader  

- `InfectionManager.gd` - Manages infection state

- `InfectableObject.gd` - Makes objects infectable

- `InfectionProjectile.gd` - Projectile behavior

- `Player.gd` - FPS controller example

---

 Quick Tips

- **Change colors:** Adjust `corruption_color` and `infection_edge_color`

- **Faster spread:** Lower `infection_spread_distance` value

- **More detail:** Increase `vein_density` and `pustule_density`

- **Better performance:** Lower `max_infection_points` to 25-50

- **Custom textures:** Enable `use_corrupted_textures` and assign texture maps


If you have any request or suggestions for making it better, please let me know 🙂

Published 2 days ago
StatusReleased
CategoryAssets
AuthorGoGameDev

Purchase

Buy Now
On Sale!
60% Off
$15.00 $6.00 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $6 USD. You will get access to the following files:

Spreading Shader Godot 4.5.zip 76 MB

Leave a comment

Log in with itch.io to leave a comment.