summaryrefslogtreecommitdiff
path: root/graphics.h
Commit message (Collapse)AuthorAgeFilesLines
* remove quaternion sandwich utils (now part of libgeometry.)HEADmasterrodri2024-10-191-2/+4
|
* shorten Shadertab prop names. add quaternion sandwich product utils.rodri2024-10-021-3/+5
|
* implement a uniforms interface through Shadertab.rodri2024-10-011-13/+11
|
* implement exportmodel(2).rodri2024-09-271-0/+2
| | | | this writes a model and its assets into a directory.
* implement a parser for a model(6). get rid of the libobj dependency.rodri2024-09-261-3/+5
|
* camera: add a Camv constructor.rodri2024-09-211-1/+2
|
* implement clipped drawing. take branching out of the upscaler loop.rodri2024-09-201-0/+5
| | | | | | the rasterizers now produce a bbox of used fragments/pixels that are unified at the end of every job/frame. we use that when drawing so only the part that was rasterized gets sent to devdraw.
* turn the camera rendering options into a bitmap.rodri2024-09-131-4/+7
|
* change the raster format to RGBA32. draw to any image format. clean up.rodri2024-09-111-5/+10
| | | | | | | | | | | | | | | | got rid of the bullshit dance between XRGB32 and RGBA32, now all rasters are RGBA32 and premultiply alpha before loading up an image and drawing over the destination. this lets the user compose their own scenes with correct transparency. no more mediocre clearcolor. as a consequence drawing got slower, but if i get the turbo drawing pool working properly that should go away. textures also take alpha pre-multiplied channels into account, dividing them when sampling, so loading transparent textures will show the correct colors.
* allocate renderjob times dynamically for the parallel stages.rodri2024-09-081-1/+1
|
* remove unnecessary copying. profile individual stage procs.rodri2024-09-071-10/+10
|
* unify shaders into a single interface.rodri2024-09-011-18/+12
|
* implement a general raster interface for the framebuffers.rodri2024-08-291-9/+31
| | | | | | | | | | | | | | | got a bit tired of having to add a ulong *buf every time i needed to get some data out of the shaders, so i made it possible to create as many extra buffers as needed, which then can be addressed from the fragment shader and drawn using the same drawing routines that were used for the color buffer. these so called Rasters are very similar to the OpenGL FBOs, in case you are familiar, but we address them by strings instead of numbers. and they can also be used as textures if you create one (see alloctexture) and then memdraw into it after every shot.
* replace f?(min|max) functions with type-agnostic macros.rodri2024-08-271-2/+2
| | | | | this simplifies the code and serves as another shadeop to use on application shaders.
* scene: add a method to get an entity from a scene.rodri2024-08-251-0/+1
|
* methods to add primitives and materials to a Model.rodri2024-08-231-0/+3
|
* fix the A-buffer so that it handles multiple render passes.rodri2024-08-211-0/+1
|
* color: add ACES tone mapping functions.rodri2024-08-191-0/+2
|
* correct the light types constants.rodri2024-08-171-3/+3
|
* unify drawing routines and add clipped fb drawing support.rodri2024-08-171-4/+2
| | | | | | now changing the viewport offset will correctly show the portion of the framebuffer that's visible, including support for upscaled views.
* fixes.rodri2024-08-131-1/+1
|
* fix FPINVAL error. knob for fb clear color. general improvements.rodri2024-08-111-1/+3
|
* experimental A-buffer implementation.rodri2024-08-101-0/+29
| | | | | | | | | very simple, without anti-aliasing, made for getting OIT (order independent transparency) rendering of arbitrary objects. also added switches for blending, depth testing and the A-buffer to the camera.
* offset fb during drawing based on viewport config. move OBJ-related ↵rodri2024-08-071-5/+10
| | | | procedures to its own unit.
* make the depth buffer 32-bit.rodri2024-08-041-1/+1
|
* add a viewport upscale filters interface.rodri2024-08-021-0/+9
|
* reduce the volume of Camera.times records. clean up.rodri2024-07-201-2/+2
|
* fix stack overflow, skybox fov sensibility and scene duplication.rodri2024-07-151-0/+1
| | | | | | | | | putting the duplicate camera in a local variable turned out to be a bad idea. bring the dynamic version back. the skybox rendering was affected by the camera fov, which made it look like it was not really at infinity, so set it always to 90°.
* initial viewport upscaling support.rodri2024-07-141-0/+2
|
* small improvements and a skybox bugfix.rodri2024-07-141-1/+1
|
* new camera interface.rodri2024-07-131-2/+8
|
* enable culling and add a camera knob for it.rodri2024-07-131-11/+14
|
* fix the geometry glitches when moving things around.rodri2024-07-131-2/+8
| | | | | | | | | | 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.rodri2024-07-121-1/+2
|
* texture nomenclature changes. fb format RGBA → XRGB.rodri2024-07-091-3/+3
| | | | | | 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.
* create a new texture interface.rodri2024-07-051-8/+22
|
* rough color space conversion implementation.rodri2024-07-041-0/+4
| | | | | | | | 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.
* fix the barycoords routine to avoid reporting false degenerates.rodri2024-06-141-0/+2
| | | | added a normals buffer for debugging.
* replace the Memimage color buffer with a ulong* one. some fixes.rodri2024-06-131-2/+1
|
* add spotlight params and a light color shading routine. other things.rodri2024-06-101-0/+7
| | | | | | among these other things are clamping the color channels to [0,1] internally, and adding a modulation function for mixing colors/points.
* add cubemaps.rodri2024-06-061-2/+15
|
* add a tangent parameter for normal mapping, and a world2model xform.rodri2024-06-041-1/+3
|
* add a normal map property to Material.rodri2024-05-281-0/+1
|
* replace the Framebufctl's Lock with a QLock.rodri2024-05-231-1/+1
| | | | this provides fair scheduling, minimizing contention.
* fix the perspective projection and add inverse xform functions.rodri2024-05-201-0/+9
|
* render: improve line raster (not fixed yet). also tag jobs with an id.rodri2024-05-171-1/+2
|
* add a name property to Material.rodri2024-05-121-0/+1
|
* add a general primitive with support for points, lines and triangles.rodri2024-05-031-8/+7
| | | | | | | | 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.
* replace the Triangle with a general purpose Primitive.rodri2024-04-161-8/+19
| | | | | this is only an structural replacement and doesn't add support for the other primitive types.
* add some instrumentation to measure pipeline stage time.rodri2024-04-151-0/+15
|