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.

Newcomers DBPro Corner / Dark Shader Help.

Author
Message
Servant Saber
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location:
Posted: 3rd May 2009 23:15 Edited at: 4th May 2009 20:56
My apology's in advance for posting on this forum if this is the wrong place for it.

Alright, here's what's up.
I recently started using Dark Shader in Darkbasic Pro, And
I was looking in the help files for the full screen shaders and how to use them, The problem is I seem to be having a problem with two commands that are needed by the shader for a project.



It seems like Darkbasic Pro does not understand the above commands(It gives me a syntax error of "Could not understand command at Line X) and won't compile.
Any ideas?
Servant Saber
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location:
Posted: 4th May 2009 20:58
Any ideas guys? i'll see If I can post my project as soon as possible, I'm at class so I don't have access to my source.
pc nerd
User Banned
Posted: 4th May 2009 22:03
the set camera effect 1,1,1 is most lickly the problem as the default camera number is 0. so change the camera number to 0

dweeb
Servant Saber
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location:
Posted: 5th May 2009 00:38 Edited at: 5th May 2009 16:09
It's compiling and running now, but something strange is happening, whenever I move my camera view around, say a object in the scene, the screen flashs with the shader effect, like the shader camera is not attached to the player camera and only works if your looking in a certain direction.

I really have no idea what i'm doing really, so any help would be great^^
I've posted my entire project code below

pc nerd
User Banned
Posted: 5th May 2009 22:01 Edited at: 5th May 2009 22:01
I looked at your coad and it looks fine, but i cant realy test it without your shader.

dweeb
Servant Saber
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location:
Posted: 6th May 2009 03:15
I've attached the enitre project folder, just run it.
If everything goes as planned, you should see a white screen as you start the game, but as you move the camera, it seems to go away somewhat, very odd...

Attachments

Login to view attachments
James H
17
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 6th May 2009 06:07 Edited at: 6th May 2009 06:09
You need to rotate the camera quad object to the same position and orientation as the camera. You also need to texture the quad with the image from the camera effect.
I`ve uploaded a .rar file. In it is a folder with a dark shader project file you can open in dark shader(choose to import the media). Once opened in dark shader goto file>export>export all. Find the folder that dark shader created with dbp project and media. Copy the rest of the folder contents from the .rar file into the newly created project folder, overwriting any existing ones. Compile and run. Hold spacebar to regain access to the mouse(ie no camera controls) and some sliders should popup. Hope it helps, dark shader doesn`t always produce code thats entirely correct - one line in there refers to ViewSize constant incorrectly when this project was exported from dark shader(read the rem statements - I think GreenGandalf wrote something about how to correct it in the Learning to write shaders thread on the dbpro board). The sliders I made are just to show you how to set constants for the shader.

Attachments

Login to view attachments
Servant Saber
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location:
Posted: 7th May 2009 02:05
Thanks alot Guys, I really mean it, I really needed to get shaders to work, and they do now!

James H, thanks alot mate for the code, I'm still looking it over and comparing it to mine, But I'm sure I'll figure out how everything
works.

Login to post a reply

Server time is: 2024-09-28 06:24:41
Your offset time is: 2024-09-28 06:24:41