This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/gpu/shaders/gpu_shader_fire_frag.glsl

16 lines
296 B
GLSL
Raw Normal View History

2017-05-17 10:46:42 +10:00
in vec3 coords;
out vec4 fragColor;
uniform sampler3D flame_texture;
uniform sampler1D spectrum_texture;
void main()
{
float flame = texture(flame_texture, coords).r;
vec4 emission = texture(spectrum_texture, flame);
fragColor.rgb = emission.a * emission.rgb;
fragColor.a = emission.a;
}