This object contains several random numbers for the GPU kernel to use when generating random points. This isn't right yet (there are still patterns in the generated data) but it's time to move on...
16 lines
379 B
Objective-C
16 lines
379 B
Objective-C
//
|
|
// Uniforms.c
|
|
// Terrain2
|
|
//
|
|
// Created by Eryn Wells on 11/6/18.
|
|
// Copyright © 2018 Eryn Wells. All rights reserved.
|
|
//
|
|
|
|
#include <stdio.h>
|
|
#include "ShaderTypes.h"
|
|
|
|
void RandomAlgorithmUniforms_refreshRandoms(RandomAlgorithmUniforms *uniforms) {
|
|
for (int i = 0; i < kRandomAlgorithmUniforms_RandomCount; i++) {
|
|
uniforms->randoms[i] = arc4random();
|
|
}
|
|
}
|