Final docs
This commit is contained in:
@@ -43,8 +43,21 @@ typedef union shadermaterial_u {
|
||||
} shadermaterial_t;
|
||||
```
|
||||
|
||||
`shaderunlitmaterial_t` typically holds a `texture_t *` and a
|
||||
tint colour. Check `shaderunlitmaterial.h` for the exact fields.
|
||||
`shaderunlitmaterial_t` fields:
|
||||
|
||||
```c
|
||||
typedef struct {
|
||||
color_t color; // tint colour (multiplied with the texture sample)
|
||||
texture_t *texture; // NULL uses TEXTURE_WHITE (solid colour draw)
|
||||
} shaderunlitmaterial_t;
|
||||
```
|
||||
|
||||
The shader exposes uniforms `u_Proj`, `u_View`, `u_Model` (mat4),
|
||||
`u_Texture` (sampler), and `u_Color` (vec4). They are uploaded via
|
||||
`shaderUnlitSetMaterial(shader, material)`.
|
||||
|
||||
A global singleton `SHADER_UNLIT` is the live shader object;
|
||||
`SHADER_UNLIT_DEFINITION` is its platform definition descriptor.
|
||||
|
||||
To use a shader material on a renderable entity:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user