d3298f11a7
Rename unforms -> geometryUniforms
2018-11-22 08:30:19 -07:00
907a0845a7
Factor out per-frame stuff into a PerFrameObject<T> class; use it for the rendering Uniforms
2018-11-22 08:29:14 -07:00
65ffec18e9
A couple small random tweaks while I play with lighting
2018-11-22 08:12:15 -07:00
30d7386805
Tweak lighting and material
2018-11-22 08:11:49 -07:00
5584e2eb37
Move math functions to Math module
2018-11-22 08:11:30 -07:00
18f8c141af
Disable normals; remove dead code
2018-11-21 22:11:03 -07:00
91c92c9675
Rewrite lighting shader to use Light and Material objects
2018-11-21 22:10:03 -07:00
023d50a791
Remove colorMap texture
2018-11-21 09:06:01 -07:00
4d61d05f4d
A few misc cleanup things
...
- Render normals every frame for now
- Pass 3x3 normal matrix as the top-left 3x3 submatrix of the viewModel matrix
- Slightly darken the light
2018-11-20 17:31:18 -07:00
08094b4302
Toggle rendering normals with 'n'; move Next iteration key to 'space'
2018-11-20 17:24:02 -07:00
296af144ce
Get face normals rendering
2018-11-20 17:13:31 -07:00
f28e6e08df
Clean up some logging
2018-11-20 16:22:43 -07:00
a02726404c
Pass in the faceNormals
2018-11-20 11:24:43 -07:00
952204a5b6
Pass the normal matrix through and multiply the normal by it
2018-11-20 11:24:28 -07:00
e99cd03446
Adjust segments of terrain
2018-11-20 11:02:49 -07:00
97c31c7548
Add normalMatrix uniform
2018-11-20 11:01:46 -07:00
c3cc0c7fe4
Render normals at each vertex
2018-11-19 13:17:06 -07:00
7ff2d3ed6e
Move terrain update encoding to Terrain type
2018-11-19 10:53:33 -07:00
db1b0185e2
Parameterize dimensions and segments
2018-11-19 10:22:46 -07:00
e56f94dc56
Fix up indentation
2018-11-18 21:17:52 -07:00
2b2539d7df
Implement progress tracking
2018-11-18 21:15:20 -07:00
f0d6177567
Move the render queue to the Diamond-Square object
2018-11-11 22:13:10 -05:00
e62dd1b0f2
Work in the normal calculations
2018-11-11 21:04:03 -05:00
f6f01b6419
Toggle filled and lines mode with z key
2018-11-11 20:34:04 -05:00
dc3de77a59
Debug modifying the geometry
...
packed_float3 != float3 ¯\_(ツ)_/¯
2018-11-11 20:16:08 -05:00
3462fa2458
Update heights of plane geometry in a shader kernel
2018-11-11 19:50:43 -05:00
cb16b84ab9
Dispatch the Diamond-Square render pass onto a worker queue to keep the main thread free
2018-11-10 20:57:23 -05:00
4e4b6b9bca
Render the terrain
2018-11-10 17:08:24 -05:00
5607f01ac1
Finish renaming algorithm -> generator
...
Xcode missed some
2018-11-10 13:22:01 -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
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
d4d4a0a7ba
Attach height texture to vertex shader
2018-11-03 16:35:23 -04:00
5fa89d1e47
Extract Terrain into its own class
2018-11-03 15:59:11 -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