summaryrefslogtreecommitdiff
path: root/util.c
Commit message (Collapse)AuthorAgeFilesLines
* replace f?(min|max) functions with type-agnostic macros.rodri2024-08-271-24/+0
| | | | | this simplifies the code and serves as another shadeop to use on application shaders.
* fix a double-free. add a generic value-swapping macro.rodri2024-08-051-20/+0
|
* make the depth buffer 32-bit.rodri2024-08-041-2/+2
|
* implement pixel art upscaling filters scale[23]x. tidy up some code.rodri2024-07-161-4/+13
|
* fix the geometry glitches when moving things around.rodri2024-07-131-0/+15
| | | | | | | | | | it's possible for interactive programs to keep updating the geometry of the scene during rendering, which caused primitives to look deformed or shattered in the final image. to avoid this we take a snapshot of the current state of things (scene and camera), and render based on that copy.
* add spotlight params and a light color shading routine. other things.rodri2024-06-101-0/+12
| | | | | | among these other things are clamping the color channels to [0,1] internally, and adding a modulation function for mixing colors/points.
* add a general primitive with support for points, lines and triangles.rodri2024-05-031-0/+20
| | | | | | | | also got rid of the dependency on OBJ for the entire renderer, instead letting the user load a Model from any given OBJ. this modularity will allow for other formats to be used in the same way, relying on a single, internal representation for the entire pipeline.
* can't always rely on screen being there.rodri2024-04-011-1/+1
|
* improve coordinate transformations and fix projections.rodri2024-01-311-54/+0
| | | | | also got rid of Deco. there's no point in having that, just deal with image(6) files.
* import the new renderer and clean things up.rodri2024-01-301-0/+108
i integrated the renderer i've been developing on the tinyrend repo and got rid of a bunch of stuff that's no longer necessary. also began structuring things to fit the new interface i have in mind. there are still some artifacts with the projection xforms that cause issues with clipping and division by zero.