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: 025cb0ee6e44772b728671aad16a31ce1cc13d6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

in vec3 coords;
out vec4 fragColor;
#define texture1D texture
#define texture3D texture

uniform sampler3D flame_texture;
uniform sampler1D spectrum_texture;

void main()
{
	float flame = texture3D(flame_texture, coords).r;
	vec4 emission = texture1D(spectrum_texture, flame);

	vec4 color;
	color.rgb = emission.a * emission.rgb;
	color.a = emission.a;

	fragColor = color;
}