Custom style layers for raster sources
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I'm interested in using the new Custom Style Layers to apply a custom pixel shader to raster tiles. It seems like this should be possible by essentially recreating the regular raster shader in a custom style layer, but I can't seem to find much documentation on how to set up the uniforms appropriately, how to get the raster textures, or how to generate the quads. I can see that the built in layer types have a whole pipeline for getting their uniforms set that I'd need to replicate, but it's kinda dense, and I wanted to check that there wasn't a simpler way before digging into all that.
Is there any example of applying these custom style layers to raster tiles, or somewhere I should look to start figuring it out?
For reference, here is an article that accomplishes the same goal I'm trying to achieve, though they forked the code and modified the existing raster pixel shader in place. I'd rather go the custom layer route if possible!
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Custom Style Layers in issue #7039 and the built-in layer pipeline mentioned in the report. Determine whether the uniforms, raster textures, and quad generation are exposed for custom layers, then document a supported example or clarify the limitation and the relevant starting points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics, web-dev
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100