Commit graph

124 commits

Author SHA1 Message Date
b26bec76da Fix the normals!!1! 2018-11-26 17:26:09 -08:00
5d3276ab03 Playin with the camera an the roughness 2018-11-26 08:37:53 -08:00
1a32b8e085 Don't recurse to size 2; only average corner of particular side you're on
The former makes things so much faster. omg.
2018-11-26 08:36:53 -08:00
240499ced8 Reduce randomness spread every time Diamond-Squre reduces the grid size 2018-11-23 13:18:05 -07:00
ac7ae15ceb Make sure we dispatch a height update for every vertex 2018-11-23 13:17:27 -07:00
9c4163909c Finally clean up this warning 2018-11-23 10:27:10 -07:00
c71a4c4b66 Redo all the lighting code -- still not great :\ 2018-11-23 10:25:31 -07:00
8917289c05 Split out algorithms into separate files 2018-11-23 09:52:15 -07:00
c3432af621 Remove updateNormals() call 2018-11-23 09:37:57 -07:00
4e848091bb Soften the Diamond-Square roughness 2018-11-23 09:20:18 -07:00
54bb20feef Fix the shimmering 2018-11-23 09:19:51 -07:00
b314738ccb 35mm camera 2018-11-23 09:19:39 -07:00
6262fc924d Show surfaces by default now 2018-11-23 08:59:52 -07:00
552864eb09 Plug in an MDLCamera in place of hard coded transforms 2018-11-23 08:59:12 -07:00
44b5f46c9a These are the default render parameters 2018-11-23 08:15:37 -07:00
e1ec7701ba Get the normals sorted out; enable lighting from multiple lights 2018-11-23 08:15:19 -07:00
a72309ec09 Fix the off-by-ones 2018-11-22 11:14:34 -07:00
6c0792fc9c Implement Emily's algorithm for computing vertex normals 2018-11-22 10:53:02 -07:00
3cd9aca62b Schedule the vertex normal update kernel 2018-11-22 09:35:01 -07:00
55e63cd2cc Pass through uniforms for normals, which means different colors for vertex and face normals! 2018-11-22 08:52:15 -07:00
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
cd9bf6c1a9 Move PRNG to Random.hh 2018-11-22 07:58:36 -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
2ef3781935 Move ShaderTypes.h to Shaders group 2018-11-21 09:11:24 -07:00
023d50a791 Remove colorMap texture 2018-11-21 09:06:01 -07:00
d72992c26f Add Light and Material objects to ShaderTypes.h 2018-11-21 08:58:31 -07:00
261a768ae5 Remove RandomGenerator 2018-11-21 08:57:59 -07:00
4e5dfcf20b Remove the Uniforms.c file 2018-11-21 08:42:17 -07:00
73d162337c Attempt to do Phong shading in the fragment shader 2018-11-21 08:19:41 -07:00
59697dbb51 Per-pixel shading in the fragment shader instead of per-vertex in the vertex shader 2018-11-20 20:14:43 -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
ebac808683 Update tests to pass in progress objects 2018-11-20 11:02:33 -07:00
97c31c7548 Add normalMatrix uniform 2018-11-20 11:01:46 -07:00
55f7c6fe78 Add Math module and an extension to float4 to make a float3 2018-11-20 11:00:59 -07:00
43e42f5374 Get face normals updated 2018-11-19 21:52:53 -07:00
764b772fd9 Scale the normal line down 2018-11-19 21:34:44 -07:00
c3cc0c7fe4 Render normals at each vertex 2018-11-19 13:17:06 -07:00
bd696eac1c Write a quick pair of shaders for rendering normals 2018-11-19 11:27:21 -07:00
95fe543efc Fix progress accounting: make it out of 1 instead of out of 3 tasks 2018-11-19 10:57:10 -07:00