Update readme clarifying the material definition set up

This commit is contained in:
Marco Cawthorne 2023-10-09 13:12:32 -07:00
parent da7389d9a2
commit 63fe97ee0f
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 21 additions and 0 deletions

View File

@ -29,6 +29,27 @@ You want to pass `-basedir /path/to/game/root` and `-game` arguments to specify
`./vmap -basedir "/home/user/nuclide-sdk/" -game "base" test_sun` `./vmap -basedir "/home/user/nuclide-sdk/" -game "base" test_sun`
### Material definitions
As stated, we look alongside the textures for material definitions.
For example, if a .map file references `measure/floor` the compiler will look
at `textures/measure/floor.mat` within any `-game` directories for the exact material description.
The .mat file in question looks something like this:
```
{
program lightmapped
diffusemap "textures/measure/floor.tga"
}
```
The `program` line tells the engine which SPIR-V/GLSL/HLSL pixel shader program to use, the compiler ignores that. The `diffusemap` key is read in by the compiler to figure out which texture to load for its color information (used by the `-light` switch) and its size.
You can also use Q3A style .shader syntax in these, but set at least a `qer_editorImage` pointing to a valid texture for valid dimensions.
[There's material directives specific to vmap, which you can see here.](https://developer.vera-visions.com/d6/d06/mat_vmap.html). Support for the q3map2 equivalents (where applicable) has been preserved, so you won't need to migrate.
## Compiling ## Compiling
To compile on a standard GNU/Linux system: To compile on a standard GNU/Linux system:
`make` `make`