opencl has no rand, SO rand method to make fog a little better

This commit is contained in:
MitchellHansen
2016-09-05 00:24:26 -07:00
parent 6f5d2b2f6f
commit e1080baab0
2 changed files with 8 additions and 51 deletions

View File

@@ -14,7 +14,7 @@ public:
for (int x = 0; x < dim.x / 10; x++) {
for (int y = 0; y < dim.y / 10; y++) {
for (int z = 0; z < dim.z / 10; z++) {
for (int z = 0; z < dim.z; z++) {
if (rand() % 1000 < 1)
list[x + dim.x * (y + dim.z * z)] = rand() % 6;
}