natiny.shader.load
local shader = natiny.shader.load(nsl_source)
Compiles an NSL resource containing vertex and fragment stages for the active graphics backend.
Parameters
| Name | Type | Description |
|---|---|---|
nsl_source |
number |
Resource holding the .nsl source |
Returns
| Type | Description |
|---|---|
number |
Shader handle, or an error when the source does not compile |
Example
local shader = natiny.shader.load(source)