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 / Saturation shader?

Author
Message
hakimfullmetal
3
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 25th Mar 2016 17:30 Edited at: 25th Mar 2016 17:38
Hello everybody.

I tried searching for DBPRo saturation shader, but all links seems to be down.

There's a code for changing HSL of a bitmap, but that was too slow for real-time rendering of 3D scene.
http://forum.thegamecreators.com/thread/34500

Is there anyway to adjust the saturation of a 3D scene?
Green Gandalf
13
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 28th Mar 2016 18:10
Should be simple once you tell us which particular version you need, e.g. see discussion here:

https://en.wikipedia.org/wiki/HSL_and_HSV


Powered by Free Banners
Kuper
10
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 31st Mar 2016 15:12 Edited at: 31st Mar 2016 15:19
Here it is

Green Gandalf
13
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 31st Mar 2016 17:11
Let's hope hakimfullmetal sees your post.

Perhaps I should have checked his link?


Powered by Free Banners
hakimfullmetal
3
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 1st Apr 2016 07:44 Edited at: 1st Apr 2016 07:45
Hey everybody, thanks!

This is probably a dumb question, but how do I properly initialize and apply that shader in DBPro main source code?
I mean, do I need to declare something first? Or just load and apply that shader?

And I saw a "HueSatLight.png". Do I need to include an image file with that name or something?
Green Gandalf
13
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 1st Apr 2016 11:58
Quote: "And I saw a "HueSatLight.png". Do I need to include an image file with that name or something?"


No. That is just a feature used by the Dark Shader editor which is a shader editing tool. You can safely comment out those first two lines if you like - they have no effect on the functioning of the shader.

Quote: "This is probably a dumb question, but how do I properly initialize and apply that shader in DBPro main source code?
I mean, do I need to declare something first? Or just load and apply that shader?"


It's not a dumb question. I'll leave it Kuper to explain how to use it.


Powered by Free Banners
hakimfullmetal
3
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 8th Apr 2016 08:12
Kuper told me to try set screen effect or set camera effect

I tried to SET SCREEN EFFECT, but I don't see any changes...

I can't SET CAMERA EFFECT. Is this command or shader exclusive to DarkShader plugin?
I don't have DarkShader though...
Green Gandalf
13
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 8th Apr 2016 16:23
Quote: "I can't SET CAMERA EFFECT. Is this command or shader exclusive to DarkShader plugin?
I don't have DarkShader though..."


It is a Dark Shader command but that comes with the later upgrades although I understand it isn't included in the Open Source version (which is confusingly called Version 1.071 in the Help>About menu).

Which version of DBPro are you using? I'm using both Version U77RC7 (shown as Version 1.077 in Help>About) and the Open Source version depending on what I'm trying to do - which is a source of confusion if nothing else .


Powered by Free Banners
hakimfullmetal
3
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 8th Apr 2016 18:51 Edited at: 8th Apr 2016 19:07
I'm using the original DBPro from TGC website (which is now gone), just upgraded to version 1.077.
But the SET CAMERA EFFECT command still cannot be used though. The command was highlighted, but nothing about it mentioned in the help files, and the compiled program just crash if it's used.

Off-topic, but I noticed that with version 1.077, a windows popped up if the program unable to detect a specified directory (SetDir command).
U77 release mentioned that they added Extra info in SET DIR error. Maybe that's the thing.
Is there a way to prevent those window from popping up?
Green Gandalf
13
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 8th Apr 2016 20:32
Quote: "Is there a way to prevent those window from popping up?"


Error messages are there for a reason. You must be the first user to complain about the presence of an error message - most users complain when DBPro crashes without an error message.

Quote: "The command was highlighted, but nothing about it mentioned in the help files, and the compiled program just crash if it's used."


Sounds like an example of what I was talking about.

More seriously, if it compiles then you can use that command - but as you say the Help files don't cover the Dark Shader commands. It's been a while since I've used that command but you might find the attached files helpful. However, I usually find the standard DBPro screen quad method of using fullscreen shaders is sufficient. The only Dark Shader commands I've found essential are the dynamic cube map ones- and they have their own limitations.

I'm busy tonight - but if I stumble across a working demo of the set camera effect command I'll post it. I vaguely recall Morcilla posted a heat haze demo which used that command successfully (and, as of today, you can now list all his threads thanks to The Next ).


Powered by Free Banners

Attachments

Login to view attachments
Green Gandalf
13
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 8th Apr 2016 21:20
Quote: "I vaguely recall Morcilla posted a heat haze demo "


Sorry. The thread was posted by Sixty Squares - Morcilla was one of the participants as was I. Here's a corrected version of the demo I posted on that thread.


Powered by Free Banners

Attachments

Login to view attachments
hakimfullmetal
3
Years of Service
User Offline
Joined: 17th Feb 2015
Location:
Posted: 8th Apr 2016 21:21
Thanks, Sorry for taking your time.
I'll fiddle around some more. Will inform if anything comes up.
Green Gandalf
13
Years of Service
User Offline
Joined: 3rd Jan 2005
Location: Cornwall UK
Posted: 8th Apr 2016 21:26
No problem. Did you see my previous post? It was posted just seconds before yours.


Powered by Free Banners

Login to post a reply

Server time is: 2018-09-24 03:09:11
Your offset time is: 2018-09-24 03:09:11