Age | Commit message (Collapse) | Author |
|
should_draw_expire_if_oob() assumed the fragment represented the entire
frame. Instead, return 0 if the coordinates are outside the fragment,
but only reset longevity if outside of the frame.
If sparkler goes threaded in the drawing, this would result in threads
simply skipping particles outside the fragment. The longevity reset
occurring in all threads appears suspicious but should be benign since
they all write the same thing - 0.
|
|
|
|
The burst particle abused a zero mass to circumvent the effects of aging.
Instead use an explicit virtual flag to suppress aging, change busrt_cb
to ignore all virtual particles instead of only its center. Previously
burst_cb would thrust other bursts like any other particle, and this was
incorrect. Now burst centers are always stationary, even when they overlap
other bursts.
|
|
|
|
|
|
|
|
introduces create_context() and destroy_context() methods, and adds a
'void *context' first parameter to the module methods.
If a module doesn't supply create_context() then NULL is simply passed
around as the context, so trivial modules can continue to only implement
render_fragment().
A subsequent commit will update the modules to encapsulate their global
state in module-specific contexts.
|
|
Now that rototiller is generally threaded when a prepare_frame() method is
supplied, and modules/ray has been updated accordingly, discard the now
redundant ray-specific threading code and related stuff.
|
|
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.
|
|
Same basic changes as the previous commits made to julia and plasma.
|
|
Same general procedure as the previous commit made to the julia module.
|
|
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.
|
|
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.
|
|
Adding more context to the name in anticipation of adding a prepare_frame()
method to the module struct.
|
|
Make consistent with the source directory structure naming.
|
|
|
|
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...
|
|
Was a constant at 20, this allows it to be specified per-object.
|
|
Make spheres a little more diverse in terms of specular/diffusion,
and minor tweak to the plane color.
|
|
|
|
Make the camera orbit around the origin at a varying radius, with kept aimed
facing the origin, with some vertical sweep+tilt thrown in.
|
|
This is unoptimized, with a palette slapped together in vim, but still
pretty neat!
|
|
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.
|
|
Leftover from debugging presumably
|
|
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.
|
|
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.
|
|
|
|
sparkler and stars both cleared fragments and drew individual pixels into fragments, add that functionality to fb.h and cleanup sparkler and stars accordingly.
|
|
|
|
|
|
drop draw_pixel() duplication
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
Restoring some organizational sanity since adopting autotools.
|