Well, I'm trying to! It's amazing how much code rots when you leave it for a while. I need to have a good clean out tomorrow and sort out what's good and what's junkbenryves wrote:Wow, nice to see you're getting back into the project.
Progress Thread - New demo - Cobra Mk III (18-May-08)
Moderator: qarnos
Re: Progress Thread - New demo - Cobra Mk III (18-May-08)
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org
avatar courtesy of driesguldolf.
avatar courtesy of driesguldolf.
Re: Progress Thread - New demo - Cobra Mk III (18-May-08)
I've been doing some work on a 2D OpenGL-style graphics engine, and decided to take a crack at doing some texture mapping (mainly for rotatable sprites).
I thought I'd post it in this thread, since it is slightly related to 3D, but probably too slow to use in Aether.
The texture in the demo is 32x32 pixels. The mapper supports tiling (though it is buggy at the moment) and I hope to implement masking.
It comes at a cost though - each texture you want to use requires generating a 512-byte lookup table. If it weren't for that, it would be horrendously slow.
There is lots of 16x16 bit multiplication involved, which accounts for much of the slowness. The inner loop in the mapper also takes around 200 T-States to fetch each texel - which adds up very quickly if your texture occupies a large area of the screen. Smaller images are reasonably quick though.
I thought I'd post it in this thread, since it is slightly related to 3D, but probably too slow to use in Aether.
The texture in the demo is 32x32 pixels. The mapper supports tiling (though it is buggy at the moment) and I hope to implement masking.
It comes at a cost though - each texture you want to use requires generating a 512-byte lookup table. If it weren't for that, it would be horrendously slow.
There is lots of 16x16 bit multiplication involved, which accounts for much of the slowness. The inner loop in the mapper also takes around 200 T-States to fetch each texel - which adds up very quickly if your texture occupies a large area of the screen. Smaller images are reasonably quick though.
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org
avatar courtesy of driesguldolf.
avatar courtesy of driesguldolf.
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Re: Progress Thread - New demo - Cobra Mk III (18-May-08)
Ace. Could you use it for billboarded sprites in Aether, maybe?
Re: Progress Thread - New demo - Cobra Mk III (18-May-08)
Looks nice. Ah, I need to master images handling. I could can make cool stuff.
Re: Progress Thread - New demo - Cobra Mk III (18-May-08)
Hmmm... if I was going to use it in Aether, there's no real reason to restrict it to billboard sprites. It could get ugly if you use a texture on a high Z-depth polygon, but on a 96x64 b&w display, who's going to notice?benryves wrote:Ace. Could you use it for billboarded sprites in Aether, maybe?
Here's an example of what it could look like. This is a 64x32 image of an Apollo spacecraft scaled to an (initially) square polygon. After the rotation, the polygon is warped around a bit.
"I don't know why a refrigerator is now involved, but put that aside for now". - Jim e on unitedti.org
avatar courtesy of driesguldolf.
avatar courtesy of driesguldolf.