descriptionSuckless PD 3D software rasterizer
repository URLhttps://codeberg.org/drummyfish/small3dlib.git
ownerdrummyfish@disroot.org
last changeThu, 1 Jun 2023 09:06:38 +0000 (1 11:06 +0200)
last refreshSat, 27 Apr 2024 07:26:19 +0000 (27 09:26 +0200)
content tags
add:
README.md

small3dlib

Public domain 3D software rasterizer for (not only) resource-limited computers.

If you like this, you may also like my similar project: raycastlib. These two libraries can very easily be combined together -- here is a proof-of-concept gif (environment rendered with raycastlib, cubes with small3dlib):

eye-candy previews

Pokitto (32bit embedded console, 48 MHz, 36 kB RAM):

Gamebuino META (Arduino 32bit console, 48 MHz, 32 kB RAM):

PC (SDL, offline rendering, terminal):

features

NOTE: Backwards compatibility isn't a goal of this libraray. It is meant to be an as-is set of tools that the users is welcome to adjust for his specific project. So new features will be preferred to keeping the same interface.

why?

You just need to make a small mini 3D game, quick 3D animation or visualization and don't want to go through the horror of learning and setting up OpenGL or Vulkan, installing drivers, learning complex APIs and libraries? Don't want to be tied to HW, 3rd party API or libraries and their dependencies? Don't want to install gigabytes of heavy super ultra graphics engines just to play around with a few low poly models? You need a simple software renderer as a fallback to your main renderer? You want to create extremely portable 3D graphics that will run on small obscure embedded platforms that don't have OpenGL, good specs, FPU unit or even standard C library? Want to just render something offline simply without caring about highest rendering speed? You want to toy around with modifying something in the rendering pipeline that you can't easily do or debug in big frameworks (such as the rasterization algorithm)? Want to hack around in the demo scene? Want to create something public domain and need a public domain renderer? Or just don't want to be bothered by conditions such as proper attribution or copyleft? You want to create an authentic retro wobbly PS1 style graphics? Then this library may help you.

limitations

And advantages at the same time :)

how to use

For start take a look at the helloWorld.c program, then terminalCube and then other examples (e.g. level.c shows simple integration with SDL).

For more see the other examples and the library code itself, it is meant to be self-documenting, i.e. the source code IS the documentation -- you'll find the description of a lot of things at the start of the file. You can also use doxygen to generate an HTML documentation.

The basic philosophy is:

tips/troubleshooting

license

Everything in this repository is CC0 1.0 (public domain, https://creativecommons.org/publicdomain/zero/1.0/) + a waiver of all other IP rights (including patents and trademarks).

I've written the code completely myself, from scratch. The art used in demos is either my own released under CC0 or someone else's released under CC0.

This project is made out of love and to be truly helpful to everyone, not for any self interest. I want it to forever stay completely in the public domain, not owned by anyone.

This is not mandatory but please consider supporting free software and free culture by using free licenses and/or waivers.

If you'd like to support me or just read something about me and my projects, visit my site: www.tastyfish.cz.

You can also choose to use this under the following waiver which is here to just ensure more legal safety and waiving of additional IP such as patents:

The intent of this waiver is to ensure that this work will never be encumbered by any exclusive intellectual property rights and will always be in the public domain world-wide, i.e. not putting any restrictions on its use.

Each contributor to this work agrees that they waive any exclusive rights, including but not limited to copyright, patents, trademark, trade dress, industrial design, plant varieties and trade secrets, to any and all ideas, concepts, processes, discoveries, improvements and inventions conceived, discovered, made, designed, researched or developed by the contributor either solely or jointly with others, which relate to this work or result from this work. Should any waiver of such right be judged legally invalid or ineffective under applicable law, the contributor hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to this right.

shortlog
2023-06-01 Miloslav CizUpdate readmemaster
2023-06-01 Miloslav CizFix readme
2023-06-01 Miloslav CizFix typo
2023-03-03 Miloslav CizAdd comment to script
2022-11-20 Miloslav CizUpdate readme
2022-10-01 Miloslav CizAdd ortho projection
2022-10-01 Miloslav CizUpdate README
2022-10-01 Miloslav CizUpdate README
2022-10-01 Miloslav CizAdd todo
2022-09-26 Miloslav CizAdd hotfix of a bug
2022-09-22 Miloslav CizUpdate the make script
2022-09-21 Miloslav CizAdd S3L_F shorthand
2022-09-20 Miloslav CizAdd extra waiver
2022-08-05 Miloslav CizUpdate
2022-07-25 Miloslav CizFix formatting
2022-06-10 Miloslav CizAdd other sin method
...
heads
10 months ago master