From 4cc46ae71a503dd47ef227e599cc7ae839f0b1e6 Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 7 Dec 2022 10:00:15 +0000 Subject: [PATCH] README: make this file-path a link --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index af9b863..9220ddb 100644 --- a/README.md +++ b/README.md @@ -224,7 +224,8 @@ pub trait Material: Sized { to add a new material: - for `CpuBackend` simulations: just implement this trait on your own type and instantiate a `SpirvSim` specialized over that material instead of `GenericMaterial`. -- for `WgpuBackend` simulations: do the above and add a spirv entry-point specialized to your material. scroll to the bottom of `crates/spirv_backend/src/lib.rs` and follow the examples. +- for `WgpuBackend` simulations: do the above and add a spirv entry-point specialized to your material. scroll to the bottom of +[crates/spirv_backend/src/lib.rs](crates/spirv_backend/src/lib.rs) and follow the examples. as can be seen, the Material trait is fairly restrictive. its methods are immutable, and it doesn't even have access to the entire cell state (only the cell's M value, during `move_b_vec`). i'd be receptive to a PR or request that exposes more cell state or mutability: this is just an artifact of me tailoring this specifically to the class of materials i intended to use it for.