Hello everyone! It's been a while since I last posted.
I was recently struck by inspiration and made this Gouraud shading routine.
At its simplest level, this is a modification of a texture mapping routine I wrote a while's back, so I've decided to try and implement a whole libraries worth of 3D primitive routines.
Here's a short list of things I plan to write and/or rework:
1. Rework functions to be passed a pointer to a struct describing the triangle and its parameters.
(general struct that's data members are interpreted differently by each routine)
2.Rework texture mapping to work from a predefined texture page(256 x whatever aligned area of memory in the $D0xxxx range) so arbitrary sized textures can be drawn.
3. Implement some level of perspective correct drawing. At the could mean:
a. Raycaster style 'walls' with repeating textures (constant z per x line)
b. Raycaster style 'floors' ( constant z per y line ) (maybe using a lookup table for each scanline? )
I don't think generic perspective correction is very viable for actual usage, but who knows at this point
I was recently struck by inspiration and made this Gouraud shading routine.
At its simplest level, this is a modification of a texture mapping routine I wrote a while's back, so I've decided to try and implement a whole libraries worth of 3D primitive routines.
Here's a short list of things I plan to write and/or rework:
1. Rework functions to be passed a pointer to a struct describing the triangle and its parameters.
(general struct that's data members are interpreted differently by each routine)
2.Rework texture mapping to work from a predefined texture page(256 x whatever aligned area of memory in the $D0xxxx range) so arbitrary sized textures can be drawn.
3. Implement some level of perspective correct drawing. At the could mean:
a. Raycaster style 'walls' with repeating textures (constant z per x line)
b. Raycaster style 'floors' ( constant z per y line ) (maybe using a lookup table for each scanline? )
I don't think generic perspective correction is very viable for actual usage, but who knows at this point