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 / 2D draws behind 3D when using bloom shader

Author
Message
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 30th Oct 2011 21:06
Hi all



[Project folder is attached]

First of all I'd like to point out that DBPs documentation is pathetic, and it took me quite a while to get this damn shader working. There's absolutely no information on load camera effect or set camera effect, in fact, DBP doesn't even know those commands exist.

With that out of the way, can anyone tell me why 2D things are drawn behind 3D objects? Sprites, images, text, 2D shapes... I'd like them all to be in front of the object, not behind it... This also gave me a headache, because I was wondering where the hell my GUI evaporated to when I first implemented this shader o.O

Much thanks,

TheComet

Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 2nd Nov 2011 17:41
I don't think you can do that, because your using a post-process shader, that takes control of 2D drawing, so it might always have the post effects image pasted over your GUI.

I think the only way around that would be to render everything as a seperate camera, then paste the camera output to the screen and then draw your GUI, keeping 3D and 2D completely seperate.

Health, Ammo, and bacon and eggs!
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Nov 2011 00:45
Here's one alternative... paste the camera image instead of texturing the screen.



Health, Ammo, and bacon and eggs!

Login to post a reply

Server time is: 2026-07-11 12:00:46
Your offset time is: 2026-07-11 12:00:46