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 / dark shader water

Author
Message
henrikh2008
16
Years of Service
User Offline
Joined: 25th Apr 2010
Location: Denmark
Posted: 17th Jul 2012 22:49
Hello. its has been long time i visited the forum.

there is 1 question i would like to ask.

i am new to the dark shader, but i did played around with it for a while,
just to get around and learn things, the easy way. (i know the shader programming is not that easy, maybe the language itself is easy, but the math, shader are build on, can be very complex).

i saw a video on youtube, the youtube user did create a awsome water shader
with animation, not only that, he had lots of properties, to change the shaders, etc..

my question, no i mean , how on earth, can you get all that sort of ekstra features and properties for that particular shader ?. is it in the program language, so that you programming ekstra features and properties, that will eventually show up in dark shader menu, somehow ?.

what about animation in shaders, can you really do that ?.

In the dark shader help menu / document, the document is refering to, in
the future, complex physics can be intregreted into shaders, its that posibble ?.

i would like to make a shader, water shader with wave animation.
i dont wanna go into complex math yet (not to complex!), just keep it simple for now.



Olby
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 18th Jul 2012 01:21 Edited at: 18th Jul 2012 01:21
Quote: "my question, no i mean , how on earth, can you get all that sort of ekstra features and properties for that particular shader ?. is it in the program language, so that you programming ekstra features and properties, that will eventually show up in dark shader menu, somehow ?."


Are you talking about the UI sliders and color picker gadgets? If so it's quite easy. For every variable in the shader you can specify how it will appear on the DarkShader interface: text box (default), slider and colour picker. Additionally min, max and step values can defined.



There is a relevant section in the help file (Editing Shaders -> Compatibility With DarkShader):
Quote: "Annotations:

Annotations are another optional addition to a variable declaration that defines a set of parameters you can assign to a variable. These do not effect a variable directly but are used to give more information to applications reading the shader file about what the variable represents and how it might be modified. Annotations are enclosed in ‹ and › brackets, for example:

This example is used to describe to DarkShader how a variable should appear in the shader editing box, which includes the sliders, color pickers, and text boxes. The SasUIControl item describes what type of control this variable should use, valid entries are "slider" and "color picker". If this entry does not exist the default text entry method is used. There are three other options which are only used in the case of "slider" variables, these are:

SasUIMax, which defines the largest value the slider will go up to.
SasUIMin, which defines the lowest value the slider will go down to. It can be negative.
SasUIStep, which defines the smallest increment the slider will move in one step.
Texture variables also have an annotation that must be applied for DarkBasic Professional to recognise the texture.

The annotation ResourceName should be made equal to "" for textures that have not yet been selected or a file name of a texture you want to use in this texture slot. When you export an effect from DarkShader these values will be filled out for you if you have selected textures to use with the shader.

All these entries are case sensitive and any entries that are not recognised are ignored.
"



Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 18th Jul 2012 02:17
sometimes you don't really need dark shader to create water effect.



henrikh2008
16
Years of Service
User Offline
Joined: 25th Apr 2010
Location: Denmark
Posted: 18th Jul 2012 12:38
thank you for your input.

i will use the example basjak gave me, just for fun.
and the example Olby gave me, later on.
but applying an image to a 3d object dosent give you control over
reflection tranpsercy, and refrection etc.

later on i will need to learn the HLSL language.
proeprly, the language is OOP, hope it
not to diffcult to learn. (well, it shouldnt be diffcult for me, i do have more than just a few years of computer programming, in several language to be exactly, i
admit i am not an expert, its hard to keep up with the young programmers.
i am a bit slow.
i didnt got answered to the question, can you do animation with the texture / materials / shaders in dark shader ?.

its funny, when i stared 1 year ago, with dark basic pro, i didnt know the dark basic pro syntax, but it took a more just a few weeks to get around the commands in DBP.
I am very happy , i could just take my knowledge from visual basic 6 / 2008 net, to DBP, right away, and it was easier than i expected.
now i took a few lesson / tutorials , in 3d programming in dark basic pro and after only a few days, i could do a 3rd person shooter, in no time, but offcourse very simplifiet.
i have seen people critizing DBP, even call it BABY language, this is such a rubbish, this guy, that was saying all this, (yes dark basic pro is very easy to learn), properly coudlnt do vector math, do try it in 3d and with dot scalar calculation etc, that really hard.
i admit, that my knowledge in math is a little bit rusty, well i did pick up simple vector 1d and 2d and 3d basic stuff tutorials , it wasnt that diffcult to understand, only when it comes to cosinus bla, bla, then it get hard to understand, but i will pick it up later.



Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 18th Jul 2012 12:46
Quote: "i didnt got answered to the question, can you do animation with the texture / materials / shaders in dark shader "


Yes you can.
henrikh2008
16
Years of Service
User Offline
Joined: 25th Apr 2010
Location: Denmark
Posted: 18th Jul 2012 13:21
Thank you very much for the answer Green Gandalf.
now i am a little bit more aware of what shader can do.
i think i will jump right into the section of "learning to write shaders" in
TGC forum.

Login to post a reply

Server time is: 2026-07-08 01:56:16
Your offset time is: 2026-07-08 01:56:16