Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 2 3 4 5 … 18 Next »
Depth
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Depth
10-06-2021, 11:56 PM, (This post was last modified: 10-06-2021, 11:57 PM by 57e11a. Edited 1 time in total.)
#1
57e11a Offline
Cheating Donating Member
***
Posts: 198
Threads: 68
Joined: Apr 2019
Depth
Playing with 3D2D, and I'm having issues, not having
Code:
render.overrideDepthEnable(true, true)
doesn't make them occlude, but having it makes things within a single context clip with eachother:
[Image: toh6Kxp.png]
[Image: ZPC5Gj7.png]

she/her
Founder of The Anisu Corporation
[Image: iZUefQi.gif]
Find
Reply
11-06-2021, 04:05 PM,
#2
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Depth
That's just the nature of the depth buffer. There's not enough precision to stop it z-fighting.

Are you trying to occlude what's emitted behind another emitter, or just the windows inside the same emitter? If the latter you shouldn't need to do anything special, just render in the right order.
Find
Reply
11-06-2021, 04:14 PM, (This post was last modified: 11-06-2021, 04:57 PM by 57e11a. Edited 1 time in total.)
#3
57e11a Offline
Cheating Donating Member
***
Posts: 198
Threads: 68
Joined: Apr 2019
RE: Depth
Each window is it's own 3d2d context in one SF emitter

she/her
Founder of The Anisu Corporation
[Image: iZUefQi.gif]
Find
Reply
11-06-2021, 05:11 PM,
#4
57e11a Offline
Cheating Donating Member
***
Posts: 198
Threads: 68
Joined: Apr 2019
RE: Depth
Which I don't see a problem with, seeing as Wiremod's screens are using a 3d2d context, essentially drawing a rect, then drawing over that rect, which is what I'm doing
https://i.imgur.com/bIelp38.png
https://github.com/wiremod/wire/blob/mas...b.lua#L332

she/her
Founder of The Anisu Corporation
[Image: iZUefQi.gif]
Find
Reply
11-06-2021, 05:59 PM,
#5
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Depth
Wiremod screens have a model behind them that writes to the depth buffer. If the screen part extended past the model it would have the same issue.

If you want to avoid precision issues you need to avoid rendering everything to the depth buffer, and instead order your operations such that depth writes don't affect parts of the same plane, only other planes.
Find
Reply
11-06-2021, 07:50 PM,
#6
57e11a Offline
Cheating Donating Member
***
Posts: 198
Threads: 68
Joined: Apr 2019
RE: Depth
So, draw closer windows after farther ones?

she/her
Founder of The Anisu Corporation
[Image: iZUefQi.gif]
Find
Reply
11-06-2021, 08:12 PM,
#7
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
RE: Depth
(11-06-2021, 07:50 PM)тѕсм.Quiru Wrote: So, draw closer windows after farther ones?

Exactly, that way they render the right way

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread:
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.