diff --git a/src/shaders/world.frag b/src/shaders/world.frag index fae319b..a2a19a4 100644 --- a/src/shaders/world.frag +++ b/src/shaders/world.frag @@ -22,5 +22,11 @@ void main() { materialId = float(MAT_AIR); } + // ant deposited material at this cell (only into air cells) + int depositMatId = int(round(discreteAnts.w * 255.)); + if (depositMatId > 0 && int(materialId) == MAT_AIR) { + materialId = float(depositMatId); + } + FragColor = vec4(materialId, scentToHome, scentToFood, repellent); }