This commit is contained in:
Miloslav Ciz 2025-02-12 23:09:00 +01:00
parent 85321afd67
commit ec4393d204
17 changed files with 1952 additions and 1945 deletions

View file

@ -12,8 +12,6 @@ The repo is available at for example at https://git.coom.tech/drummyfish/Anarch.
{ Someone told me the game even briefly appeared on TV: some Croatian TV station covered the country's startup (I reckon it was Circuitmess) which creates [open consoles](open_console.md), and they showed one of them running Anarch. Pretty cool. ~drummyfish }
{ EDIT: I want to apologize here for mentioning that I found the game selling on Switch store and assuming it was a cash grab scam, I actually got an email from the developer and got a very nice donation. Thank you <3 ~drummyfish }
```
h@\hMh::@@hhh\h@rrrr//rrrrrrrrrrrrrrrrrrrr@@@@hMM@@@M@:@hhnhhMnr=\@hn@n@h@-::\:h
hMhh@@\\@@@\\h:M/r/////rrrrrrrrrrrrrrr//r@@@@@MMh@@hhh\\\=rMr=M@hh\hn\:\:h::\@\:
@ -68,6 +66,8 @@ Anarch has these features:
Upon release the game garnered some attention at [4chan](4chan.md)/g -- of course this included suggestions for drummyfish to [kill himself](suicide.md), but generally anons seemed to like it, at least for the overall autism.
{ **MINI DRAMA SECTION**: I want to apologize here for mentioning that I found the game selling on Switch store and assuming it was a cash grab scam, I actually got an email from the developer and got a very nice donation. Thank you <3 EDIT2: **I am an idiot.** I probably fucked up the previous statement too as I got an email from a friend who asked me if this is a sell out, and I now absolutely see it looks that way, so please let me clarify this: I do not approve of proprietary software or selling software for money, I also hate Nintendo Switch etc., hopefully that's clear. What happened was that the developer emailed me beforehand asking if he could make the port, if I wanted to be credited and if I would accept a donation, and this alone is very nice of him (despite me still holding my beliefs about selling software etc.) because it's pretty clear he can make the port without asking me or paying me anything. I responded he can of course make the port and that donations and credit are always optional and there is not even any moral pressure to make them (i.e. not only I don't require them, I don't even expect them), i.e. basically what I state on my website. He then made the port and sent me a nice donation (which may be even more than what the port will make, i.e. it's clearly not a blatant cash grab), but later on someone sent me a link to the port on Switch store and of course like a dumbass I am I FORGOT about the email (one of very many I get) and so I assumed it was some kinda "scam" (which would still be legally fine of course) and made a comment about it in some places, and this was a BIG FUCKUP by me because I gave the guy a thumbs up and then behaved as if I didn't, and this I am very deeply sorry for. I.e. this wasn't me suddenly approving of a commercial port or changing my opinions upon receiving money, it was just me accidentally behaving like a dick, which is what I want to apologize for. ~drummyfish }
## Technical Details
Anarch is written in [C](c.md)99.

View file

@ -15,7 +15,7 @@ Examples of approximations:
- **[3D graphics](3d_rendering.md)** is almost completely about approximations, e.g. basically all shapes are approximated with triangle meshes, [screen space](screen_space.md) effects (like [SSAO](ssao.md)) are used to approximate global illumination, reflections etc. Similarly [ray tracing](ray_tracing.md) neglects indirect lighting etcetc.
- **[Real numbers](real_number.md)** are practically always approximated with [floating point](floating_point.md) or [fixed point](fixed_point.md) (rational numbers).
- **[Numerical methods](numerical.md)** allow us to find approximate solutions to very general equations (ones that are impossible or impractical to solve analytically with absolute precision) by iterative evaluation of infinite series that converge towards the solution. These methods allow fine tuning speed vs precision via parameters such as the number of iterations or desired error against correct solution. This is very often used in engineering and practical applications of mathematics to the [real world](irl.md) where we encounter very complex equations. One of the simplest and most famous numerical tools is the Newton's method that (as long as some conditions hold) iterates towards the solution based on first [derivative](detivative.md) of the function.
- **[Taylor series](taylor_series.md)** approximates given mathematical function and can be used to e.g. estimate solutions of [differential equations](differential_equation.md).
- **[Taylor series](taylor_series.md)** approximates given mathematical function near some given point with a [polynomial](polynomial.md), is often used to practically implement certain functions in calculators, mathematics libraries etc.
- [Rotation](rotation.md) around an axis, especially by small angles, can be approximated by skewing in one direction, then in another.
- Primitive [music](music.md) synthesis often uses simple functions like triangle/saw/square wave to approximate [sin](sin.md) waves (though many times it's done for the actual sound of these waves, sometimes it may be simply to save on resources).
- ...

View file

@ -2,9 +2,9 @@
Harry Potter is a [franchise](franchise.md) and universe by an English [female](woman.md) writer J. K. Rowling about wizards and magic { like ACTUAL [wizards](wizard.md) and [magic](magic.md). ~drummyfish } that started in 1997 as an immensely successful series of seven children and young adult [books](book.md), was followed by movies and later on by many other spinoff media such as video [games](game.md). It made J. K. Rowling a billionaire and has become the most famous and successful book series of modern age. At first the books sparked controversies and opposition in religious communities for "promoting witchcraft", in recent years the universe and stories have become a subject of wider political analysis and [fights](fight_culture.md), as most other things. Commerce and politics destroyed it completely, anything new in the franchise is absolute garbage, but the original books are quite good.
{ I actually enjoyed the books -- they're not the best in the world, I've read many better ones that would better deserve this kind of attention, but still the work is admirable and of very high quality. There is of course tons of money in the franchise so it's getting raped and milked like any other IP capital, do not follow the new stuff. ~drummyfish }
{ I actually enjoyed the books -- they're not the best in the world, I've read many better ones that would better deserve this kind of attention, but still the work is admirable and of very high quality, it is definitely one of the most comfy book series. There is of course tons of money in the franchise so it's getting raped and milked like any other IP capital, do not follow the new stuff. ~drummyfish }
**Plot summary**: sorry, we're not writing a plot summary here, thank [copyright](copyright.md) laws -- yes, [fair use](fair_use.md) allows us to do it but it would make us [non free](free_culture.md) :) Let's just say the story revolves around a boy named Harry Potter who goes to a wizard school with two friends and they're together *saving the world* from Lord Voldemort, the wizard equivalent of [Hitler](hitler.md). Overall the books start on a very light note and get progressively darker and more adult, turning into a story about "World War II but with magic wands instead of guns". It's pretty readable, with great, unique atmosphere, pleasant coziness and elements of many literary genres, there's nice humor and good ideas. Also the lore is very deep, but sometimes doesn't quite make sense (well, it was made by a woman).
**Plot summary**: sorry, we're not writing a plot summary here, thank [copyright](copyright.md) laws -- yes, [fair use](fair_use.md) allows us to do it but it would make us [non free](free_culture.md) :) Let's just say the story revolves around a boy named Harry Potter who goes to a wizard school with two friends and they're together *saving the world* from Lord Voldemort, the wizard equivalent of [Hitler](hitler.md). Overall the books start on a very light note and get progressively darker and more adult, turning into a story about "World War II but with magic wands instead of guns". It's pretty readable, with unique atmosphere, pleasant coziness and elements of many literary genres, there's nice humor, good ideas and amazing characters. Similarly to [Lord of the Rings](lotr.md) the books primarily contrast [good](good.md) and [evil](evil.md), but also go deeper, showing for example that what sometimes appears as evil may turn out to in fact be good and vice versa, and also explore themes such as [selfless](selflessness.md) self sacrifice, dealing with mortality etc. Also the lore is very deep, but sometimes doesn't quite make sense and has infamously many plotholes (well, it was made by a [woman](woman.md)).
## See Also

View file

@ -149,5 +149,6 @@ Here are some of the ideas/movements/ideologies and people whose ideas inspired
- [Venus Project](venus_project.md)
- [socialism](socialism.md)
- [Buddhism](buddhism.md)
- [deep ecology](deep_ecology.md)
- [Trash Magic](trash_magic.md)
- [Utopia](utopia.md)

View file

@ -23,7 +23,7 @@ Working for [free software](free_software.md) organizations such as the [FSF](fs
Considering all things mentioned above, here are some concrete things of making money on LRS. Keep in mind that a lot of services (PayPal, Patreon etc.) listed here may possibly be [proprietary](proprietary.md) and unethical, so always check them out and consider free alternatives such as [Liberapay](liberapay.md). The methods are following:
- **[donations](donation.md)**: You may ask for donations e.g. on your website or Patreon (people often ask for [cryptocurrencies](crypto.md) or traditional money via services like [Liberapay](liberapay.md), PayPal or Buy Me a Coffee). For significant earnings you need to be somewhat popular because people donate extremely rarely, but if your work is good, there sometimes appears a generous donor who sends you a lot of money ({Happened to me a few times. I hereby thank all those kind people <3 ~drummyfish}). It can help if you create "content" such as programming videos alongside your project to get some "following", but it may also distract you and take some of your energy. People like [Luke Smith](luke_smith.md) seem to make quite some big money like this. A lot of [free culture](free_culture.md) artists are successful in creating free art this way, even completely [public domain](public_domain.md), for example Kenney (the number one creator at [opengameart](oga.md)). If you are really good at what you do and decide to share freely, the freedom lovers WILL spot you and appreciate your effort as it's still the case most free works out there are sadly super amateur.
- **[crowd funding](crowd_funding.md)**: A method similar to donations but a little more "encouraging" for the donors. You set a financial goal and if enough people donate to reach that goal, you get the money and create the project. Patreon and Kickstarter are typically used for this. Open consoles like [Arduboy](arduboy.md) and [Pokitto](pokitto.md) are examples of FOSS projects founded like this. Disadvantage is you have to reach some kind of popularity and respect rules of the funding platforms, so you'll have to sell part of your soul, will have to censor yourself, do "[marketing](marketing.md)" etc., so it may actually suck.
- **[crowd funding](crowd_funding.md)**: A method similar to donations but a little more "encouraging" for the donors. You set a financial goal and if enough people donate to reach that goal, you get the money and create the project. Patreon and Kickstarter are typically used for this. Open consoles like [Arduboy](arduboy.md) and [Pokitto](pokitto.md) are examples of FOSS projects founded like this. Disadvantage is you have to reach some kind of popularity and respect rules of the funding platforms, so you'll have to sell part of your soul, will have to censor yourself, do "[marketing](marketing.md)" etc., so it may actually suck. Once you raise the funds there is also a big pressure to deliver. A slightly better alternative may be so called **"ransom model"** in which you first make the game, show it off, and promise to release it only when you get some money -- here you remove the pressure and possibility of not delivering.
- **[pay what you want](pay_what_you_want.md)**: Here you create the work and then offer a download with optional payment, typically with some suggested price. People who can't afford to pay don't have to. This method has the advantage of not putting you under deadline pressures like the crowd funding method, also you just don't have to care much about sucking someone's... ehm, you know. Sites like [itch.io](https://itch.io/) are friendly to this option, but don't expect this to make you much.
- **selling physical products and [merchandise](merch.md)** ("merch"): This method makes use of the fact that selling physical items is considered less (even though not completely!) unethical, unlike selling copies of [information](information.md). So you can e.g. create a [free](free_software.md) video [game](game.md) and then sell T-shirts or coffee mugs with that video game's themes. You may write a public domain book and then sell physical printed books (of course, others will be able to sell your book too). In the past some [GNU](gnu.md)/[Linux](linux.md) distros used to sell their systems on nice "officials" CDs, but nowadays CDs are kind of dead. [Open consoles](open_console.md) kind of do this as well, they create [FOSS](foss.md) games and tools and then sell hardware that runs these games.
- You can specifically **make use of the advantages of LRS** and get some company to pay you. For example an [open console](open_console.md) creator will be highly interested in an engine for 3D games that will run on very low-spec embedded hardware because that will increase interest in their product. Existing FOSS engines, even the lightweight ones, are [bloated](bloat.md) and won't run on such hardware, however LRS ones, such as [small3dlib](small3dlib.md), will. Even if the company doesn't pay you directly, they might at least send you their product for free ({I got some open consoles for free for porting [Anarch](anarch.md) to them. ~drummyfish}).

2
log.md
View file

@ -152,7 +152,7 @@ unsigned int logInt2(unsigned int x)
As always, [look up tables](lut.md) may help create extremely fast versions for the price of some memory.
Mainstream way of implementing [floating point](float.md) logarithm is probably through [Taylor series](taylor_series.md) such as (for natural logarithm):
Mainstream way of implementing [floating point](float.md) logarithm is probably through [Taylor series](taylor_series.md) and similar infinite series such as (for natural logarithm):
*ln(x) = 2 * ((x-1)/(x+1) + 1/3 * ((x-1)/(x+1))^3 + 1/5 * ((x-1)/(x+1))^5 + ...)*

2
lrs.md
View file

@ -109,7 +109,7 @@ Apart from this software a lot of other software developed by other people and g
- **[Simon Tatham's portable puzzle collection](stppc.md)**: Very portable collection of puzzle [games](game.md).
- ...
Other potentially LRS software to check out may include [TinyGL](tinygl.md), [bootleg3d](bootleg3d.md), [scc](scc.md), [t3x](t3x.md), [ed](ed.md), [chibicc](chibicc.md), [IBNIZ](ibniz.md), [lynx](lynx.md), [links](links.md), [tcl](tcl.md), [uClibc](uclibc.md), [miniz](miniz.md), [Lua](lua.md), [nuklear](nuklear.md), [dmenu](dmenu.md), [sbase](sbase.md), [sic](sic.md), [tabbed](tabbed.md), [svkbd](svkbd.md), [busybox](busybox.md), [darcs](darcs.md), [raylib](raylib.md), [IRC](irc.md), [PortableGL](portablegl.md), [3dmr](3dmr.md), [openbsd](openbsd.md), [mtpaint](mtpaint.md) and others.
Other potentially LRS software to check out may include [TinyGL](tinygl.md), [bootleg3d](bootleg3d.md), [scc](scc.md), [t3x](t3x.md), [ed](ed.md), [chibicc](chibicc.md), [IBNIZ](ibniz.md), [dietlibc](dietlibc.md), [lynx](lynx.md), [links](links.md), [tcl](tcl.md), [uClibc](uclibc.md), [miniz](miniz.md), [Lua](lua.md), [nuklear](nuklear.md), [dmenu](dmenu.md), [sbase](sbase.md), [sic](sic.md), [tabbed](tabbed.md), [svkbd](svkbd.md), [busybox](busybox.md), [darcs](darcs.md), [raylib](raylib.md), [IRC](irc.md), [PortableGL](portablegl.md), [3dmr](3dmr.md), [openbsd](openbsd.md), [mtpaint](mtpaint.md) and others.
Another idea: **search for very old versions of "[modern](modern.md)" FOSS software**, from the times before things like [CMake](cmake.md), [Python](python.md) and [QT](qt.md) got popular (or even existed) -- many such projects got bloated with time, but their earlier versions may have been more aligned with LRS. You can get the old source code, it's present either in the git, on the project's website, on Internet Archive etc., compiling it should probably be much easier than compiling the "modern" version. This won't help with things like web browsers (as it won't understand the new formats and protocols), but will be fine text editors, drawing programs, 3D editors, games etc. You can also [fork](fork.md) the old version and make it a little better, customize it or publicly turn it into a new program, helping the whole world. See also: [unfuck](unfuck.md).

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
# Morality
Morality is the sense of greater values of an individual and society from which it follows what's ultimately right, wrong, [good](good.md) and [bad](bad.md)/[evil](evil.md) on a greater level, for a "greater good", without succumbing to low instincts such as [self interest](self_interest.md), self preservation, immediate pleasure etc. Morality is what greatly distinguishes man from animal and allows him to act not on mere instincts and reactions to immediate stimuli, it is driven by the higher forces such as beliefs, [logic](logic.md), [empathy](empathy.md), [love](love.md), conscience, [religion](religion.md) and [science](science.md). Examples of moral (good) behavior include [altruism](altruism.md), [selflessness](selflessness.md), [communism](communism.md) in general sense, [less retarded society](less_retarded_society.md) and [non violence](non_violence.md), while examples of IMMORALITY (evil) might be [capitalism](capitalism.md), [fascism](fascism.md), [rape](rape.md), [pedophobia](pedophobia.md), [genocide](genocide.md), [marketing](marketing.md), [proprietary software](proprietary.md), [nationalism](nationalism.md) and [LGBT](lgbt.md).
Morality is the sense of greater values of an individual and society from which it follows what's ultimately right, wrong, [good](good.md) and [bad](bad.md)/[evil](evil.md) on a greater level, for a "greater good", without succumbing to low instincts such as [self interest](self_interest.md), self preservation, immediate pleasure etc. Morality is what distinguishes (some) men from animals and allows us to act not on mere instincts and pressure of immediate stimuli, it is driven by higher forces such as beliefs, [logic](logic.md), [empathy](empathy.md), [love](love.md), conscience, [religion](religion.md) and [science](science.md). Examples of moral (good) behavior include [altruism](altruism.md), [selflessness](selflessness.md), [communism](communism.md) in general sense, [less retarded society](less_retarded_society.md) and [non violence](non_violence.md), while examples of IMMORALITY (evil) might be [capitalism](capitalism.md), [fascism](fascism.md), [rape](rape.md), [pedophobia](pedophobia.md), [genocide](genocide.md), [marketing](marketing.md), [proprietary software](proprietary.md), [nationalism](nationalism.md) and [LGBT](lgbt.md).
Morality is very similar to **[ethics](ethics.md)**, to the point of often being used interchangeably, however we may still find slight differences. While morality is seen as something personal and intuitive, greatly driven by conscience and judged on a case-by-case basis, ethics is perceived more as a set of informal, often unwritten shared rules to assure morality in a larger group of individuals, i.e. ethics is an agreement on a way of behavior between individuals, each of which may have slightly different personal morals. Ethics is also sometimes defined as the branch of [philosophy](philosophy.md) concerned with examining morality.

View file

@ -10,6 +10,7 @@ WIP
- [free speech](free_speech.md): Idiots think that free speech has some limits or that free speech is just about making laws protecting speech OR that free speech must come with "responsibility".
- [free will](free_will.md): Maybe the most cringe misunderstood topic in history, retards think that free will has something to do with consciousness and that it's needed to have meaning of life and whatever. Literal brain cancer.
- [hacking](hacking.md): Extremely misunderstood terms not just in popular culture but even among people somewhat interested in technology, true hackers for example despise all passwords and security because they are against censorship, which is sadly very little known.
- [intellectual "property"](intellectual_property.md) ([copy"right"](copyright.md), [public domain](public_domain.md), [patents](patent.md), ...)
- [political left/right](left_right.md): People (even experts) don't know shit about this.
- [LRS](lrs.md)
- [quantum physics](quantum.md)

File diff suppressed because it is too large Load diff

View file

@ -56,7 +56,7 @@ TODO: more
## Programming
Square root is a very common operation and oftentimes has to be VERY fast -- it's used a lot for example in [computer graphics](graphics.md) where it may need to be computed several million times per second. For this reason there oftentimes exist special instructions and otherwise hardware accelerated options, you will very likely have such function around on most computers -- in [C](c.md) math standard library there's the `sqrt` [floating point](float.md) function that will probably be very fast. But let's now consider you want to program your own square root, which may happen for example when dealing with [embedded](embedded.md) computers.
Square root is a very common operation and oftentimes has to be VERY fast -- it's used a lot for example in [computer graphics](graphics.md) and so gets executed several million times per second. For this reason there oftentimes exist special instructions and otherwise hardware accelerated options, you will very likely have such function around on most computers -- in [C](c.md) math standard library there's the `sqrt` [floating point](float.md) function that will probably be very fast. But let's now consider you want to program your own square root, which may happen for example when dealing with [embedded](embedded.md) computers.
If we really need extreme speed, we may always use a [look up table](lut.md) with precomputed values. Of course a table with ALL the values would be very big, but remember we can make a much smaller table (where each item spans a bigger range) that will provide just a quick [estimate](approximation.md) from which you'll make just a few extra iterations towards the correct answer.
@ -159,6 +159,8 @@ double sqrtF(double x)
}
```
For the real curious it's possible to look further into how serious C libraries such as [musl](musl.md) or [glibc](glibc.md) do it, but it's usually not a pleasant sight to behold.
## See Also
- [logarithm](log.md)

View file

@ -1,12 +1,14 @@
# Software Rendering
[Software](software.md) (SW) rendering refers to [rendering](rendering.md) [computer graphics](graphics.md) without the help of [graphics card](gpu.md) (GPU), or in other words computing images only with [CPU](cpu.md). Most commonly the term means rendering [3D graphics](3d_rendering.md) but may as well refer to other sorts of graphics such as drawing [fonts](font.md) or [video](video.md). Before the invention of GPU card all rendering was done in software of course -- games such as [Quake](quake.md) or Thief were designed with SW rendering and only added optional GPU acceleration later. SW rendering for traditional 3D graphics is also called software [rasterization](rasterization.md), for rasterization is the basis of current real-time 3D graphics.
[Software](software.md) (SW) rendering refers to [rendering](rendering.md) [computer graphics](graphics.md) without the aid of [graphics card](gpu.md) (GPU), or in other words computing images only with the [CPU](cpu.md). The opposite is called *GPU accelerated* or *[hardware](hw.md) accelerated* rendering. Most commonly the term SW rendering means rendering [3D graphics](3d_rendering.md) but may as well refer to other types of graphics such as drawing [fonts](font.md) or [video](video.md). Before the invention of GPU cards all rendering was done in software of course -- games such as [Quake](quake.md) or Thief were designed with SW rendering and only added optional GPU acceleration later. SW rendering for traditional 3D graphics is also called software [rasterization](rasterization.md), for rasterization is the basis of current real-time 3D graphics.
SW rendering has advantages and disadvantages, though from our point of view its advantages prevail (at least given only capitalist GPUs exist nowadays). Firstly it is **much slower** than GPU graphics -- GPUs are designed to perform graphics-specific operations very quickly and, more importantly, they can process many pixels (and other elements) in [parallel](parallelism.md), while a CPU has to compute pixels sequentially one by one and that in addition to all other computations it is otherwise performing. This causes a much lower [FPS](fps.md) in SW rendering. For this reasons SW rendering is also normally of **lower quality** (lower resolution, [nearest neighbour](nn.md) texture filtering, ...) to allow workable FPS. Nevertheless thanks to the ginormous speeds of today's CPUs simple fullscreen SW rendering can be pretty fast on PCs and achieve even above 60 FPS; on slower CPUs (typically [embedded](embedded.md)) SW rendering is usable normally at around 30 FPS if resolutions are kept small.
It must be noted that SW rendering doesn't mean the program is never touching [GPU](gpu.md) at all, in fact most personal computers nowadays REQUIRE some kind of GPU to even display anything. Even if GPU is involved in presentation of the computed image, we still talk about SW rendering as long as the image was computed by the CPU. Of course there may exist a gray area where SW and hardware accelerated rendering are combined.
On the other hand SW rendering is more [portable](portability.md) (as it can be written purely in a portable language such as [C](c.md)), less [bloated](bloat.md) and **eliminates the [dependency](dependency.md) on GPU** so it will be supported almost anywhere as every computer has a CPU, while not all computers (such as [embedded](embedded.md) devices) have a GPU (or, if they have it, it may not be sufficient, supported or have a required [driver](driver.md)). SW rendering may also be implemented in a simpler way and it may be easier to deal with as there is e.g. no need to write [shaders](shader.md) in a special language, manage transfer of data between CPU and GPU or deal with parallel programming. SW rendering is the [KISS](kiss.md) approach.
SW rendering has advantages and disadvantages, though from [our](lrs.md) point of view its advantages prevail (at least given only capitalist GPUs exist nowadays). Firstly it is **much slower** than GPU graphics -- GPUs are designed to perform graphics-specific operations very quickly and, more importantly, they can process many pixels (and other elements) in [parallel](parallelism.md), while a CPU has to compute pixels sequentially one by one and that in addition to all other computations it is otherwise performing. This causes a much lower [FPS](fps.md) in SW rendering. For this reasons SW rendering is also normally of **lower quality** (lower resolution, no [antialiasing](antialiasing.md), [nearest neighbour](nn.md) texture filtering, no [mipmaps](mipmap.md), ...) to allow workable FPS. Nevertheless thanks to the ginormous speeds of today's CPUs simple fullscreen SW rendering can be pretty fast on PCs and achieve even above 60 FPS; on slower CPUs (typically [embedded](embedded.md)) SW rendering is usable normally at around 30 FPS if resolutions are kept small.
SW rendering may also utilize a much wider variety of rendering techniques than only 3D [rasterization](rasterization.md) traditionally used with [GPUs](gpu.md) and their [APIs](api.md), thanks to not being limited by hard-wired pipelines, i.e. it is more flexible. This may include [splatting](splatting.md), [raytracing](raytracing.md) or [BSP rendering](bsp.md) (and many other ["pseudo 3D"](pseudo3d.md) techniques).
On the other hand SW rendering is **more [portable](portability.md)** (as it can be written purely in a portable language such as [C](c.md)), **less [bloated](bloat.md)** and **eliminates the [dependency](dependency.md) on GPU** so it will be supported almost anywhere as every computer has a CPU, while not all computers (such as [embedded](embedded.md) devices) have a GPU (or, if they do, it may not be sufficient, supported or have a required [driver](driver.md)). SW rendering may also be implemented in a simpler way and it may be easier to deal with as there is e.g. no need to write [shaders](shader.md) in a special language, manage transfer of data between CPU and GPU or deal with parallel programming. SW rendering is the **[KISS](kiss.md) approach**, which also implies it's **more [future proof](future_proof.md)** etc. Furthermore SW rendering is **more predictable** -- this is because GPUs are highly [magical](magic.md) devices [optimized](optimization.md) to work well under certain assumptions (e.g. not drawing too many small triangles) and each GPU (or even the same GPU with different drivers) may react differently to what we're rendering, so even though GPU performance will be higher, it will be much more difficult to be kept stable and predictable over a wide range of different GPUs and drivers.
SW rendering may also utilize (at least more easily and without penalties) a much wider variety of rendering techniques than only 3D [rasterization](rasterization.md) traditionally used with [GPUs](gpu.md) and their [APIs](api.md), thanks to not being limited by hard-wired pipelines, i.e. it is **more flexible**. This may include [splatting](splatting.md), [raytracing](raytracing.md) or [BSP rendering](bsp.md) (and many other ["pseudo 3D"](pseudo3d.md) techniques) and even completely different rendering paradigms such as [frameless rendering](frameless.md).
A lot of software and rendering frameworks offer both options: accelerated rendering using GPU and SW rendering as a [fallback](fallback.md) (in case the first option is not possible). Sometimes there exists a rendering [API](api.md) that has both an accelerated and software implementation (e.g. [TinyGL](tinygl.md) for [OpenGL](opengl.md)).
@ -14,8 +16,6 @@ For simpler and even somewhat more complex graphics **purely software rendering
SW renderers are also written for the purpose of verifying rendering hardware, i.e. as a [reference implementation](reference_implementation.md).
Note that SW rendering doesn't mean our program is never touching [GPU](gpu.md) at all, in fact most personal computers nowadays **require** some kind of GPU to even display anything. SW rendering only means that computation of the image to be displayed doesn't use any hardware specialized for this purpose.
Some SW renderers make use of specialized CPU instructions such as [MMX](mmx.md) which can make SW rendering faster thanks to handling multiple data in a single step. This is kind of a mid way: it is not using a GPU per se but only a mild form of hardware acceleration. The speed won't reach that of a GPU but will outperform a "pure" SW renderer. However the disadvantage of a hardware dependency is still present: the CPU has to support the MMX instruction set. Good renderers only use these instructions optionally and fall back to general implementation in case MMX is not supported.
## Programming A Software Rasterizer

View file

@ -2,11 +2,11 @@
Vector is a basic [mathematical](math.md) object that expresses direction and magnitude (such as velocity, force etc.) and is very often expressed as (and many times misleadingly equated with) an "[array](array.md) of [numbers](number.md)". Nevertheless in [programming](programming.md) one dimensional arrays are somewhat synonymous with vectors -- for example in two dimensional space an array `[4,3]` expresses a vector pointing 4 units to the "right" (along X axis) and 3 units "up" (along Y axis) and has the magnitude 5 (which is the vector's [length](length.md)). Vectors are one of the very basic concepts of advanced math and are used almost in any advanced area of math, physics, programming etc. -- basically all of physics and engineering operates with vectors, programmers will mostly encounter them in areas such as computer [graphics](graphics.md) (e.g 3D graphics, 2D [vector graphics](vector_graphic.md), ...), [physics engines](physics_engine.md) (forces, velocities, acceleration, ...), [machine learning](machine_learning.md) (feature vectors, ...) or [signal processing](signals.md) (e.g. [Fourier transform](fourier_transform.md) just interprets a signal as a vector and transforms it to a different basis) etc. In this article we will implicitly focus on vectors from programmer's point of view (i.e. "arrays of numbers") which to a mathematician will seem very simplified, but we'll briefly also foreshadow the mathematical view.
(NOTE: the term *vector* is used a lot in different contexts and fields, usually with some connection to the mathematical idea of vector which is sometimes however very loose, e.g. in low-level programming *vector* means a memory holding an address of some event handler. It's better to just look up what "vector" means in your specific area of interest.)
(NOTE: the term *vector* is used a lot in different contexts and fields, usually with some connection to the mathematical idea of vector which is sometimes however very loose, e.g. in low-level programming *vector* means a memory holding an address of some event handler (basically a pointer), probably because it "points" somewhere. It's better to just look up what "vector" means in your specific area of interest.)
Just like in elemental mathematics we deal with "simple" numbers such as 10, -2/3 or [pi](pi.md) -- we retrospectively call such "simple" numbers **[scalars](scalar.md)** -- advanced mathematics generalizes the concept of such a number into vectors ("arrays of numbers", e.g. `[1,0,-3/5]` or `[0.5,0.5]`) and yet further to [matrices](matrix.md) ("two dimensional arrays of numbers") and defines a way to deal with such generalizations into **[linear algebra](linear_algebra.md)**, i.e. we have ways to add and multiply vectors and matrices and solve [equations](equation.md) with them, just like we did in elemental algebra (of course, linear algebra is a bit more complex as it mixes together scalars, vectors and matrices). In yet more advanced mathematics the concepts of vectors and matrices are further generalized to **[tensors](tensor.md)** which may also be seen as "N dimensional arrays of numbers" but further add new rules and interpretation of such "arrays" -- vectors can therefore be also seen as a tensor (of rank 1) -- note that in this context there is e.g. a fundamental distinction between row and column vectors. Keep in mind that vectors, matrices and tensors aren't the only possible generalization of numbers, another one is e.g. that of [complex numbers](complex_number.md), [quaternions](quaternion.md), [p-adic numbers](p_adic.md) etc. Anyway, in this article we won't be discussing tensors or any of the more advanced concepts further, they are pretty non-trivial and mostly beyond the scope of mere programmer's needs :) We'll keep it at linear algebra level.
Just like in elemental mathematics we deal with "simple" numbers such as 10, -2/3 or [pi](pi.md) -- we retrospectively call such "simple" numbers **[scalars](scalar.md)** -- advanced mathematics generalizes the concept of such a number into vector ("arrays of numbers", e.g. `[1,0,-3/5]` or `[0.5,0.5]`) and yet further to [matrices](matrix.md) ("two dimensional arrays of numbers") and defines a way to deal with such generalizations into **[linear algebra](linear_algebra.md)**, i.e. we have ways to add and multiply vectors and matrices and solve [equations](equation.md) with them, just like we did in elemental algebra (of course, linear algebra is a bit more complex as it mixes together scalars, vectors and matrices). In yet more advanced mathematics the concepts of vectors and matrices are further generalized to **[tensors](tensor.md)** which may also be seen as "N dimensional arrays of numbers" but further add new rules and interpretation of such "arrays" -- vectors can therefore be also seen as a tensor (of rank 1) -- note that in this context there is e.g. a fundamental distinction between row and column vectors. Keep in mind that vectors, matrices and tensors aren't the only possible generalization of numbers, another one is e.g. that of [complex numbers](complex_number.md), [quaternions](quaternion.md), [p-adic numbers](p_adic.md) etc. Anyway, in this article we won't be discussing tensors or any of the more advanced concepts further, they are pretty non-trivial and mostly beyond the scope of mere programmer's needs :) We'll keep it at linear algebra level.
**Vector is not merely a coordinate**, though the traditional representation of it suggest such representation and programmers often use vector data types to store coordinates out of convenience (e.g. in 3D graphics engines vectors are used to specify coordinates of 3D objects); vector should properly be seen as a **direction and magnitude** which has **no position**, i.e. a way to correctly imagine a vector is something like an **arrow** -- for example if a vector represents velocity of an object, the direction (where the arrow points) says in which direction the object is moving and the magnitude (the arrow length) says how fast it is moving (its [speed](speed.md)), but it doesn't say the position of the object (the arrow itself records no position, it just "hangs in thin air").
**Vector is not merely a coordinate**, though the traditional representation of it suggest such representation and programmers often use vector data types to store coordinates out of convenience (e.g. in [3D graphics](3d_rendering.md) engines vectors are used to specify coordinates of 3D objects); vector should properly be seen as a **direction and magnitude** which has **no position**, i.e. a way to correctly imagine a vector is something like an **arrow** -- for example if a vector represents velocity of an object, the direction (where the arrow points) says in which direction the object is moving and the magnitude (the arrow length) says how fast it is moving (its [speed](speed.md)), but it doesn't say the position of the object (the arrow itself records no position, it just "hangs in thin air").
Watch out, **mathematicians dislike defining vectors as arrays of numbers** because vectors are essentially NOT arrays of numbers, such arrays are just one way to express them. Similarly we don't have to interpret any array of numbers as a vector, just as we don't have to interpret any string of letter as a word in human language. A vector is simply a direction and magnitude, an "arrow in space" of *N* dimensions; a natural way of expressing such arrow is through multiples of basis vectors (so called components), BUT the specific numbers (components) depend on the choice of basis vectors, i.e. the SAME vector may be written as an array of different numbers (components) in a different basis, just as the same concept of a [dog](dog.md) is expressed by different words in different languages. Even with the same basis vectors the numbers (components) depend on the method of measurement -- instead of expressing the vector as a linear combination of the *N* basis vectors we may express it as *N* [dot products](dot_product.md) with the basis vectors -- the numbers (components) will be different, but the expressed vector will be the same. Mathematicians usually define vectors abstractly simply as members of a **[vector space](vector_space.md)** which is a set of elements (vectors) along with operations of addition and multiplication which satisfy certain given rules ([axioms](axiom.md)).

View file

@ -57,5 +57,6 @@ TODO
- [Trash Magic](trash_magic.md)
- [Zeitgeist Movement](zeitgeist_movement.md)
- [TROM](trom.md)
- [deep ecology](deep_ecology.md)
- [One Community](one_community.md)
- [Positive Revolution](positive_revolution.md)

File diff suppressed because one or more lines are too long

View file

@ -3,9 +3,9 @@
This is an autogenerated article holding stats about this wiki.
- number of articles: 621
- number of commits: 966
- total size of all texts in bytes: 5037440
- total number of lines of article texts: 36571
- number of commits: 967
- total size of all texts in bytes: 5047518
- total number of lines of article texts: 36616
- number of script lines: 295
- occurrences of the word "person": 9
- occurrences of the word "nigger": 105
@ -35,53 +35,53 @@ longest articles:
top 50 5+ letter words:
- which (2790)
- there (2185)
- people (2138)
- example (1741)
- other (1584)
- about (1398)
- number (1323)
- software (1249)
- because (1155)
- their (1082)
- would (1054)
- something (1039)
- program (1036)
- being (1013)
- things (962)
- language (936)
- called (915)
- function (858)
- without (856)
- simple (852)
- which (2799)
- there (2187)
- people (2141)
- example (1746)
- other (1586)
- about (1400)
- number (1325)
- software (1248)
- because (1158)
- their (1086)
- would (1056)
- something (1043)
- program (1034)
- being (1017)
- things (963)
- language (937)
- called (917)
- function (860)
- without (858)
- simple (853)
- computer (840)
- numbers (828)
- different (789)
- however (773)
- these (769)
- programming (767)
- world (748)
- different (791)
- however (774)
- these (772)
- programming (768)
- world (750)
- system (727)
- doesn (710)
- should (708)
- still (700)
- games (678)
- should (709)
- still (704)
- games (680)
- while (671)
- point (662)
- point (663)
- society (660)
- drummyfish (654)
- drummyfish (657)
- simply (653)
- possible (639)
- possible (640)
- using (635)
- probably (633)
- always (619)
- course (602)
- similar (593)
- https (584)
- actually (580)
- someone (579)
- though (575)
- always (620)
- course (601)
- similar (595)
- https (586)
- actually (583)
- someone (578)
- though (576)
- basically (568)
- really (566)
- technology (548)
@ -89,44 +89,45 @@ top 50 5+ letter words:
latest changes:
```
Date: Fri Jan 31 15:03:34 2025 +0100
Date: Sat Feb 8 19:09:45 2025 +0100
21st_century.md
anarch.md
art.md
blender.md
cancer.md
demo.md
egoism.md
fail_ab.md
how_to.md
less_retarded_society.md
marketing.md
morality.md
often_confused.md
random_page.md
rock.md
rust.md
usa.md
wiki_pages.md
wiki_stats.md
wiki_tldr.md
Date: Wed Jan 29 21:14:06 2025 +0100
apple.md
art.md
approximation.md
ashley_jones.md
beauty.md
drummyfish.md
freedom.md
homelessness.md
humorwashing.md
programming_tips.md
billboard.md
byte.md
chess.md
collapse.md
corporation.md
egoism.md
evil.md
faq.md
future.md
library.md
life.md
log.md
main.md
marketing.md
music.md
often_confused.md
people.md
progress.md
quine.md
race.md
random_page.md
rock.md
stereotype.md
suckless.md
saf.md
slowly_boiling_the_frog.md
sqrt.md
suicide.md
usa.md
wiki_pages.md
wiki_stats.md
wikipedia.md
wizard.md
zoomer.md
Date: Fri Jan 31 15:03:34 2025 +0100
anarch.md
art.md
```
most wanted pages:
@ -154,21 +155,21 @@ most wanted pages:
most popular and lonely pages:
- [lrs](lrs.md) (330)
- [capitalism](capitalism.md) (297)
- [lrs](lrs.md) (331)
- [capitalism](capitalism.md) (298)
- [c](c.md) (237)
- [bloat](bloat.md) (228)
- [free_software](free_software.md) (197)
- [game](game.md) (150)
- [suckless](suckless.md) (147)
- [suckless](suckless.md) (149)
- [proprietary](proprietary.md) (134)
- [modern](modern.md) (120)
- [modern](modern.md) (121)
- [minimalism](minimalism.md) (118)
- [censorship](censorship.md) (114)
- [computer](computer.md) (111)
- [computer](computer.md) (112)
- [kiss](kiss.md) (110)
- [programming](programming.md) (105)
- [fun](fun.md) (104)
- [fun](fun.md) (103)
- [math](math.md) (102)
- [gnu](gnu.md) (99)
- [linux](linux.md) (98)
@ -179,10 +180,10 @@ most popular and lonely pages:
- [woman](woman.md) (93)
- [art](art.md) (92)
- [hacking](hacking.md) (91)
- [less_retarded_society](less_retarded_society.md) (90)
- [free_culture](free_culture.md) (90)
- [less_retarded_society](less_retarded_society.md) (89)
- [chess](chess.md) (86)
- [public_domain](public_domain.md) (85)
- [chess](chess.md) (85)
- [pseudoleft](pseudoleft.md) (83)
- ...
- [combinatorics](combinatorics.md) (5)