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 / Hide object not working with shader code

Author
Message
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 22nd May 2012 05:07
I'm pretty sure I know where the problem is, but I'm not sure how to fix the code. The game I'm trying to make has a lot of polygons so I really need to be able to hide objects when they're not in the screen.



http://mattsmith.carbonmade.com/
Scraggle
Moderator
22
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 22nd May 2012 12:09
Have you tried excluding the objects instead of hiding them? I don't know if that will solve the issue with shaders but it is a more efficient way to 'hide' your objects.
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 22nd May 2012 15:02
Oh man, I've never even used that command before.
Thanks, just what I needed.

http://mattsmith.carbonmade.com/
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 31st May 2012 00:56 Edited at: 31st May 2012 00:56
Caution:

What they didn't tell you is that you can only change the objects "EXCLUDE" state one per sync/fastsync. This is not in the help file.

If you exclude an object, then try to make it visible, when you draw the screen that object for that frame will still be invisible. On the second sync/fastsync it will update and appear. And vice versa.

This is only really a problem if you need that next frame to absolutely show the object. Such as taking a screenshot.

Lets say you copied Duke Nukem 3D, where you put a computer screen on a wall showing a semi-live snapshot of another area of the level. You are excluding that level area for speed. You can easily end up with a snapshot with missing objects. fyi.

Login to post a reply

Server time is: 2026-07-07 22:23:30
Your offset time is: 2026-07-07 22:23:30