summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-04-22ray: convert to generalized threaded renderingVito Caputo
The ray tracer was already threaded, so this required little change other than making some state global like the previous commits, and calling the underlying non-threaded single-fragment scene renderer function. A future commit will discard the now vestigial ray_threads related code.
2017-04-22roto: enable threaded renderingVito Caputo
Same basic changes as the previous commits made to julia and plasma.
2017-04-22plasma: enable threaded renderingVito Caputo
Same general procedure as the previous commit made to the julia module.
2017-04-22julia: enable threaded renderingVito Caputo
Move maintenance of per-frame variables into julia_prepare_frame(), which requires making them static file-scope globals for now. Also make minor adjustments to the code to make less assumptions about the fragment being rendered (like it's x/y coordinates being 0, etc.) A future commit will probably add an initializer function to rototiller_module_t, with an opaque pointer output which will be fed to all the module methods so these globals can be encapsulated and instantiated.
2017-04-22rototiller: add threaded renderingVito Caputo
This is a simple worker thread implementation derived from the ray_threads code in the ray module. The ray_threads code should be discarded in a future commit now that rototiller can render fragments using threads. If a module supplies a prepare_frame() method, then it is called per-frame to prepare a rototiller_frame_t which specifies how to divvy up the page into fragments. Those fragments are then dispatched to a thread per CPU which call the module's rendering function in parallel. There is no coupling of the number of fragments in a frame to the number of threads/CPUs. Some modules may benefit from the locality of tile-based rendering, so the fragments are simply dispatched across the available CPUs in a striped fashion. Helpers will be added later to the fb interface for tiling fragments, which modules desiring tiled rendering may utilize in their prepare_frame() methods. This commit does not modify any modules to become threaded, it only adds the scaffolding.
2017-04-22rototiller: add prepare_frame & rototiller_frame_tVito Caputo
Undecided on wether rototiller_frame_t should be fb_frame_t or not, may change later.
2017-04-22fb: add frame_{width,height} to fb_fragment_tVito Caputo
Modules need to know the overall dimensions of the frame the fragment they're rendering is part of. Previously it wasn't really necessary since the fragments supplied to the modules had always been the full page, but that's changing. This commit also changes the julia module to use the frame dimensions, others will need updating as well.
2017-04-22*: /render/render_fragment/ in rototiller_module_tVito Caputo
Adding more context to the name in anticipation of adding a prepare_frame() method to the module struct.
2017-04-21*: s/renderer/module/gVito Caputo
Make consistent with the source directory structure naming.
2017-04-21sparkler: remove vestigial draw.h from Makefile.amVito Caputo
2017-02-14ray: increase highlight exponent on shiny sphereVito Caputo
The highlight on the little green sphere was white-washing the entire thing due to its high specular reflection value. This produces more reasonable results...
2017-02-14ray: add highlight exponent to ray_surface_tVito Caputo
Was a constant at 20, this allows it to be specified per-object.
2017-02-12ray: tweak surface propertiesVito Caputo
Make spheres a little more diverse in terms of specular/diffusion, and minor tweak to the plane color.
2017-02-12ray: update copyright yearsVito Caputo
2017-02-12ray: improve camera movementVito Caputo
Make the camera orbit around the origin at a varying radius, with kept aimed facing the origin, with some vertical sweep+tilt thrown in.
2017-02-12julia: add a morphing Julia set rendererVito Caputo
This is unoptimized, with a palette slapped together in vim, but still pretty neat!
2017-02-12ray: fixup ray_object_plane_intersects_ray() bugVito Caputo
We should only consider dot products > 0 as intersected, or >= something very close to 0 (epsilon). As-is resulted in planes moving with camera movement along the plane normal axis. Also fixes plane distance to be non-negative in the current scene.
2017-02-12ray: remove vestigial stdio.h includeVito Caputo
Leftover from debugging presumably
2017-02-10ray: implement all orders in ray_euler_basis()Vito Caputo
Originally I only implemented pitch->yaw->roll, and being new to all this didn't fully appreciate the limitation that resulted in. This adds all six permutations of pitch/yaw/roll, the scene must specify the desired order when setting up the camera with the euler angles, see the enum in ray_euler.h.
2017-02-09ray: remove redundant recursion depth incrementVito Caputo
trace_ray() bumps the depth, the reflection ray trace_ray() call just needs to propagate the depth variable not advance it as well. This was probably vestigial from early development and never got taken out. This does mean more reflections now, and correspondingly slower rendering, but it at least makes MAX_RECURSION_DEPTH accurate. The define can be changed if the performance is too bad.
2017-02-09ray: fix mistake in ray:sphere intersection mathVito Caputo
2017-02-08Consolidate fb_fragment_t interactionsVito Caputo
sparkler and stars both cleared fragments and drew individual pixels into fragments, add that functionality to fb.h and cleanup sparkler and stars accordingly.
2017-02-07plasma: add a plasma rendererVito Caputo
2017-02-03*: use fb_fragment_zero() instead of memset()Vito Caputo
2017-02-03fb: add fb_fragment_zero() helperVito Caputo
Currently just a memset wrapper... but maybe could get noop'd if the flipper thread started supporting pre-zeroing pages in its thread, just need a zeroed state in the fb page.
2017-02-03stars: use fb_fragment_put_pixel_unchecked()Vito Caputo
drop draw_pixel() duplication
2017-02-03sparkler: drop draw.hVito Caputo
2017-02-03sparkler: use fb.h put_pixel helpersVito Caputo
discards draw_pixel(), introduces helpers.h and a convenience function for bounds checking and oob extermination. Move makergb to helpers.h, draw.h gets removed in a later commit.
2017-02-03fb: add pixel drawing helpersVito Caputo
Modules seem to be duplicating this, just pull it into fb.h since we're already dependent on the fb.h abstractions in the modules. Slippery slope!
2017-02-03rototiller: extricate draw_pixel() bounds checkingVito Caputo
If a z-buffer is added these checks will need to be done independent from and prior to drawing. Also it's silly to makergb() pixels which can't be drawn.
2017-02-03fb: add fragment bounds checking helperVito Caputo
Simple x,y coordinate check
2017-01-18autotools: s#../../#@top_srcdir@/src#Vito Caputo
The relative path broke out-of-tree builds. Previously the following: $ mkdir /tmp/foo $ cd /tmp/foo $ ~/src/rototiller/configure $ make Would fail to compile unable to locate the headers in ~/rototiller/src This fixes it.
2017-01-18*: move source into src/ subdirVito Caputo
Restoring some organizational sanity since adopting autotools.
© All Rights Reserved