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 / Bloom interesting problem!

Author
Message
MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 3rd Aug 2016 00:51
Hello guys,

I am trying to create the following thing: When i press the E key, I want the bloom shader to appear and after releasing the E key, to disappear. However, When I test the level with just a character and a plain object underneath for not falling, I press the E key sometimes it works but sometimes on certain camera angles, the object underneath which is included in the for loop (1 to sceneobject) disappears totally and re appears after I release the E key. So conclusion: The Bloom shader appears on certain camera angles(lol). Why it does that?

Here is the code:



PS: I have a set camera to follow command to follow the main character!

Thank you very much! I am in big trouble with this problem...
Alex Matei CEO
www.alexmatei.com
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 3rd Aug 2016 01:56
Hello Alex!

I had a problem with objects disappearing that was solved in this thread.
Hope this might help, if not then good luck anyway!
Send your parents to noisy sprite demo hell... enter the D-Zone
MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 3rd Aug 2016 09:28
Hello Derek,

Yes I saw that post and tried the fix and it worked so well with objects that where scaled to be very small . However, here i forgot to mention that that when that object disappears, even the camera stops following my character and the nouse control is gone.

Thank you!
Alex Matei CEO
www.alexmatei.com
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 4th Aug 2016 22:37
Hi, Alex.

The first thing here that sticks out is this code in the SYNC section. You are checking if camera 1 exist then setting the camera mask to camera 0 without actually syncing.



Second and third, I don't see the need to check the existence of every resource before setting properties or loading etc... and constantly deleting and loading resources on the fly like this is something to avoid.

The attached project of the simple bloom code demonstrates turning bloom off and on without deleting anything. Use the "q" key to turn bloom on and release to turn it off.

Attachments

Login to view attachments
MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 5th Aug 2016 17:55
Hello WickedX,

I tried what you told me. It makes exactly the same thing, at certain angles it shows and at other angles the objects disappear from the screen and the camera stops following the player

Thank you very much!
Alex Matei CEO
www.alexmatei.com
MateiSoft Romania
10
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 5th Aug 2016 17:56
Maybe its not from the shader code, maybe it interferes with a bit of code in my function?
Alex Matei CEO
www.alexmatei.com

Login to post a reply

Server time is: 2024-04-19 19:36:02
Your offset time is: 2024-04-19 19:36:02