webgl-framework
webgl-dunes
Our great sponsors
webgl-framework | webgl-dunes | |
---|---|---|
2 | 1 | |
4 | 35 | |
- | - | |
0.0 | 0.0 | |
8 months ago | 9 months ago | |
JavaScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
webgl-framework
-
Creating mountains landscape in OpenGL ES
After the terrain we draw a sky hemisphere object with the basic DiffuseShader, and then draw 11 cloud sprites. Then we draw a sun sprite. These transparent objects are rendered without writing to the depth buffer. Clouds and sun have trimmed geometries for less overdraw. You can read about this optimized sprites technique here. We decided not to use soft particles for clouds because scene size allowed us to place them so that they donβt intersect with other geometries while still partially occluding some peaks. Not using soft particles is beneficial for performance because they require additional render pass to render scene depth.
-
Rendering dunes terrain in WebGL
Historically, the web demo was created first β it was used as a prototyping playground to compose a scene and to fine-tune shaders. Also, this really helps in sharing work between a team of two people without necessity to learn Android Studio for both. And when everything was polished and looked good enough, an Android app was created quite fast based on the web demo code. Porting code to Android is a quite straightforward and easy process because our WebGL framework has the same method signatures as the framework used in Android apps.
webgl-dunes
-
Rendering dunes terrain in WebGL
To examine how objects are rendered, you can take a look at drawScene() method in DunesRenderer.ts β first we render depth map to texture (this is needed for soft particles), then render on-screen objects in front-to-back order (first closest and largest objects, then distant) to efficiently utilize z-buffer culling. Terrain in the scene is represented as a single square tile. Its polycount is reduced to 31k faces in order not to split geometry and to draw it with a single draw call. This polycount produces a reasonably good quality. However, its area is not quite large enough to create a feel of infinite sand desert β when the camera is placed slightly above terrain boundaries of square terrain its limits are clearly visible:
What are some alternatives?
engine - Fast and lightweight JavaScript game engine built on WebGL and glTF
pdx-tools - View maps, graphs, and tables of your save and compete in a casual, evergreen leaderboard of EU4 achievement speed runs. Upload and share your save with the world.
webgl-mountains - Icelandic terrain with different times of day.
L7 - π Large-scale WebGL-powered Geospatial Data Visualization analysis engine.
curtainsjs - curtains.js is a lightweight vanilla WebGL javascript library that turns HTML DOM elements into interactive textured planes.
TimeChart - An chart library specialized for large-scale time-series data, built on WebGL.
LayaAir - LayaAir is a fully platform rendering engine with rich 2D/3D rendering capabilities and a mature integrated development platform
terra - WebGL grass on a terrain
streets-gl - πΊ OpenStreetMap 3D renderer powered by WebGL2