![]() |
|
Iso 2D engine using CG Shaders [video] |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Sorry, lowering the array size to 16 didn't help. It still only works if My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
GullRaDriel
Member #3,861
September 2003
![]() |
Dario, no new shader code ? Do you give up ?? "Code is like shit - it only smells if it is not yours" |
Dario ff
Member #10,065
August 2008
![]() |
I wouldn't if that error made sense. EDIT: Now that I think about it, it just might be that it's running out of video memory, and since I forgot to put some checks, it might cause that weird behaviour. As Jones64 said, it was using almost 236 of VRAM, which I could cut down to nearly a third of it by merging some of the maps. So I'll try and code a less expensive version. What utility do you guys use to check out the VRAM usage? EDIT: Actually, it could be reduced even more since I didn't even used a Cache to load the bitmaps. TranslatorHack 2010, a human translation chain in a.cc. |
Jones64
Member #10,718
February 2009
|
Dario ff
Member #10,065
August 2008
![]() |
So, I've ported the (still horrible) shader code to GLSL, so feel free to try the new EXE and shaders(replace the contents of the old folder with this one). It might take a bit longer to load the first time since it has to cook the height map into the normal map the first time. The video ram usage got reduced by half when using a cache, but it didn't reduce as much as I expect when using the height and normal map in the same texture. I guess the GPU did some compression of its own? The main reasons I switched to GLSL:
And yes, I got it working finally on an ATI card with this utility. When trying to compile the shader with the X### mobile models in the GPU Shader Analyzer, it just said "Hardware compilation failed", not detailing anything at all. But it also said the same error with even the most simplest fragment shader ever(Just fetching the color). EDIT: Consider the thread title changed to GLSL. TranslatorHack 2010, a human translation chain in a.cc. |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
I let it run for 10 minutes and all I got was a black screen. ESC didn't work so I had to call up Task Manager and then I got a window that said Terra-ge.exe had stopped working : It crashed inside atioglxx.dll for some reason. The game log didn't say much, but maybe you can see how far it got with it : My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Dario ff
Member #10,065
August 2008
![]() |
Are your drivers up to date? EDIT: Or maybe try putting this dll on the game folder? TranslatorHack 2010, a human translation chain in a.cc. |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Dario ff said: Or maybe try putting this dll on the game folder? That didn't help. This time, all it did was open a console window with a blinking cursor and did nothing. Dario ff said: Are your drivers up to date? I have to download my graphics driver from Gateway. There's one driver that's only a few months more recent than the one I have, and there's another driver that I'm not sure is actually for my laptop, so I'm not going to mess with it. It would take over 10 hours for me to download it anyway. If you upload a debugging exe, I'll run it through gdb for you. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
gnolam
Member #2,030
March 2002
![]() |
Dario ff said: And I was astounded by the amount of crap NVidia lets me write with their compiler. IME, that's true for GLSL as well - Nvidia lets you get away with some pretty awful standards violations. -- |
GullRaDriel
Member #3,861
September 2003
![]() |
IT WORKS ! One thing: the light spot isn't moving accordingly to the scroll. Ho, and it's running damn slow, near 20 fps. "Code is like shit - it only smells if it is not yours" |
Dario ff
Member #10,065
August 2008
![]() |
GullRaDriel said: Ho, and it's running damn slow, near 20 fps.
Mostly because no optimizations are done yet. Heck, it's even drawing stuff that it's offscren. I'm glad it works on Gull's comp, but Edgar's problem is beyond my knowledge. TranslatorHack 2010, a human translation chain in a.cc. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
If you'd like me to test on my laptop (GL 2.1, intel 4500MHD on linux), I'd need source, or a linux binary. -- |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Dario ff said: Here's a debug build. Well, I ran it through gdb, but it didn't give that much info. When it crashed, the backtrace looked like this : #0 0x02dfa197 in atioglxx!DrvGetProcAddress () ... ... ... #1710 0x00410bf9 in TerraGE::Renderer::Render () Previous frame inner to this frame (corrupt stack?) But it didn't list the line of source code that came from, so it's probably not too helpful to you, sorry. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
GullRaDriel
Member #3,861
September 2003
![]() |
Edgar, did you install the latest 10.12 drivers ? "Code is like shit - it only smells if it is not yours" |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
GullRaDriel said: Edgar, did you install the latest 10.12 drivers ?
Edgar said: I have to download my graphics driver from Gateway. There's one driver that's only a few months more recent than the one I have, and there's another driver that I'm not sure is actually for my laptop, so I'm not going to mess with it. It would take over 10 hours for me to download it anyway. I don't know if I have a backup driver anywhere, so I don't want to take the chance that the new driver won't work for my laptop. It's not that important that the program work on my laptop anyway. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
GullRaDriel
Member #3,861
September 2003
![]() |
Do you still surf @ 56k ? "Code is like shit - it only smells if it is not yours" |
GullRaDriel
Member #3,861
September 2003
![]() |
That's hell of a slow one !! You're an internet gladiator Ed' ;-) "Code is like shit - it only smells if it is not yours" |
Dario ff
Member #10,065
August 2008
![]() |
I figured out there was something pretty awful going on regarding the normals map and the lighting. But I corrected it, and it looks pretty awesome. It turns out, my older maps were being rendered relative to the screen, and not the local axis of the 3d object. So the vectors of the normal space were in screen coordinates, and using the dot product with the internal light vector didn't give good results at all. That's why I just did some hacks to get something similar working. Turns out I figured out later how to render the normal maps relative to the local axis, and now it looks pretty sweet. For example: Just thought of sharing this little problem if someone wants to do something similar. TranslatorHack 2010, a human translation chain in a.cc. |
imaxcs
Member #4,036
November 2003
|
That looks way to cool to not be used in a game!!
|
Dario ff
Member #10,065
August 2008
![]() |
imaxcs said: That looks way to cool to not be used in a game
And just imagine how it'll look with animations! Here's some more eye candy now that the normals are right. TranslatorHack 2010, a human translation chain in a.cc. |
kenmasters1976
Member #8,794
July 2007
|
Looks great. Too bad my machine is so ancient to try it.
|
Dario ff
Member #10,065
August 2008
![]() |
Ah Ken, when will you start saving up for the future? The prices have reduced quite a lot now, you're missing quite a big chunk of cool stuff with that old rig of yours. (Though I would keep an old computer just for history's sake, but...) EDIT: Playing around with supporting animated objects now. Of course it's just a cube for the sake of testing if it works well, but this opens up possibilities for very complex animated characters rendered with per-pixel lighting. It'd be awesome if I could get one of these in. TranslatorHack 2010, a human translation chain in a.cc. |
|
|