Examples
Wiki page
Material and Shader Recipes
Practical material JSON and shader metadata patterns used by Nevo-base.
Textured Surface
Use basic shader with diffuse and normal textures:
{
"version": 0,
"shader": "basic",
"color": [1.0, 1.0, 1.0, 1.0],
"normalStrength": 1.0,
"castShadows": true,
"textures": [
{
"path": "textures/asphalt/Road012B_4K-PNG_Color.png",
"type": "diffuse"
},
{
"path": "textures/asphalt/Road012B_4K-PNG_NormalDX.png",
"type": "normal"
}
]
}This is the current asphalt.json pattern.
Unlit Texture
Use this for sky meshes, billboards, or debug visuals that should ignore lighting:
{
"version": 0,
"shader": "basic",
"color": [1.0, 1.0, 1.0, -1.0],
"castShadows": false,
"params": {
"unlit": true,
"receiveShadows": false
},
"textures": [
{
"path": "textures/StandardCubeMap.png",
"type": "diffuse"
}
]
}Use canonical keys in new material edits:
unlitreceiveShadowscastShadows
Legacy ignoreLights and ignoreShadows are read for compatibility.
Emissive Material
{
"version": 0,
"shader": "basic",
"color": [1.0, 1.0, 1.0, 1.0],
"emissionColor": [0.0, 0.8, 1.0, 1.0],
"emissionStrength": 8.0,
"params": {
"receiveShadows": false
}
}Pair high emission with Bloom in the post-processing stack for glow.
Shader Control Metadata
Add a material block to shader JSON so NVEditor can generate controls:
{
"version": 0,
"pixelShader": "basic",
"vertexShader": "basic",
"material": {
"parameters": [
{
"key": "metallic",
"label": "Metallic",
"target": "customData0.x",
"type": "float",
"default": 0.0,
"min": 0.0,
"max": 1.0,
"speed": 0.01
}
],
"textures": [
{
"key": "diffuse",
"label": "Diffuse",
"type": "diffuse"
}
]
}
}Material files can then use:
{
"params": {
"metallic": 0.75,
"diffuse": "textures/metal.png"
}
}Target Cheatsheet
| Target | Writes |
|---|---|
color | Material base color vec4. |
tintColor | Tint vec4. |
emissionColor | Emission vec4. |
customData0.x | First custom data component. |
uvScale | UV scale vec2. |
uvOffset | UV offset vec2. |
alphaCutoff | Alpha cutoff float. |
normalStrength | Normal map strength float. |
emissionStrength | Emission multiplier float. |
unlit | Ignore lighting boolean. |
receiveShadows | Receive shadows boolean. |
castShadows | Cast shadows boolean. |
Import Workflow
When importing GLTF/GLB:
- Reuse existing materials by name when possible.
- Load matching material JSON if it exists.
- Create placeholders only when you want editor-managed material files.
- Assign material IDs per mesh slot when the imported mesh has multiple materials.
If a mesh renderer has no explicit material, the loader tries imported mesh material names. If none resolve, it falls back to basic.
