View on GitHub

leaflet-city-mapper

A small 3D rendering engine for leaflet

Shaders

Source guide Project README

Generates WGSL shader code for materials, native strokes and roof projection. Material program setup and GPU resource binding live outside this folder.

Generated variants

flowchart LR
  Material["Material flags"] --> Generate["materialShaders"]
  Generate --> Vertex["Vertex WGSL"]
  Generate --> Surface["Fragment WGSL"]
  Generate --> Bindings["Texture bindings + feature flags"]
  Vertex --> Program["GPU program"]
  Surface --> Program
  Bindings --> Program

Generation does not require a GPU. Binding order, material layout, uniform writes and vertex attributes must agree; compilation diagnostics come from gpu.

Related: materials, textures, rendering.