Skip to main content
GameDev.net gamedev.net
Developer Blog

This is a developer's personal perspective or experience. Views expressed are those of the author.

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Red Blob Games
Red Blob Games Blog
11 months ago

Mapgen4's use of WebGL2

Briefing

The recent update to Mapgen4 showcases a transition to WebGL2, primarily to streamline the rendering process. Although the implementation of Vertex Array Objects and gl_VertexID offered some efficiency, the real challenge lay in the texture formats. The switch to R16F for elevation and depth textures revealed issues with blending that affected visual fidelity, particularly in mountainous areas.

Developers should take note of the complexities involved in graphics programming, especially when rewriting existing code. The article serves as a reminder that while new technologies can offer advantages, they can also introduce unexpected challenges. Understanding these trade-offs is crucial for creating visually appealing and technically sound graphics in game development.

“I enjoyed the graphics rewrite. I found lots of places for improvement.”

— Mapgen4 Developer · Reflecting on the benefits of the rewrite.
Original source
Read on Red Blob Games
At a glance
what
Mapgen4 transitioned to WebGL2 for rendering improvements.
who
Red Blob Games is the developer behind Mapgen4.
impact
The changes affect how elevation and depth textures are handled.
context
Highlights the complexities of graphics programming and encoding.
Signal Mixed

The rewrite led to minor improvements but introduced new visual issues.

Discuss

Discussion

Loading comments...

Recommended resources

Graphics Programming Resources

See full guide
Real-Time Rendering, Fourth Edition cover
Editor pick Community pick

Real-Time Rendering, Fourth Edition

Amazon · Book

Real-Time Rendering combines fundamental principles with guidance on the latest techniques to provide a complete reference on three-dimensional interactive computer graphics. It will help you increase speed and improve image quality and learn the features and limitations of acceleration algorithms and graphics APIs. This latest fourth edition has been updated to include a chapter on virtual reality and augmented reality and covers new topics such as visual appearance, global illumination, and curves and curved surfaces. It is for anyone serious about computer graphics who wants to learn about algorithms that create synthetic images fast enough that the viewer can interact with a virtual environment.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.

Programming with wgpu in Rust cover
Editor pick

Programming with wgpu in Rust

Amazon · Book

Unlock the full power of modern graphics programming with wgpu and Rust. This comprehensive guide takes you from foundational GPU concepts to advanced real-time rendering and compute techniques—equipping you to build fast, safe, and cross-platform graphics applications. Written for intermediate to advanced Rust developers, this book provides clear explanations, hands-on examples, and detailed insights into how GPUs process and render data. You’ll explore everything from the fundamentals of buffers, shaders, and pipelines to advanced topics like deferred rendering, shadow mapping, and GPU compute workloads.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.

GameDev.net may earn a commission if you purchase through these links. This helps fund the site at no extra cost to you.