Here is a different approach, but you would need more data (this is what I meant by revised algorithm). Imagine stacked layers with variable thickness. And then the actual ground surface cuts through these layers. So for every pixels that you draw, you have a “column” of corresponding intersections with the layers, so it is easy to find in which layer the pixel is, and thus set its color.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Calculating new normals in TSL shader | 40 | 926 | February 21, 2025 | |
| Shader error fog height | 4 | 1547 | June 1, 2022 | |
| How do I get the vertex position somewhere on the PlaneGeometry surface? | 5 | 1114 | May 8, 2023 | |
| How to port vMapUv to TSL? | 36 | 469 | December 31, 2025 | |
| How can I send structs from positionNode wgsl shader to the colorNode wgsl shader? | 26 | 1224 | December 6, 2023 |
