Skip to content

Conversation

@asvarga
Copy link

@asvarga asvarga commented Apr 13, 2021

Instead of Update both reading and writing from TrailMap, it now reads from DiffusedTrailMap and writes to TrailMap. This seems to avoid concurrency issues because it fixes #2 (at least for me).

@asvarga
Copy link
Author

asvarga commented Apr 14, 2021

Two things worth noting:

  • Executions of TrailMap[int2(newPos)] = min(1, oldTrail + agent.speciesMask * trailWeight * deltaTime); in Update commute, so we don't have to worry about race conditions there.
  • Diffuse does exactly one write to DiffusedTrailMap per pixel, so we don't have to do any other clears/copies.

@asvarga asvarga marked this pull request as draft April 14, 2021 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't run project in unity 2020.3.2f1

1 participant