| 1 |
// -*-C++-*- |
| 2 |
#version 120 |
| 3 |
|
| 4 |
// Based on model-ALS-base.frag, with one-liner addition |
| 5 |
// for mixing color with existing color. |
| 6 |
|
| 7 |
varying vec4 instanceColor; |
| 8 |
|
| 9 |
uniform sampler2D texture; |
| 10 |
|
| 11 |
void render_model_ALS_base(in vec4 texel); |
| 12 |
|
| 13 |
void main() |
| 14 |
{ |
| 15 |
vec4 texel = texture2D(texture, gl_TexCoord[0].st); |
| 16 |
|
| 17 |
// Mix instance color with default color |
| 18 |
texel.rgb = (1 - instanceColor.a) * texel.rgb + instanceColor.a * instanceColor.rgb; |
| 19 |
|
| 20 |
render_model_ALS_base(texel); |
| 21 |
} |
| 22 |
|