Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_fire_frag.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fc9cafb6b024ff395b76dcdef265b0d40c3fc062 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

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;
}