Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
/* Based on Frosbite Unified Volumetric.
* https://www.ea.com/frostbite/news/physically-based-unified-volumetric-rendering-in-frostbite */
/* Step 4 : Apply final integration on top of the scene color.
* Note that we do the blending ourself instead of relying
* on hardware blending which would require 2 pass. */
uniform sampler2D inSceneColor;
uniform sampler2D inSceneDepth;
out vec4 FragColor;
void main()
{
vec2 uvs = gl_FragCoord.xy / vec2(textureSize(inSceneDepth, 0));
vec4 scene_color = texture(inSceneColor, uvs);
float scene_depth = texture(inSceneDepth, uvs).r;
FragColor = volumetric_resolve(scene_color, uvs, scene_depth);
}