<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/analytic-fog-rendering-with-volumetric-primitives-d5urdkooj" -->

---
title: Analytic Fog Rendering With Volumetric Primitives
description: A deep-dive into analytic fog rendering using volumetric primitives with varying density. Covers the Beer-Lambert Law, heterogeneous volumes, and the...
canonical: https://daily.dev/posts/analytic-fog-rendering-with-volumetric-primitives-d5urdkooj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Analytic Fog Rendering With Volumetric Primitives | daily.dev
og:description: A deep-dive into analytic fog rendering using volumetric primitives with varying density. Covers the Beer-Lambert Law, heterogeneous volumes, and the...
og:url: https://daily.dev/posts/analytic-fog-rendering-with-volumetric-primitives-d5urdkooj
og:image: https://api.daily.dev/og/posts/D5URDkOOj.png
og:image:alt: Analytic Fog Rendering With Volumetric Primitives
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytic Fog Rendering With Volumetric Primitives

**[Hacker News](https://daily.dev/sources/hn)** · 10 min read · 0 upvotes · 0 comments

## Summary

A deep-dive into analytic fog rendering using volumetric primitives with varying density. Covers the Beer-Lambert Law, heterogeneous volumes, and the limitations of ray-marching. Derives closed-form antiderivatives for five radial density functions (linear, quadratic, quartic, spiky, and Gaussian) to compute transmittance along a ray without numerical integration. Includes GLSL-style code snippets for each function and links to a Shadertoy implementation. Also briefly discusses lighting hacks, particle system integration, and boolean CSG operations for fog-of-war effects.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://matejlou.blog/2025/02/11/analytic-fog-rendering-with-volumetric-primitives/>

## Similar posts on daily.dev

- [A series of tricks and techniques I learned doing tiny GLSL demos](https://daily.dev/posts/a-series-of-tricks-and-techniques-i-learned-doing-tiny-glsl-demos-hwkufqxor) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#game-development](https://daily.dev/tags/game-development), [#graphics-programming](https://daily.dev/tags/graphics-programming)

[View this post on daily.dev](https://daily.dev/posts/analytic-fog-rendering-with-volumetric-primitives-d5urdkooj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Analytic Fog Rendering With Volumetric Primitives","url":"https://daily.dev/posts/analytic-fog-rendering-with-volumetric-primitives-d5urdkooj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/analytic-fog-rendering-with-volumetric-primitives-d5urdkooj"},"datePublished":"2026-03-07T02:04:55.351Z","dateModified":"2026-03-07T02:05:34.656Z","description":"A deep-dive into analytic fog rendering using volumetric primitives with varying density. Covers the Beer-Lambert Law, heterogeneous volumes, and the...","image":"https://i0.wp.com/matejlou.blog/wp-content/uploads/2025/02/screenshot-2025-02-05-at-16.46.07-edited.png?fit=1200%2C882&ssl=1","thumbnailUrl":"https://i0.wp.com/matejlou.blog/wp-content/uploads/2025/02/screenshot-2025-02-05-at-16.46.07-edited.png?fit=1200%2C882&ssl=1","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/analytic-fog-rendering-with-volumetric-primitives-d5urdkooj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"game-development,graphics-programming","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Analytic Fog Rendering With Volumetric Primitives"}]}
```

