Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Realtime water, using the vertex shader (translated from DBPro)

Author
Message
scrapisv
15
Years of Service
User Offline
Joined: 23rd Jun 2009
Location: Sweden
Posted: 5th Jul 2009 17:46 Edited at: 5th Jul 2009 19:37
I translated the code that dark coder has written to DBPro and made some very small changes.
http://forum.thegamecreators.com/?m=forum_view&t=138011&b=1



You must have a video card that supports VS3.0 otherwise it will not work!

Attachments

Login to view attachments
scrapisv
15
Years of Service
User Offline
Joined: 23rd Jun 2009
Location: Sweden
Posted: 5th Jul 2009 20:51
Here comes the source code for those who don't want to download the file with the effects and graphics, but is curious how the source code looks like.

prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 5th Jul 2009 20:54
wowz0r that looks beast! if this works like the screenshot I OWE YOU A BEER


Your signature has been erased by a mod
scrapisv
15
Years of Service
User Offline
Joined: 23rd Jun 2009
Location: Sweden
Posted: 5th Jul 2009 23:24 Edited at: 6th Jul 2009 00:31
Quote: "wowz0r that looks beast! if this works like the screenshot I OWE YOU A BEER "

Come and get me a beer for it looks like that
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 6th Jul 2009 07:11
Nice work Looks just as cool from underneath as above too lol

Would be interesting to see how system intensive a technique like that would be in an actual game setting, Im sure with some management it would be usable though.

If it ain't broke.... DONT FIX IT !!!
scrapisv
15
Years of Service
User Offline
Joined: 23rd Jun 2009
Location: Sweden
Posted: 6th Jul 2009 19:25
I did a quick bridge, created a terrain map and decreased size of the waves a little bit.



With a little more work, I believe it would be possible to use it in a game

Attachments

Login to view attachments
scrapisv
15
Years of Service
User Offline
Joined: 23rd Jun 2009
Location: Sweden
Posted: 7th Jul 2009 20:44
I sat me down and played a bit with the water today and the result was this.




My FPS is between 115 - 120, so it does not seem to be too demanding for your computer.

Attachments

Login to view attachments
The Viking
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 12th Sep 2009 06:08 Edited at: 12th Sep 2009 06:21
Hey, Im not a Dark GDK user, but by the looks of it you may be able to help me understand a problem i had with this shader. You managed to have other objects present though when i have a simple model, the model begins to glitch when the water is visible behind the model. Another thing is it tended to render the water INFRONT of the model no matter the positioning. Do you have any idea whats going on?

Here's a pic to show you what i mean... thanks if you can help at all

PS, I reduced the polys in the water thats why it looks choppy for the water, oh and the bottom of the waves behind the other ones are visible...

www.myspace.com/norseblod

Attachments

Login to view attachments
BearCDP
15
Years of Service
User Offline
Joined: 7th Sep 2009
Location: NYC
Posted: 12th Sep 2009 07:53
The screenshots look great, but unfortunately the program won't run correctly for me. My laptop has an Nvidia 8600M GT, so it should have VS 4.0. I changed dbSetDisplayMode to 1440x900 (my native resolution), and ran it. But, in full screen it just locks up, can't even exit with ESC.

When I then comment out dbSetWindowOff, then it throws an exception at the first dbSetEffectConstantFloat call. If I call dbSetDir("../"); towards the top of the program, then it no longer throws an exception, but no media still loads, and it looks like the screen never updates. It stays black, and the FPS counter in the corner draws over itself as the FPS changes. Is anyone else having this problem?


Also, side question: I've mainly used DBC in the past, and since I'm experienced with C++ and Java decided to give GDK a whack. How is it kosher to assign the same object ID to multiple objects? Is this a sort of grouping system available in GDK and Pro?
kordman916
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location:
Posted: 14th Nov 2009 19:29
Dude, How did you change the color and opacity?


Dell Optiplex GX280,3.4 GHZ Pentium 4 processor
1 Gig DDR2 ram,Geforce 8500 GT 512mb
cyangamer
16
Years of Service
User Offline
Joined: 2nd Jun 2008
Location: Houston, TX, USA
Posted: 4th Dec 2009 05:29 Edited at: 4th Dec 2009 05:41
Looks cool. It crashed when I tried to use it though, and I have an advanced video card (GeForce 9800 GT). Hmm...

EDIT: Your first version works when I compile it in VC, so never mind. It looks okay, but the waves are not as smooth as I was expecting.

Currently working on - Enemy AI using Dark A.I. I probably should've looked at the reviews in the Dark Physics and Dark A.I. forum first.
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 7th Dec 2009 00:46 Edited at: 7th Dec 2009 00:47
this thread just gained my first bookmark in opera (on my laptop)
=)
looks pretty sweet btw



kordman916
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location:
Posted: 5th Jan 2010 02:30
Does anyone know how to change the color and opacity?


Dell Optiplex GX280,3.4 GHZ Pentium 4 processor
1 Gig DDR2 ram,Geforce 8500 GT 512mb
kordman916
16
Years of Service
User Offline
Joined: 5th Oct 2007
Location:
Posted: 4th Mar 2010 23:29
No one?


Dell Optiplex GX280, 3.4 GHZ Pentium 4 processor
1 Gig DDR2 ram, Geforce 8500 GT 512mb
ZooMxLLL
15
Years of Service
User Offline
Joined: 7th Mar 2009
Location:
Posted: 9th Mar 2010 12:27
It's very nice example but it's too slow .. (30 fps)
NightX
15
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: Australia, QueensLand
Posted: 10th Mar 2010 10:39
Umm.. i tried it and i don't see anything ... I probably don't have Vs3.

Login to post a reply

Server time is: 2024-10-02 01:36:09
Your offset time is: 2024-10-02 01:36:09