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 / Strange Problems with the Fresnel Water Shader from Shader Pack

Author
Message
Twisted Steel Software
16
Years of Service
User Offline
Joined: 21st May 2007
Location: Teh Interwebs
Posted: 30th Jul 2007 07:48 Edited at: 30th Jul 2007 08:14
Hello all, I'm having a problem with the Fresnel Water Shader from the Ultimate Shaders Pack 1.0 Finale. The refraction of the water is displaying a distorted image of my task-bar/start button and a few lines of unreadable text. The original problem with it displaying random blue boxes was fixed with changing the camera numbers.

Also, can someone tell me how to find the sync mask numbers? isn't it
0x10000000 for one and 0x01000000 for two?

Thanks in advance,
Jim
Daggeth
17
Years of Service
User Offline
Joined: 3rd May 2007
Location:
Posted: 30th Jul 2007 08:28
The Sync Mask command is too stupidly complex.

Theres 32 cameras.. 0 means it is masked (ie: WONT sync) so say you only want to update cameras 2 and 3, what number would you generate?

0000 0000 0000 0000 0000 0000 0000 1100

Right? So now you go ahead and do a binary conversion

0000 = 0
1100 = 12

So you get

0 0 0 0 0 0 0 12

Then you assign a hex value

0 = 0
12 = C

0 0 0 0 0 0 0 C

YAY!!1

0x0000000C :X
bandM
17
Years of Service
User Offline
Joined: 27th Sep 2006
Location: Home
Posted: 30th Jul 2007 10:53
You can also use powers of 2.
For Camera 1 = 2^1
For Camera 2 = 2^2
For Camera 3 = 2^3
For All Cameras = 2^0 etc...
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Jul 2007 13:41
Quote: "Also, can someone tell me how to find the sync mask numbers? isn't it
0x10000000 for one and 0x01000000 for two?"


You seem to be trying to use bits rather than hex - and have got the bits in the wrong order.

If you want to sync cameras 1, 2, 3 you could use

sync mask %1110

i.e. camera zero and cameras higher than 3 if they exist are NOT synced. The low bit is on the RIGHT of the bit string.

But I usually use bandM's idea (or simple powers of 2 like 2, 4, 8) because I'm used to thinking that way.
Twisted Steel Software
16
Years of Service
User Offline
Joined: 21st May 2007
Location: Teh Interwebs
Posted: 30th Jul 2007 14:36 Edited at: 30th Jul 2007 14:41
Thanks everyone!

@Everyone who helped: Thanks a million, I've got the swing of things... but, the water shader is still messing up and is displaying a distorted image of the task-bar... really odd... I'm going to try a restart of my comp, doubt it will help though......
Twisted Steel Software
16
Years of Service
User Offline
Joined: 21st May 2007
Location: Teh Interwebs
Posted: 30th Jul 2007 15:24
Sorry for the double post, edit post isn't working... Restarting my comp didn't help a bit. It's now being used without refraction as of now, as it's messing up still. I must say, it's still amazing-looking, whether it has refraction or not. The mixture of reflection and Fresnel looks truly amazing.

If anyone has a quick fix for my problem, or anything that might help, post here please.

Thanks in advance,
Jim
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Jul 2007 17:14
My guess is that you need to do two things:

1. Upgrade to U6.6b (to make sure that you have the latest shader and camera features).

2. When you have done 1., check the camera numbering in the water demo dba file. If it's the demo I'm thinking of the cameras are numbered 30, 31, etc, whereas since about upgrade 6.3 they should be numbered consecutively from 0 (0 is the screen of course).

I've changed all EVOLVED's water demos to use the new camera numbering and the demos now work fine.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 30th Jul 2007 17:20 Edited at: 30th Jul 2007 17:31
Quote: "YAY!!1

0x0000000C :X"

Or you could just write 0xC.

If it really bothers you just do something like this:



I'd personally use binary notation.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 30th Jul 2007 18:52
Quote: "I'd personally use binary notation."


Doesn't matter - as long as you do it right.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 30th Jul 2007 19:11
Quote: "Doesn't matter - as long as you do it right."

Of course, I was just stating my personal preference.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Twisted Steel Software
16
Years of Service
User Offline
Joined: 21st May 2007
Location: Teh Interwebs
Posted: 1st Aug 2007 14:15
Doesn't help... the numbers are 1 and 2... not in the 30's. Just seems really odd... oh well, something to fix, heh.

Well, now that I have a dock in the water, it would help imensely to be able to walk on top of it As of this day, I'm going to attempt to get Newton in there... or maybe ODE, I'm not sure yet.

If I decide against both of them, is there another way?

Thanks in advance,
Jim
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Aug 2007 23:17
Could you post simple example code plus media (images plus fx file) which shows this problem? Might be able to fix it.

Also, which upgrade of DBP are you using?

Login to post a reply

Server time is: 2024-05-20 12:32:12
Your offset time is: 2024-05-20 12:32:12