abelliqueux / 3dcam-headers Goto Github PK
View Code? Open in Web Editor NEWA WIP 3d engine for the original PSX. Uses Nugget+Psyq, no libgs, and has a companion extension for Blender !
A WIP 3d engine for the original PSX. Uses Nugget+Psyq, no libgs, and has a companion extension for Blender !
This can be pre-calculated at runtime : https://github.com/ABelliqueux/3dcam-headers/blob/master/src/graphics.c#L43
Rendering performances can be improved if GTE commands 'nop'ing time is used for RAM > CPU d-cache verts data transfer.
See : https://github.com/ABelliqueux/nolibgs_hello_worlds/blob/main/hello_gte_opti.c
Ref : psyq/psx/sample/scea/GTE
In order to improve rendering time, selectively apply texturing/lighting to primitives according to their p
value.
Make a PSn00bSDK version : https://github.com/Lameguy64/PSn00bSDK/
The XA playback cursor is dependant on framerate, hence increments too fast or too slow depending on scene.
t
is not incremented, thus always 0.
This means that only the first mesh type is checked, and the following meshes are assumed to have the same type.
It works because the test mesh only has tris or quads, but won't work with mixed meshes.
Lines 17 to 27 in 85cab5c
When an object rotates, light should not rotate with it :)
After compiling out of the box, the example level seems not to load correctly.
Can't really figure out what's wrong here, posting two screenshots.
The gouraud cube seems to render fine but there's apparently some problem with texture loading, can't really figure out what's happening here.
EDIT: the real problem was just the crashing, the textures should be correct. Anyway switching to level 1 caused all kinds of graphical glitches before crashing.
Line 256 in 800be60
Get this working.
Right now, we're using switch case to cycle through hardcoded level names.
Figure a way out for something more pretty.
If Far color / Horizon color is < 100 (0.10 in blender), the corresponding channel color will display as black.
Example level0.c
file :
CVECTOR level0_BGc = { 100, 218, 216, 0 };
CVECTOR level0_BGc = { 0, 218, 216, 0 };
Might be an error in the linear to RGB conversion function.
Also could be due to psyq dpq calculation. See LibRef47.pdf, p.450 and LibOver47.pdf, p.133, "Light Source Calculation" :
LLM == Local Light Matrix
LLV == Local light vector
LC == Local Color
BK == Back Color
FC == Far Color
p == interpolation coefficient
LLV = LLM * v0
LC = BK + LCM * LLV
v2 = (1 - p) * v1 * LC + p * FC
v0 -> vx, vy, vz
vl -> r, g, b
p
NormalColorDpq(): v2 -> r, g, b
This makes me look terrible.
I'll make it beautiful soon.
With pre-rendered background, we could just set the tpage to bpp, x, y of the image in vram : 8bpp, 320, 0 by default for now.
if (fixed_BGs){
( (POLY_GT3 *) poly )->tpage = getTPage( 0, 0, 320, 0 );
}
But how do we now fixed BGs are used ?
We could use curLvl.camPtr->BGtim
to determine the existence of the data, and even use prect
to know x,y coords in vram,
if (curLvl.camPtr->BGtim){
( (POLY_GT3 *) poly )->tpage = getTPage( curLvl.camPtr->BGtim&0x3, 0,
curLvl.camPtr->BGtim->prect->x,
curLvl.camPtr->BGtim->prect->y );
}
but do we want to add a function argument just for that ?
Pressing jump in level 0 does not have any effect, in level 1 it cause an unaligned address error and crashes the application.
First appearance of the bug is in d850180
Make the switch to gte inline functions for rendering.
See here for ref ; http://psx.arthus.net/sdk/Psy-Q/DOCS/Devrefs/Inlinref.pdf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.