blob: 45f86e036a1327b0a5f5e26e2b128ea0ad7d123c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#if __VERSION__ == 120
varying vec3 coords;
#define fragColor gl_FragColor
#else
in vec3 coords;
out vec4 fragColor;
#define texture1D texture
#define texture3D texture
#endif
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;
}
|