NASA-AMMOS / NASA-AMMOS/3DTilesRendererJS

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

Open
#1,179 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.5k
Forks
416
Avg merge
17h 52m
Merged PRs (30d)
37

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how visualization layers are currently added through onBeforeCompile, including fade, topo, overlays, and user shaders. Define what is needed for registerMaterialLayer and unregisterMaterialLayer to support ordered additions and cleanup, then consider the stated parallel mechanism for node materials as part of the completion criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, three.js
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.