MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 320 posts ]  Go to page Previous  1 ... 18, 19, 20, 21, 22
Author Message
PostPosted: Sat 16 May, 2009 12:45 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 01 Dec, 2005 9:04 am
Posts: 227
Location: Melbourne, Australia
benryves wrote:
Wow, nice to see you're getting back into the project.


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 junk :P

_________________
"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.


Top
 Profile  
Reply with quote  
PostPosted: Sat 06 Jun, 2009 10:29 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 01 Dec, 2005 9:04 am
Posts: 227
Location: Melbourne, Australia
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.

Image

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.


Top
 Profile  
Reply with quote  
PostPosted: Sat 06 Jun, 2009 11:59 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Ace. Could you use it for billboarded sprites in Aether, maybe?


Top
 Profile  
Reply with quote  
PostPosted: Sat 06 Jun, 2009 1:18 pm 
Offline
Regular Member

Joined: Sun 14 Sep, 2008 10:00 am
Posts: 88
Looks nice. Ah, I need to master images handling. I could can make cool stuff.


Top
 Profile  
Reply with quote  
PostPosted: Sun 07 Jun, 2009 7:58 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 01 Dec, 2005 9:04 am
Posts: 227
Location: Melbourne, Australia
benryves wrote:
Ace. Could you use it for billboarded sprites in Aether, maybe?


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?

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.

Image

_________________
"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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 320 posts ]  Go to page Previous  1 ... 18, 19, 20, 21, 22

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt