Merge remote-tracking branch 'origin/master' into blender2.8
This commit is contained in:
@@ -8,10 +8,17 @@ uniform float density_scale;
|
||||
uniform sampler3D soot_texture;
|
||||
uniform sampler3D shadow_texture;
|
||||
|
||||
#ifdef USE_COBA
|
||||
uniform sampler1D transfer_texture;
|
||||
uniform sampler3D color_band_texture;
|
||||
#endif
|
||||
|
||||
void main()
|
||||
{
|
||||
/* compute color and density from volume texture */
|
||||
vec4 soot = texture3D(soot_texture, coords);
|
||||
|
||||
#ifndef USE_COBA
|
||||
vec3 soot_color;
|
||||
if (soot.a != 0) {
|
||||
soot_color = active_color * soot.rgb / soot.a;
|
||||
@@ -31,6 +38,11 @@ void main()
|
||||
|
||||
/* premultiply alpha */
|
||||
vec4 color = vec4(soot_alpha * soot_color, soot_alpha);
|
||||
#else
|
||||
float color_band = texture3D(color_band_texture, coords).r;
|
||||
vec4 transfer_function = texture1D(transfer_texture, color_band);
|
||||
vec4 color = transfer_function * density_scale;
|
||||
#endif
|
||||
|
||||
gl_FragColor = color;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user