https://github.com/wernerdinges/pixel-dithering
OpenGL pixelized fog
https://github.com/wernerdinges/pixel-dithering
3d dithering-algorithms gamedev opengl
Last synced: about 2 months ago
JSON representation
OpenGL pixelized fog
- Host: GitHub
- URL: https://github.com/wernerdinges/pixel-dithering
- Owner: WernerDinges
- License: mit
- Created: 2025-04-06T18:16:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-06T18:52:35.000Z (about 1 year ago)
- Last Synced: 2025-04-06T19:26:49.698Z (about 1 year ago)
- Topics: 3d, dithering-algorithms, gamedev, opengl
- Language: C
- Homepage:
- Size: 441 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenGL Fog Dithering
This is an example of a raymarching rendering that implements fog pixelization (dithering).




## How does it work
To see the full code, see the [shader](https://github.com/WernerDinges/Pixel-fog/blob/main/resources/shaders/test.fs).
It is assumed that the reader is already familiar with the principle of raymarching.
By taking steps, the beam accumulates fog factor.
For each pixel in the Bayer matrix, a threshold is calculated, above which the clouding coefficient turns the pixel completely dark, otherwise - completely light.
Additionally, subtle white noise was applied for decorative purposes.