Skip to content

TilesRenderer: Add shader "chaining" logic for adding and removing visualizations layers #1179

@gkjohnson

Description

@gkjohnson

Right now "visualizations" are added via on before compile which makes it difficult to add multiple visualizations on top of eachother and clean up when a plugin is removed (see fade, topo, overlays, user shaders, etc). This also makes users or plugins replacing shaders more difficult to deal with since we don't know when they're added or removed. A built in chaining / material mixin registration system would allow this to work more cleanly.

tiles.registerMaterialLayer( {
  uniforms: {},
  defines: {},
  onBeforeCompile: () => {},
  customCacheKey: () => {},
  name: 'TOPO_MATERIAL_LAYER',
  order: 0,
} );

tiles.unregisterMaterialLayer( layer );

Node materials will likely also need a similar kind of mechanism.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions