Skip to content

Latest commit

 

History

History

fix-fog

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Fix Fog

npm version npm version github twitter mastodon ko-fi

This changes the fog depth computation from camera space to world space. This improves the fog effect in VR, most noticeably in case of dense fog. It does this by changing some of the shader chunks of Three.js. For more details, read the dev log: A-Frame Adventures 02 - Fixing Fog

Checkout the example: Online Demo | Source

Usage

Load the script from npm or add the following script tag:

<script src="https://cdn.jsdelivr.net/npm/@fern-solutions/aframe-fix-fog/dist/fix-fog.umd.min.js"></script>

That's all, it will automatically update the shader chunks :-)