Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | implement pixel art upscaling filters scale[23]x. tidy up some code. | rodri | 2024-07-16 | 1 | -4/+2 |
| | |||||
* | enable culling and add a camera knob for it. | rodri | 2024-07-13 | 1 | -4/+5 |
| | |||||
* | fix the geometry glitches when moving things around. | rodri | 2024-07-13 | 1 | -71/+75 |
| | | | | | | | | | | 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. | ||||
* | small improvements. | rodri | 2024-07-12 | 1 | -6/+5 |
| | |||||
* | texture nomenclature changes. fb format RGBA → XRGB. | rodri | 2024-07-09 | 1 | -9/+9 |
| | | | | | | we are still doing alpha blending, so we use the X chan internally, but we don't care about it when (mem)drawing to the screen. | ||||
* | rough color space conversion implementation. | rodri | 2024-07-04 | 1 | -2/+2 |
| | | | | | | | | colors are now properly processed in linear RGB space for lighting, shading and blending. sRGB is assumed for any texture sampled and the destination framebuffer. it's not perfect, but it does the job for now. | ||||
* | render: don't overwrite the vertex colors with white. report alien prims. | rodri | 2024-06-16 | 1 | -3/+2 |
| | |||||
* | fix the barycoords routine to avoid reporting false degenerates. | rodri | 2024-06-14 | 1 | -1/+27 |
| | | | | added a normals buffer for debugging. | ||||
* | replace the Memimage color buffer with a ulong* one. some fixes. | rodri | 2024-06-13 | 1 | -30/+31 |
| | |||||
* | add spotlight params and a light color shading routine. other things. | rodri | 2024-06-10 | 1 | -4/+4 |
| | | | | | | among these other things are clamping the color channels to [0,1] internally, and adding a modulation function for mixing colors/points. | ||||
* | add cubemaps. | rodri | 2024-06-06 | 1 | -0/+1 |
| | |||||
* | add a tangent parameter for normal mapping, and a world2model xform. | rodri | 2024-06-04 | 1 | -5/+1 |
| | |||||
* | replace the Framebufctl's Lock with a QLock. | rodri | 2024-05-23 | 1 | -0/+1 |
| | | | | this provides fair scheduling, minimizing contention. | ||||
* | fix line rasterization. | rodri | 2024-05-21 | 1 | -6/+5 |
| | |||||
* | fix the perspective projection and add inverse xform functions. | rodri | 2024-05-20 | 1 | -112/+0 |
| | |||||
* | render: improve line raster (not fixed yet). also tag jobs with an id. | rodri | 2024-05-17 | 1 | -6/+7 |
| | |||||
* | clip: fix rectclipline. | rodri | 2024-05-03 | 1 | -1/+2 |
| | | | | | mixed up CLIP[TB] and the slope was being computed as an integer division, which caused artifacts. | ||||
* | add a general primitive with support for points, lines and triangles. | rodri | 2024-05-03 | 1 | -264/+247 |
| | | | | | | | | 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. | ||||
* | render: add rasterizer init params and per-proc identification. | rodri | 2024-04-24 | 1 | -16/+20 |
| | |||||
* | render: use the primitive's bbox to check for tile membership. | rodri | 2024-04-18 | 1 | -9/+12 |
| | | | | | | this fixes a bug i introduced with the fully concurrent pipeline, where instead of testing whether the triangle *crossed* any of the tiles, i checked whether any of the points *were inside*. | ||||
* | render: make sure the last tile fills the screen. | rodri | 2024-04-18 | 1 | -0/+2 |
| | |||||
* | replace the Triangle with a general purpose Primitive. | rodri | 2024-04-16 | 1 | -91/+94 |
| | | | | | this is only an structural replacement and doesn't add support for the other primitive types. | ||||
* | render: split tiles vertically instead of horizontally. | rodri | 2024-04-15 | 1 | -4/+4 |
| | | | | | this makes more sense memory-wise, and it also fixes a clipping glitch that was occurring at tile boundaries. | ||||
* | add some instrumentation to measure pipeline stage time. | rodri | 2024-04-15 | 1 | -2/+23 |
| | |||||
* | implement a fully concurrent pipeline based on tiles. | rodri | 2024-04-15 | 1 | -27/+171 |
| | | | | | - got rid of the z-buffer lock to avoid contention. - little improvements to fb.c | ||||
* | simplify the job scheduler. correct two mistakes regarding the Viewport. | rodri | 2024-04-05 | 1 | -69/+26 |
| | | | | | | | | | | > They made two mistakes. they hanged the wrong man and they didn't finish the job. so Clint Eastwood came back to kick my ass. the mistakes in question were that the Viewport shouldn't know about double buffering, conceptually it has a framebuffer and that's it. the second one was passing it to the renderer, when the renderer couldn't care less about what a viewport is. | ||||
* | viewport: add a way to access front and back buffers. | rodri | 2024-04-01 | 1 | -1/+1 |
| | |||||
* | pass a Viewport in the Renderjob instead of a fb. | rodri | 2024-03-26 | 1 | -2/+5 |
| | | | | | do the frame buffer clearing and swapping as part of the rendering process, not within shootcamera. | ||||
* | implement a (partially) concurrent pipeline. | rodri | 2024-03-25 | 1 | -125/+186 |
| | |||||
* | use the new libgeometry berp routines. add a frame counter to the camstats. | rodri | 2024-03-21 | 1 | -2/+2 |
| | |||||
* | pass material properties to the fshader. | rodri | 2024-03-06 | 1 | -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. | rodri | 2024-03-06 | 1 | -20/+26 |
| | |||||
* | add a texture sampler with nearest and bilinear routines. | rodri | 2024-03-06 | 1 | -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 ↵ | rodri | 2024-03-03 | 1 | -58/+47 |
| | | | | code. | ||||
* | have separate routines for drawing and memdrawing. | rodri | 2024-02-27 | 1 | -1/+1 |
| | |||||
* | interpolate every vertex attribute when clipping and during rasterization. | rodri | 2024-02-25 | 1 | -21/+35 |
| | | | | added parameters necessary to implement the Phong shading model. | ||||
* | add initial support for OBJMaterial properties. | rodri | 2024-02-21 | 1 | -9/+33 |
| | |||||
* | pass an entire entity to the shader unit. fix a bug in cliptriangle. | rodri | 2024-02-14 | 1 | -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. | rodri | 2024-02-13 | 1 | -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. | rodri | 2024-02-12 | 1 | -39/+60 |
| | |||||
* | initial clipping implementation. (not fully working yet) | rodri | 2024-02-10 | 1 | -67/+53 |
| | |||||
* | load XRGB32 textures. | rodri | 2024-02-08 | 1 | -6/+11 |
| | |||||
* | implement perspective-correct attribute interpolation. | rodri | 2024-02-07 | 1 | -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. | rodri | 2024-02-03 | 1 | -33/+81 |
| | |||||
* | only create existing indices during quad triangulation. | rodri | 2024-02-01 | 1 | -24/+32 |
| | |||||
* | improve coordinate transformations and fix projections. | rodri | 2024-01-31 | 1 | -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. | rodri | 2024-01-30 | 1 | -6/+3 |
| | |||||
* | import the new renderer and clean things up. | rodri | 2024-01-30 | 1 | -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 ↵ | rodri | 2021-07-18 | 1 | -1/+63 |
| | | | | jmi2k!) | ||||
* | transcribe macros into actual functions. remove unused memdraw code. | rodri | 2020-04-28 | 1 | -30/+22 |
| |