tag:blogger.com,1999:blog-2543858175797658864.post8833141938645130130..comments2023-06-03T09:48:30.964-04:00Comments on Trash Can of Code: Fun Shader Bugscottonvibeshttp://www.blogger.com/profile/15542648017139504620noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-2543858175797658864.post-15795122707445958002010-12-06T01:45:59.235-05:002010-12-06T01:45:59.235-05:00hey, cottonNES is looking pretty good!
suggestion...hey, cottonNES is looking pretty good!<br /><br />suggestion: It would be nice to post the compiled x86 for comparison instead of just saying "this resulted in worse code," or something. Maybe there is a plugin for that? :P<br />Not a big deal, and probably a huge pain for you - but something along those lines would make it more clear. Perhaps you could just say what kind of optimization the compiler used to produce better code under the given circumstances.shuffle2https://www.blogger.com/profile/08201827125412664984noreply@blogger.comtag:blogger.com,1999:blog-2543858175797658864.post-17011655145959078262010-11-23T19:55:34.562-05:002010-11-23T19:55:34.562-05:00buffer is a class member variable, and combineLaye...buffer is a class member variable, and combineLayers() is a class method.<br />buffer is statically allocated, and it currently does not have any specified alignment (aside from what the compiler defaults it at).<br /><br />I already gave the exact format of each pixel, the code is being used with different renderers, but in DirectX the format is called D3DFMT_A8R8G8B8.cottonvibeshttps://www.blogger.com/profile/15542648017139504620noreply@blogger.comtag:blogger.com,1999:blog-2543858175797658864.post-5889654942346134062010-11-23T17:49:40.986-05:002010-11-23T17:49:40.986-05:00By the way, I dont think the device handles 24-bit...By the way, I dont think the device handles 24-bit +1 color, so please specify the exact format detailed. It really matters now.ElectroFuzzhttps://www.blogger.com/profile/05911492790143947929noreply@blogger.comtag:blogger.com,1999:blog-2543858175797658864.post-75715412069974469132010-11-23T16:56:25.070-05:002010-11-23T16:56:25.070-05:00Thank you very much for the details!
Ok right now...Thank you very much for the details!<br /><br />Ok right now i'm working on the optimization of the combineLayers optimization BUT i need another explanation:<br />Is buffer allocated statically? (fixed in memory, never deallocated and all sizes fixed)<br />Is it aligned? (somehow)<br />This is very important if you want to make the procedure super optimized.<br />Anyway I'm working on that, assuming the answers are "yes".<br />Please excuse me if I made language errors, I know, my english is poor.ElectroFuzzhttps://www.blogger.com/profile/05911492790143947929noreply@blogger.comtag:blogger.com,1999:blog-2543858175797658864.post-63173766395017279952010-11-23T15:59:52.242-05:002010-11-23T15:59:52.242-05:00buffer was declared as:
u32 buffer[3][240][256];
(...buffer was declared as:<br />u32 buffer[3][240][256];<br />(u32 is a typedef for unsigned 32bit integer)<br /><br />the pixel color format is Ax8|Rx8|Gx8|Bx8.<br />But for the alpha channel byte, its always either 0x00 or 0xff, since the NES only needs transparent/non-transparent tiles (no alpha-transparencies).cottonvibeshttps://www.blogger.com/profile/15542648017139504620noreply@blogger.comtag:blogger.com,1999:blog-2543858175797658864.post-75589926810638707452010-11-23T01:37:36.194-05:002010-11-23T01:37:36.194-05:00Hi cottonvibes
You can make it a lot faster!
Just ...Hi cottonvibes<br />You can make it a lot faster!<br />Just let me know how exactly "buffer" was declared and tell me about the pixel color format.<br />Great job, i really appreciate.ElectroFuzzhttps://www.blogger.com/profile/05911492790143947929noreply@blogger.com