natiny.shader.destroy
natiny.shader.destroy(shader)
Destroys a custom shader and frees its GPU resources.
Parameters
| Name | Type | Description |
|---|---|---|
shader |
number |
Shader handle from natiny.shader.load |
Example
natiny.shader.destroy(shader)
Notes
- Destroy every material created from this shader first. Those materials keep references to the shader's GPU modules.
- The shader handle becomes invalid. Invalid or already destroyed handles are ignored.