summaryrefslogtreecommitdiff
path: root/texture.c
Commit message (Collapse)AuthorAgeFilesLines
* fix stack overflow, skybox fov sensibility and scene duplication.rodri2024-07-151-6/+19
| | | | | | | | | 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°.
* fix the geometry glitches when moving things around.rodri2024-07-131-0/+19
| | | | | | | | | | 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.
* texture nomenclature changes. fb format RGBA → XRGB.rodri2024-07-091-2/+2
| | | | | | 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-28/+49
|
* rough color space conversion implementation.rodri2024-07-041-13/+5
| | | | | | | | 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.
* add cubemaps.rodri2024-06-061-0/+102
|
* make the fshader return a Color instead of a Memimage. clean things up.rodri2024-03-061-5/+11
|
* add a texture sampler with nearest and bilinear routines.rodri2024-03-061-0/+104
pass the material reference along with the vertices. also implemented back-face culling, but it's disabled for now.