Use custom BSP shader materials for entity models #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Entity models currently use Three.js
MeshLambertMaterial, which means they don't benefit from our custom shader pipeline (sun lighting uniforms, envmap reflections, detail textures, $color tinting, $selfillum, etc.). They also don't properly resolve VMT shader properties.Problem
MeshLambertMaterialinclient/src/mdl/loader.js— no access to our uber-shader features$envmap,$detail,$selfillum,$phong,$colorare ignored on model materialsuseSunLightingpathRequirements
MeshLambertMaterialwithcreateBSPMaterial()in the model loaderapplyVMTPropertiespath used by BSP facesuseSunLighting: truefor VertexLitGeneric materials on models (they have no lightmap)uv2,color,normal)DirectionalLight/AmbientLightscene lights once all surfaces use the custom shaderContext
client/src/bsp/material.jsclient/src/mdl/loader.jslight_environmententity inclient/src/bsp/loader.js