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.

DarkBASIC Professional Discussion / Water shader and seaground problem

Author
Message
Liopriwo
14
Years of Service
User Offline
Joined: 2nd Dec 2009
Location:
Posted: 1st Mar 2010 19:10
Well, I don't know how to understandibly explain my problem, but I give it a try:

I've modified Evolved's Water Terrain example, by adding a plain for the ground (imagine, you have an island, the sea and you want the player to be able to swim out to the sea, so if he looks down, he must see something beneath him).
The island and the sea is no problem, but if I add the groundplain, then the water get's brown and it doesn't look very nice.
Activating fog is also no option, because then the ground shows strange behaviour, probably because it's to large (I commented the fog commands out in the source, so you can see what I mean).

I would be very thankful if anybody knows how to fix this problem.

Attached: The modified Water Terrain example

Attachments

Login to view attachments
luskos
16
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 3rd Mar 2010 00:19
I download what you attached but can`t fully understand what is your problem?Can you explain better?Attach images if you can and let me see what seems wrong to you.

Where there is a will, there is a way.
Dragon Knight
17
Years of Service
User Offline
Joined: 10th Jan 2007
Location: Newcastle
Posted: 3rd Mar 2010 08:59 Edited at: 3rd Mar 2010 09:03
Here's the updated FIXED version attached
https://forumfiles.thegamecreators.com/download/1972819

The problem:
The water is rendering what's below the surface and editing it's data that's how it gets some of it's colours. So when you have the yellow sand texture it mixes it with the blue to get a sort of brown colour.

The solution:
I loaded two images for the ground, one being the original and the second being my edited blue sand.

2nd I added some little code to switch the textures for that object depending on the height of the camera. The height may not be perfect at the moment but you can fiddle around with that.

3rd if I don't get a thank you i'll be sad

Attachments

Login to view attachments
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Mar 2010 20:45
Quote: "3rd if I don't get a thank you i'll be sad "

Thank you?



My signature is NOT a moderator plaything! Stop changing it!
Dragon Knight
17
Years of Service
User Offline
Joined: 10th Jan 2007
Location: Newcastle
Posted: 5th Mar 2010 00:36
haha, thanks Mobiius. Made my day ^-^

Login to post a reply

Server time is: 2024-05-04 23:15:16
Your offset time is: 2024-05-04 23:15:16