15 lines
No EOL
423 B
GLSL
15 lines
No EOL
423 B
GLSL
precision highp float;
|
|
precision highp int;
|
|
|
|
in vec2 vUv;
|
|
in float vIsCarryingFood;
|
|
in float vScentFactor;
|
|
in float vIsCellCleared;
|
|
in float vDepositMaterialId;
|
|
|
|
out vec4 FragColor;
|
|
|
|
void main() {
|
|
// encode deposit material ID in alpha: divide by 255 to fit in UnsignedByte channel
|
|
FragColor = vec4(vIsCarryingFood * vScentFactor, (1. - vIsCarryingFood) * vScentFactor, vIsCellCleared, vDepositMaterialId / 255.);
|
|
} |