You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`removeIstanbulCoverage`: Boolean. For testing and code coverage. Removes istanbul artifacts that were injected at testing runtime.
156
177
157
178
## `gpu.createKernel` Settings
158
179
Settings are an object used to create a `kernel` or `kernelMap`. Example: `gpu.createKernel(settings)`
@@ -712,6 +733,9 @@ const matMult = gpu.createKernel(function(a, b) {
712
733
[Pipeline](https://en.wikipedia.org/wiki/Pipeline_(computing)) is a feature where values are sent directly from kernel to kernel via a texture.
713
734
This results in extremely fast computing. This is achieved with the kernel setting `pipeline: boolean` or by calling `kernel.setPipeline(true)`
714
735
736
+
### Cloning Textures **New in V2!**
737
+
When using pipeline mode the outputs from kernels can be cloned using `texture.clone()`.
738
+
715
739
```js
716
740
constkernel1=gpu.createKernel(function(v) {
717
741
return v[this.thread.x];
@@ -891,13 +915,14 @@ This is a list of the supported ones:
891
915
*`Math.min()`
892
916
*`Math.pow()`
893
917
*`Math.random()`
894
-
* A note on random. We use [a plugin](src/plugins/triangle-noise.js) to generate random.
918
+
* A note on random. We use [a plugin](src/plugins/math-random-uniformly-distributed.js) to generate random.
895
919
Random seeded _and_ generated, _both from the GPU_, is not as good as random from the CPU as there are more things that the CPU can seed random from.
896
920
However, we seed random on the GPU, _from a random value in the CPU_.
897
921
We then seed the subsequent randoms from the previous random value.
898
922
So we seed from CPU, and generate from GPU.
899
923
Which is still not as good as CPU, but closer.
900
924
While this isn't perfect, it should suffice in most scenarios.
925
+
In any case, we must give thanks to [RandomPower](https://www.randompower.eu/), and this [issue](https://github.com/gpujs/gpu.js/issues/498), for assisting in improving our implementation of random.
0 commit comments