7658210da4
Fix an off by one bug... the tests didn't catch this one :\
2018-11-10 17:43:10 -05:00
63cad2404c
Expand the map calls to help with debugging
2018-11-10 17:42:42 -05:00
47df42c8e5
Add a basic Queue data structure
...
Implemented as a linked list.
2018-11-10 17:42:23 -05:00
4e4b6b9bca
Render the terrain
2018-11-10 17:08:24 -05:00
4a236bf6d6
Instantiate a DiamondSquare generator
2018-11-10 17:06:14 -05:00
5233a94fec
Oops fix my algorithm and update the tests
2018-11-10 17:05:54 -05:00
359c7ef987
Rename DiamondSquareAlgorithm -> DiamondSquareGenerator
2018-11-10 16:05:30 -05:00
dce01100cc
Complete migrating the algorithm implementation to the Algorithm object
2018-11-10 16:03:53 -05:00
e50a36f7d1
Test point->index conversion
2018-11-10 16:03:38 -05:00
045842c20a
Tests for diamondCorners and a lot of debugging
2018-11-10 15:33:12 -05:00
6b6e317a9c
Make Point and Size honest to goodness structs
2018-11-10 13:50:28 -05:00
5607f01ac1
Finish renaming algorithm -> generator
...
Xcode missed some
2018-11-10 13:22:01 -05:00
a58241cd13
Rename Algorithm -> TerrainGenerator
2018-11-10 13:16:22 -05:00
c62ae41fc0
Tests for side midpoints; move BFS test to BoxTests
2018-11-10 12:54:34 -05:00
48425d5cb8
Tests for breadth first search
2018-11-10 12:47:04 -05:00
8d6c48466b
Remove all the explicit type names from the tests
2018-11-10 10:40:44 -05:00
25abb91476
Move BFS stuff to use the new helper method
2018-11-10 10:40:29 -05:00
cd48797fa9
Fix the build; test box subdivisions
2018-11-10 10:30:07 -05:00
8e2a873edf
Move shader files to Shaders group
2018-11-10 09:54:17 -05:00
cce59a45dc
Get down an initial diamond-squares implementation
2018-11-10 09:53:37 -05:00
a390cbc584
Add unit test target for Terrain2
2018-11-08 20:19:31 -05:00
7343f0a83a
Wrap algorithm iteration flag in a semaphore
2018-11-07 17:11:30 -05:00
1a5ed92c14
Regeneration on ever 'n' now, but it gets scheduled on every frame in that semaphore group
2018-11-07 17:05:28 -05:00
11b9cba8ac
Add a Uniform object for RandomAlgorithm
...
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...
2018-11-07 16:47:07 -05:00
76f0065d8b
Generate some pseudo-random numbers with a PRNG class in the shaders.
2018-11-04 22:30:06 -05:00
bd9cba2886
Get rid of an unused static let
2018-11-04 14:26:15 -05:00
8ffb0a1cfe
Generate terrain on a keypress
2018-11-04 14:19:02 -05:00
55a134882d
Proof of concept for Algorithm objects
...
Next up compute kernel dispatch!
2018-11-04 13:44:47 -05:00
96730ecd41
Use a fixed size 512x512 texture for the height map
...
This will make implementing other algorithms easier. :D
2018-11-04 11:34:25 -05:00
af5e5a6123
Generate some random heights to fill the height map texture and ... it works!
2018-11-04 08:25:01 -05:00
18e9d078b0
TODO
2018-11-04 08:07:17 -05:00
4803620d4b
Read texture data from the heights texture
2018-11-04 08:06:48 -05:00
753e8eb311
Give the grid coordinate vertex attribute a nice name
2018-11-03 16:35:46 -04:00
d4d4a0a7ba
Attach height texture to vertex shader
2018-11-03 16:35:23 -04:00
a5d08d6974
Over-zealous multiline edit
2018-11-03 16:26:55 -04:00
f1517a2166
Rename an unnecessarily long variable
2018-11-03 16:25:57 -04:00
dac8f24568
Add grid coordinate argument encoding stuff and a texture to hold heights
2018-11-03 16:25:19 -04:00
a5c86f9c31
Doc comments!
2018-11-03 16:02:35 -04:00
5fa89d1e47
Extract Terrain into its own class
2018-11-03 15:59:11 -04:00
ee2431d9c4
Fix Terrain2's build
2018-11-03 15:44:10 -04:00
bf6cd3ca15
Take another stab at getting Terrain to render, but no :(
2018-11-03 15:44:02 -04:00
dc179036dc
Render a plane in Terrain2 instead of a box
2018-11-03 15:43:47 -04:00
a771c2622a
Create Terrain2 app, using Xcode's boilerplate
2018-11-03 15:15:03 -04:00
df0a4ca6fc
Explicitly link Metal and MetalKit
2018-11-03 15:08:01 -04:00
a311423cb1
Strip down shaders to their most basic forms
2018-11-03 15:07:32 -04:00
dff9e5d3bf
Terrain grid goes between -1 and 1
2018-11-03 15:07:21 -04:00
49783610e7
In the name of debugging, use a smaller grid and make more local vars
2018-11-03 15:07:03 -04:00
3ce38b4b8b
Move all Metal setup to the Renderer
2018-11-03 15:06:30 -04:00
e18a956875
Create the TerrainVC in the xib
2018-11-03 15:05:27 -04:00
35ed423144
Remove alpha render attachment stuff
2018-11-03 14:23:45 -04:00