A couple small random tweaks while I play with lighting

This commit is contained in:
Eryn Wells 2018-11-22 08:12:15 -07:00
parent 30d7386805
commit 65ffec18e9
3 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ let alignedUniformsSize = (MemoryLayout<Uniforms>.size & ~0xFF) + 0x100
let maxBuffersInFlight = 3
let terrainDimensions = float2(10, 10)
let terrainSegments = uint2(20, 20)
let terrainSegments = uint2(5, 5)
enum RendererError: Error {
case badVertexDescriptor

View file

@ -47,7 +47,7 @@ kernel void updateGeometryNormals(constant packed_float3 *meshPositions [[buffer
float3 side2 = v1 - v3;
float3 normal = normalize(cross(side1, side2));
faceNormals[tid] = normal;
faceMidpoints[tid] = 0.3333333333 * (v1 + v2 + v3);
faceMidpoints[tid] = (1.0 / 3.0) * (v1 + v2 + v3);
}
kernel void updateGeometryVertexNormals()

View file

@ -108,7 +108,7 @@ class Terrain: NSObject {
print("Couldn't create algorithm")
return nil
}
(gen as DiamondSquareGenerator).roughness = 0.075
gen.roughness = 0.2
generator = gen
do {