You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

[gLib][3d][z80][ez80] gLib a fast 3D asm/axiom library

b/[Inactive] gLib 3D polygon library (TI-83+/84+/CE/83PCE) Started by TheMachine02, January 19, 2015, 05:10:01 PM

Previous topic - Next topic

0 Members and 7 Guests are viewing this topic.

u/Duke "Tape" Eiyeron April 18, 2015, 09:16:25 AM
ROL 3D, or Reuben 3D! :D
u/TheMachine02 April 18, 2015, 04:16:53 PM
Having detailed graphics will be difficult though. Wonder in waht extend RPG are adapted to this engine.
u/Dream of Omnimaga April 19, 2015, 11:22:24 AM
I don't think textures are necessary (or at least detailed ones). If someone just remakes an early Illusiat game into 3D he could just use lines for walls. By the way, does this support field of view, as in only being able to see stuff at a certain maximum distance?
u/CKH4 April 19, 2015, 01:41:52 PM
I believe it does have field of view but I've only used 2.0 model view camera.
Also look at this https://www.omnimaga.org/ti-z80-calculator-projects/%28axe%29collision-detection-library/
u/TheMachine02 April 19, 2015, 04:07:02 PM
I does not have a 'real' field of view actually, far things are always rendered, even if the will make evrything overflow  :P Principally cause the clipping in far range is pretty painful to do, ince I can't relly on the rotated coordinate (wich may have overflow). Matrix rendering does change this though, as you can render world from almost every point you want (just has a limited vertex range).
So, yeah, far thing are rendered.

Quote from: DJ Omnimaga on April 19, 2015, 11:22:24 AM
I don't think textures are necessary (or at least detailed ones).
Textures.... hehe  :P I'll doubt we'll see them in real-time one day...
I was more talking about detailed line or filled decors (with more than 3 vertex  :P )
u/Dream of Omnimaga April 19, 2015, 04:11:51 PM
Thanks for the explanation. :)  And yeah if even texture-less 3D is slow then perhaps games like Illusiat 3 should be avoided.
u/TheMachine02 April 19, 2015, 04:46:28 PM
well it is 3D on calc  :P so don't expect huge performance (even if gLib start to be more than game - able)

EDIT:

is this :

gGenVAO(0)->G
.delete vao, it is the axe delvar command
Delvar G

is better than this:

gGenVAO(0)->G
gDeleteVAO(0)


first method does use extra 8 bytes/VAO, but the second one does waste more bytes in code, and use an extra command ( 32 max/axiom, and I want to fit almost everything is this update :p)
In total, it only really change for the end user, design speak-wise.
Last Edit: April 19, 2015, 04:57:54 PM by TheMachine02
u/Snektron April 19, 2015, 09:24:56 PM
Depends on how much you use it in the code
u/TheMachine02 April 24, 2015, 05:24:30 PM
One or two time max I'll say. Cause this is only for freeing memory  :P
Also, does somebody knows a good documentation generator for z80 asm ?
Cause writing all the doc by myself is balh :p
u/Dream of Omnimaga April 25, 2015, 10:13:04 PM
Do you mean a program that comments your code for you?
u/TheMachine02 April 26, 2015, 10:02:35 AM
More a program wich extract comment from source file and then put it in form.
u/Dream of Omnimaga April 26, 2015, 06:51:01 PM
Ah ok. How different would they look like?
u/TheMachine02 April 28, 2015, 05:43:42 PM
Well, maybe something like :

Routine name
-INPUT : register and stuff
-OUTPUT: what the routine output
What does the routine
-WARNING: maybe some warning about the command
-Speed of the routine (in TStates)

I guess I'll just have to do it manually, like in html or in pdf form. It is not too much difficult, just slower.

Also: I finally find a way to implements real pixel shader in gLib. They'll to be compiled in asm though. Pretty much happy of me right now  8) First thing I've implemented is Z-Buff and I am pretty much impressed of how well it run  :P, altough there is artefact due to the algo used.

EDIT : pixel shader only works on triangle for now, but I am currently implementing them into line drawing
Last Edit: April 28, 2015, 05:50:00 PM by TheMachine02
u/Snektron April 28, 2015, 06:00:18 PM
Quote from: TheMachine02 on April 28, 2015, 05:43:42 PM
Also: I finally find a way to implements real pixel shader in gLib. They'll to be compiled in asm though. Pretty much happy of me right now  8) First thing I've implemented is Z-Buff and I am pretty much impressed of how well it run  :P, altough there is artefact due to the algo used.
*.*
TI 84+ Raymarch shaders?
u/TheMachine02 April 28, 2015, 06:04:44 PM
Nah. They are pretty much limited to be speedy as they are. I don't even proprely implemented linear interpolation of vertex parameters  :P

Here some spec though :

; pixel shader ps_1.0
; registers specifications:
; #input Color     : 1 [1 byte(s)] [R]      [default=color]
; #temp integer     : 1 [1 byte(s)] [R/W] [ldefault=undef]
; #sampler/texture : 1 [2 byte(s)] [R/W] [default=null]
; #output color    : 1 [2 byte(s)] [R/W] [screen adress]
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal