Jump to content

Recommended Posts

Posted

So I have a couple of floats (ok millions) that I convert to bitmap (it's*my pet project - madelbrot renderer*- floats come from f(x,y), then I use color gradient info to convert it to RGBs).

*

I do this in two steps - first generating floats (that's usually slower), then rendering (converting to RGBs/bitmap) - I do*this in two steps*so that user can dynamically change gradient in real-time.

I can do 20 fps at 800x600 with no anti-aliasing on core2, but that's too slow if somebody wants to view fractal over whole screen.

 

Right now I use 24bit RGB*format - but*the question is - will my code run faster if I use 32bits per pixel (aRGB) format*and use int to write color to a*pixel array instead of using 3 bytes?

That way I'll use*1/3 more RAM*bandwidth and use few shift and OR instructions,*but on the other hand have 3x less*ram operations.

 

It's really not that much code to change (couple of hours), but I'm lazy and*if you know answer from experience please do*tell it to*me. I've got a feeling aRGB will work better, am I right? :)

 

Oh I use C#.

 

More...

 

View All Our Microsoft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...