roomSurface
The apartment's surface shader: the engine's standard metallic-roughness lighting with every map projected in world space (triplanar), so tiling PBR textures — wood grain, painted plaster, porcelain, fabric weave, brushed metal — sit on code-built quick-geometry parts at true rea…
roomSurface
The apartment's surface shader: the engine's standard metallic-roughness lighting with every map projected in world space (triplanar), so tiling PBR textures — wood grain, painted plaster, porcelain, fabric weave, brushed metal — sit on code-built quick-geometry parts at true real-world scale, without stretching on scaled boxes or seams between parts.
uv_scale= texture repeats per metre;uv_offsetshifts the pattern (give each tone of a material its own offset to break repetition);uv_rotate= 1 turns the map a quarter turn (wood grain along the other axis).- Maps use glTF packing:
base_color_texture,roughness_metallic_texture(R occlusion, G roughness, B metallic) andnormal_texture;roughness,metallic,normal_scaleandocclusion_strengthscale them. - Switched lobes:
clearcoat(lacquered wood, glazed tile),anisotropy(brushed metal),sheen_color/sheen_roughness(fabric).
Used by the room palette in room/RoomKit.module (quick-geometry materials with a surface table). Projection is world-space, so it suits static architecture and furniture; a part that moves would see its texture swim.
Scoped to this part · feeds back into the world's score.