summaryrefslogtreecommitdiff
path: root/render.c
Commit message (Collapse)AuthorAgeFilesLines
...
* viewport: add a way to access front and back buffers.rodri2024-04-011-1/+1
|
* pass a Viewport in the Renderjob instead of a fb.rodri2024-03-261-2/+5
| | | | | do the frame buffer clearing and swapping as part of the rendering process, not within shootcamera.
* implement a (partially) concurrent pipeline.rodri2024-03-251-125/+186
|
* use the new libgeometry berp routines. add a frame counter to the camstats.rodri2024-03-211-2/+2
|
* pass material properties to the fshader.rodri2024-03-061-1/+1
| | | | | this way users can refer to per-surface material features when shading pixels.
* make the fshader return a Color instead of a Memimage. clean things up.rodri2024-03-061-20/+26
|
* add a texture sampler with nearest and bilinear routines.rodri2024-03-061-42/+58
| | | | | | pass the material reference along with the vertices. also implemented back-face culling, but it's disabled for now.
* add user-defined vertex attributes (varyings) and improve the interpolation ↵rodri2024-03-031-58/+47
| | | | code.
* have separate routines for drawing and memdrawing.rodri2024-02-271-1/+1
|
* interpolate every vertex attribute when clipping and during rasterization.rodri2024-02-251-21/+35
| | | | added parameters necessary to implement the Phong shading model.
* add initial support for OBJMaterial properties.rodri2024-02-211-9/+33
|
* pass an entire entity to the shader unit. fix a bug in cliptriangle.rodri2024-02-141-25/+21
| | | | | | | | | | an entity is passed instead of a model so we can access its frame of reference to perform the model-to-world transformation. the bug in cliptriangle was due to sd[01] being declared as static which, when rendering multiple entities, was causing d0 = d1, which led to division-by-zero.
* lay out the grounds for a scene renderer.rodri2024-02-131-126/+20
| | | | | | also fixed an issue with cliptriangle() where an entire tri would get discarded if all its vertices were outside the frustum.
* completed homogeneous clipping procedure.rodri2024-02-121-39/+60
|
* initial clipping implementation. (not fully working yet)rodri2024-02-101-67/+53
|
* load XRGB32 textures.rodri2024-02-081-6/+11
|
* implement perspective-correct attribute interpolation.rodri2024-02-071-13/+146
| | | | | | | | | also committing unfinished code for the clipping algorithm. references: - Kok-Lim Low, “Perspective-Correct Interpolation”, 2002 - https://www.scratchapixel.com/lessons/3d-basic-rendering/rasterization-practical-implementation/perspective-correct-interpolation-vertex-attributes.html - https://www.rose-hulman.edu/class/csse/csse351-abet/m10/triangle_fill.pdf, p. 23
* document part of the pipeline. prepare the grounds for triangle clipping.rodri2024-02-031-33/+81
|
* only create existing indices during quad triangulation.rodri2024-02-011-24/+32
|
* improve coordinate transformations and fix projections.rodri2024-01-311-20/+39
| | | | | also got rid of Deco. there's no point in having that, just deal with image(6) files.
* make the vertex shader process actual vertices.rodri2024-01-301-6/+3
|
* import the new renderer and clean things up.rodri2024-01-301-128/+291
| | | | | | | | | | | | 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.
* add a line clipping procedure based on the Liang-Barsky algorithm. (thanks ↵rodri2021-07-181-1/+63
| | | | jmi2k!)
* transcribe macros into actual functions. remove unused memdraw code.rodri2020-04-281-30/+22
|
* standalone version release.rodri2020-04-171-0/+135