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 / CAMERA TO IMAGE z-buffer how do I access it?????

Author
Message
The Weeping Corpse
14
Years of Service
User Offline
Joined: 19th Sep 2011
Location: United Kingdom
Posted: 22nd Nov 2012 20:02
Anybody know of a way to access the zbuffer of the image after CAMERA TO IMAGE has been rendered?????

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Nov 2012 03:42
I could only find this so far...


Quote: "enable object zbias"


Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Nov 2012 12:41
I guess you just use another camera and image and store the Z value in it with a shader. You'd need to code the z value in some way.

Otherwise I'm not quite sure what you mean.



The Weeping Corpse
14
Years of Service
User Offline
Joined: 19th Sep 2011
Location: United Kingdom
Posted: 24th Nov 2012 15:29 Edited at: 24th Nov 2012 15:44
It seems vanilla DB pro doesn't provide any access to the underlying z-buffer storage.

I love DB but I'm becoming increasingly frustrated by it.


I want to use 2 x CAMERA TO IMAGE and have them share the same z-buffer. This can't be done without massive changes to the internal DP code but is trivial in pure C++ DirectX.

This is taken from the internal core code



The above code is called during SYNC or FASTSYNC and as you can see the z-buffer is always cleared and can't be overridden.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 24th Nov 2012 17:06
What happens when iMode = 1?



The Weeping Corpse
14
Years of Service
User Offline
Joined: 19th Sep 2011
Location: United Kingdom
Posted: 24th Nov 2012 17:27
I know what your'e thinking but there is no way to control the value passed in iMode because it's hard coded further up in the code chain:




Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 24th Nov 2012 17:37
Interesting.

Makes you wonder what the point of the code comment was.



Login to post a reply

Server time is: 2026-07-07 10:12:21
Your offset time is: 2026-07-07 10:12:21