#[WIP] Seamless Dungeon
1640 messages · Page 2 of 2 (latest)
wondering if this might give you any clues as to where to look for a fix for this bug
I feel like this might be a matter of patching something in HDRenderPipeline, but not exactly sure what or where
oh I freakin forgor that you mentioned it was caused by the custom pass 
makes perfect sense that it only flips opaques
at some point I gotta look at what AssetRipper can do with the posterization to see if that lets us work around or even fix the bug with obliques
I think i tried that... you can export the like compiled shader code but its pretty unreadable without like an understanding of low level shader code
I only know hlsl and glsl
I hate that i keep having to like leave this project and come back to reread all the code i've done ; -; I SHOULD be pretty stable with free time to work on this now got a new job so less stress regarding that
where could I get teh mod?
glad to hear that, I'd be down to try and help brainstorm sometimes too
it would be really cool to finally get this working
I'm still wondering about my idea to add a depth offset, I gotta try and see if I can make a custom opaque shader that does that and see if the posterization shader reacts as I hope
ah, damn, I thought I had heard about a proper shader decompiler, too bad if that's not a thing
or do you mean that it decompiles into hlsl or something similar, but it uses very basic operations that make it really verbose?
Uhm when i tried decompiling it atleast this was a bit ago though. It came out in, really low level instructions. I don't remember what it was in though. I just know it was past my knowledge of graphics
a lot of it might just be due to how shader graph compiles, since it places a method for each node type into the shader
even reading a compiled shader graph is really not pleasant
is this abandoned
oh
I just heard news that someone is going to eat this mod and
Oh yeah?! Well I heard
finish this now
i dont like it when cool things become
LOST MEDIA
read up a bit and
yeah what i just said was /j
but still would like this done when you finally get time
atleast where do i get the beta i saw this in a yt vid
No I get it, I want to finish it badly! I’m just not the best at balancing my time, especially when I get busy
ah ok
Link?
lost it ill try and find it tho
I don’t believe I’ve given it out except to one person, that was before my rewrite
I do have videos throughout the thread though
cant find it but i know i saw it
could you (since you want it to be released aswell) as soon as its releasable make it publick labelled as extremely early version?
Can you release a beta
The conception of this started with the christmas event last year lol
It ended up being alot more work than i originally thought. You can code portals from scratch very easy but the mix of zeekers shaders, and HDRP is a nightmare
yeah i realized that lmfao
im glad there was someone who thought about the same thing as me
cant wait to use this!
Oof
Maybe ask the lethalmon team for help or smthn they made portals for barber and i think its only not see-throuh to save resources
🙏please release a beta or a alpha or something
Portals for barber? is that a mod or something
My issue isn't the portals them selves it's that parts of the celshader wasn't working properly with it i've yet to try zagster's suggestions though havn't had the time
Its the mechanic of the barber from #1253321657297408052
Like a portal from the game portal or something more basic because looking through the thread I didn't see anything about it
That doesn't really help me I have the movement perfect and seamless
It's the graphics that arent
Especially going from inside to outside
Zeekers turns the sun off and all the lights, I almost got the steam valves to render last time I worked on it as well
It's alot of like rendering fuckery
You're being quite persistent with asking the Dev to release the mod :P
im clinically impatient
and they said they understand bc they do aswell
Understandable
Nonetheless, she doesn't seem comfortable releasing it without polishing/fixing the rendering and shading issues (for what I've read it is a headache)
yea
I know we all have been waiting for this mod to release for quite a while, the concept of the mod is freakin' cool and I also want to see this finished some day
All I'm saying is
Let her cook
onki
btw don't take what I wrote as something directed towards you, nor as if I'm talking for the mod's dev. It's more of a general message for others who keep asking, especially if they aren't polite xd
oki
I appreciate it ^^ i get alot of messages and as much as i want to finish it, paying rent is a priority @_@
The other thing about portals in unity HDRP is that they aren't performant i had to write my own algorithms because unitys hdrp versions suck badly. This one in specific takes 7ms(with the other stuff i'm doing) on my computer RenderCamera.CalculateObliqueMatrix which you need to be below 6.9ms for 144hz(fps)
So ontop of everything else that's already ill performant.
I took nvidias algorithm to calculate oblique projection matricies and decimated it, i do alot of assumptions which isn't great, but is really performant and can now achieve ~3ms which still isn't great, but way better than unitys. You can see the math representation of it in this image
Figuring out where this bug lies whether it's in my math, something unity is doing, or in the celshader itself is awful. Especially since i can't reproduce it in unityengine, only in lethal company
I'm 90% sure it's an issue with the cel shader
@hallow basin had an issue with it flipping the result of a planar reflection probe as well, and once we disabled custom passes on the probe it worked perfectly
I was messaging them, i'm not entirely sure what the best options are because disabling the custom pass looks jarring.
I could make my own celshader/use someone elses.
or just not have it enabled and have a jarring transition
I haven't had the chance to test it out, but I still wonder what would happen if you make an opaque shader with a depth offset that samples the depth texture of the render texture
should be possible in shader graph, I believe
okay maybe not ??? not sure what this is about
but if you can output the render texture to SV_Depth in a shader lab shader instead maybe?
👋🏻👋🏻👋🏻 How is it going in here?
PING I want to follow this mod
Maybe ask how minecraft immersive portals mod did it
Once again it’s not about how it’s done. It’s the cel shader
I’ll be free around Christmas to work on this though
Is that more expensive? It’s already pretty intense to do what I’m doing(on hdrp atleast) I had to make a lot of micro optimizations
O ok
Good mod
WAIT! How does this work for the doors?
I wouldn't think it should be expensive, since things already have to write to the depth buffer, it would just be calculating a per-pixel depth in the pixel shader instead of using the interpolated one from the rasterizer
but it's not something I've had a chance to experiment with much
if at all
Will it have compat with chameleons “change exterior door” config?
iirc all it does is make the doors disappear and show the inside of the facility from the outside, it shouldn't affect the doors unless the door doesn't use the main entrance prefab or something (i think)
It does affect the doors I have them openable and you can see through the bars on some
Last time I worked on it I was reworking how it identified doors, because it was inconsistent with mansion doors
Still clicking on this thread everytime I see a new message in here :3

Can you guys like stay on topic please, I like to scroll through here to look at actual information that can help fix stuff
On a related note I might try to make a mirror object inside the ship to test stuff on so it’s disconnected from the portal logic. Since mirrors act similar to a portals lol
Theres alr a mod for this btw
Called morror decor
Hmm I’ll take a look at it see if they do anything with the celshader
oh that's a good idea and also it would be nice to have a proper mirror to replace MirrorDecor lol
it just uses a fixed camera, not a proper mirror projection matrix, so it probably won't provide any insight unfortunately
it's a very primitive implementation
Ohh @-@ that reminds me of like games how they did mirrors
I would definitely like to have a look at the shader situation once I'm done with the stuff I've had on hold for a while but idk how long that'd be
I can definitely help out occasionally until then at least
would be cool to figure out how to make a portal shader work with the custom pass
Portals are less shader stuff more gameplay logic, atleast without writing a ton of manual hdrp shader code. Which I don’t want to do because editing hdrp shaders is a nightmare
It’s like a lot of boiler plate baked in. Other branches of unity shaders are piss easy to do portals with
Idek why lethal uses hdrp it’s not a high fidelity game
Besides the steam valves
yeahh the shaders are a pain for sure
Wait i think i know a vid that may help
If it’s unrelated to lethal company it won’t
The first 500 people to use my link will get a 1 month free trial of Skillshare: https://skl.sh/acerola01241 ! #ad
Lethal Company has some very compelling visuals, but how much of it did the developer make themselves? And how does it all come together?
Topics covered: Frame capturing, fixed resolution rendering, edge detection, posterization, ...
Cool
Decompiling shaders though sounds kinda awful if the next time I work on it I can’t get it I’m going to make my own celshader lol it’ll be easier and hopefully look similar
Ok
The vid explains how the shaders work for you to make it similar
oh man i havent checked this thread in ages
sadly this is a pretty shallow video
unusual for acerola
there's the cel shader included in the patcher too, maybe it could be based on that if it comes to it
I forget who, but someone put a lot of work into getting it quite similar to vanilla
Yeah I remember seeing that
He normally goes really in depth
I have them in my dms somewhere I’ll scroll through it if I get time to go on my computer today
This is my most anticipated mod 👁👁
It’s not even the most advanced mod I’ve ever made but it’s for some reason the most annoying to make lol
I made an separate game/network engine that works asynchronously for the game rust for doing really advanced server side shit
Was too much effort to maintain but that was a good amount of code in comparison to this
@slate barn I wanna see if I can fiddle with the depth-write shader now actually, would the camera output the desired depth value for the screen already or would I need to use an offset from the portal quad's fragment depth?
writing the depth directly without modification is probably significantly easier if I had to guess, but either way it changes how it has to be written I think
wait so whats currently the problem?
zeekers or perhaps a unity bug flips da portal
Hmm I don’t know how depth works for an oblique frustrum I’ve never particularly needed to mess with it, does depth typically start at the near plane or the camera itself
oh god
good question tbh
is there an easy way for me to set up a camera with an oblique frustum in the editor? doesn't matter how bad perf is, just for testing
So I have the mod working well without the celshader on, but with it on I get weird stuff happening, where the rasterized colors are upside down but the depth isn’t. And then if you look directly at a door it fixes it self but it’s pretty pixel perfect it’s extremely weird behavior
I think cameras normally do use the near plane, but hard to say whether it's the flat value that is set on the Camera or something based on the near plane of the frustum
Uhm in unity editor? Yeah there’s a command on the camera itself I believe, you supply it a clip plane iirc. It has to be with code though.
ah I see, so I can just use a helper object and an editor script hopefully
See that’s where it’s probably getting fucky because the “near plane” float does not update because it’s not the same for the entire near plane. When you cut it
yeah
So any logic based on it breaks
if we can set it to match the main camera then maybe
I did a deep clone of the main camera before
Its performance intensive and didn’t help
oh yeah I know it wouldn't help with the flipping thing yet, but if the near clip is the same, it might result in us getting back main-camera-space depth values
Ohh
I really have no idea though, I just gotta test this out I think
I assume before creating the oblique matrix you have to set the portal camera to the same relative position to the interior door that the main camera is to the exterior door?
No the camera is inversed to the player
Oh
Yeah I misread
I can give you my portal code it’s essentially written to be a generic unity one
oh sure, that might help
would you be willing to hop on vc? might make this go faster lol
Will this mod support the moon mod and the interiors mod?
it uses portals to show the interior
so yeah, it will def support a lot of moons/interiors
(might have some issues here and there)
How are things going👁👁
Still really looking forward to this one
Any chance the mod could be released as 'early access' for those who already have cel-shading disabled given you think it's running well without it?
It could also be beneficial allowing people to test and report any bugs prior to an official release.
what happened to this one
its just like i remember this thread opening up in like.. february or january 2024?
lol
i really hope it sees the light of day!
yeah february 1st 2024 lol
So tempted to close the thread
i mean i dont want to say that LC is dieing because maybe its not that bad
but stuff like this really helps keep it relevant for now
I get you guys want this, it's not a small mod and i am not a mentally stable person, and i some how am keeping a job where i work 65 hours a week. I'm exhausted i want to finish it, but context switching alot makes it hard
hey man, that's definitely a lot to handle for you. i understand, not stable myself, and i worked 50-65 hrs for over a year once
I was unemployed when i did the majority of the work on the mod
I think at this point I really wanna ask zeekerss if we could see the custom pass to see if we can make it work with oblique projection or something
He replies on twitter, i messaged him before about stuff
Albiet i used my of twit account lmao
except I guess I haven't yet explored the avenue of using the one from the patcher project
the rumor has always been that he's very modding-adverse
I highly doubt that
key word rumor
i think he just doesn't really entertain it much given hes working on like three projects
indeed, that's why we have to keep our requests fairly small and easy to fulfill
it's understandable
well, i can tell this is a labor of love for you. if it takes forever to come out, so be it. there will always be some people who want to enjoy modded lc. but i think we're becoming an endangered species at this point.
the one in the project is very different in how it is applied, in game one is a lit material that redraws every opaque object, the one in the project is a fullscreen postprocessing shader
so you wouldn't be able to draw any direct conclusions from testing with it
it's not about comparing them, it's about straight up using it
I wonder if that's relating to why i have issues, aren't cellshaders typically a fullscreen shader?
but yeah I don't really understand why the vanilla custom pass uses a draw renderers custom pass, it's bizarre
that's very probable, because if you manipulate depth values this thing overrides it
the camera has a transparent quad in front of it so that the custom pass applies to every pixel anyway
maybe so the rendering stuff can upscale everything? because as i understand this game is in a super low resolution and then unity upscales it to native
and from what I could tell it doesn't actually use the depth of the fragment? only the depth from the buffer?
not the one in the game, it's a draw renderers custom pass
I COMPLETELY FORGOT THATS HOW IT DOES IT
yes, but the filter applicaation is not going on that plane
hmm
i remember when i first opened up lethal company and flew around i saw that and just thought it was the stupidest thing
the plane just has a render texture right?
I think its to crush the resolution though right?
it seemed like there is a gameplay camera and a ui camera and we see the image from the second one
when you remove it, the fog in infinite depth on snow maps just disappears
and the gameplay camera gives the world view
right, but that's not what I'm referring to
and the custom posterization pass only affects the gameplay camera
that's true yeah
so from my analysis it just reads a depth, normal and color buffers in view space and uses it to calculate the outlines and posterization and then uses that as a texture when redrawing each object in the scene
the thing I wondered is whether the draw renderers custom pass just screws up projection when it involves an oblique projection matrix, which would make me think that if we could get the vanilla shader to draw on a fullscreen pass it might work
but when I tried to do that it didn't draw anything iirc
i kinda made it work, but it needs some tweaking to get 1:1 correspondence
oh how so?
if you managed that, it would be good to show how so that tsunderella could check if it fixes the issue in the oblique projection
the only thing that is not possible to replicate is the fact that most objects glow white-ish in the distance even through fog in the original pass
even if it doesn't totally work right it would hopefully tell us if it's worth pursuing
i took the one in ripped project and modified some things that were wrong (from my perspective), nothing super crazy
I wonder if you could create a pass to write to the stencil buffer to make it skip drawing to infinite depth?
unfortunately the one in game cannot be used as a fullscreen one cuz it's not compiled for this
ah no, that's not obtainable D:
the original one doesn't? since it's draw renderers
it's applied only to opaque objects
the one in the patcher is fucked up in that regard, yes, that's what i fixed
ah, then I guess I was misunderstanding this
so objects that are far but still within the far plane will already white for some reason?
one sec, let me get a pic
so in vanilla, objects in the distance look like that through fog
they actually shouldn't be that visible, but I'm not sure if this is a stylistic choice or a bug
is this with foggy weather? that doesn't look right
do you have a visor remover?
yes it is, nope
if you stand in a light beam it gets way more intense for some reason
go in the light
😇
top of the hill by the ship on exp
what you're seeing is what happens when you remove the plane:
or at least it looks similar
idk if that's the cause in your case
wait sun off? where was all that light from then
from the ship xD

it is with mrov's blackout weather, but he doesn't change anything about rendering
i think you can observe this effect when you look at far unlit (as in dark) objects while standing in a bright spot
wtf lol
what's your GPU?
I'm wondering if maybe fog on transparent requires some feature that some GPUs would be missing
intel 😎 💀
Transparency is a bitch if you ever tried to do it in barebones engines
I would imagine it might involve some compute shader stuff more than transparency issues tbh
volumetrics use compute heavily I think
but fog on transparent works for me, at least when i made the snow shader i could see that
ok, this effect is very obvious on vow
when you land you can see white silhouettes of the surrounding hills, for example
nope, just clear weather on vow
huh, yeah, that's pretty much the same for me here
maybe I had thicker fog on exp than you
frick you discord
i actually went on exp and it's hard to replicate there on vanilla, i agree, guess it was made way more obvious by the blackout weather
it looked like your pics during normal weather
so yeah, this particular effect is hard to replicate in the fullscreen shader without demolishing fog or lighting (at least judging by my first attempt)
in any case i want to make a proper fullscreen shader that matches vanilla as close as possible and publish as a mod, because the original doesn't work for tesselated or transparent materials. this is mostly to make snow look more inline with the game, but maybe it would find some use elsewhere
@slate barn what I would want to test instead then is whether disabling the material override (or changing it to a plain unlit material) in the posterization custom pass results in things appearing right side up again
I would test but I don't really have an easy way to see an oblique projection in-game :(
if it doesn't change the opaques' orientation, then I wonder if the bug might be in HDRP itself
which we can probably just patch ourselves
(if we can figure out where it's going wrong)
how does the fullscreen pass actually break the fog? I know it probably places lines on the edges of the objects through the fog, but I believe that the transparent plane is supposed to reduce that effect when it is viewed through fog
it doesn't break it outright, i meant in a way that when you draw outlines (or anything really) over the current view they themselves aren't affected by fog. there are ways to fix it or at least minimize, but i havent played with this too much yet to be honest
there is also an injection point "Before Sky and Fog" but it's broken in that version of hdrp and is actually AFTER fog is rendered D:
oh well sounds like something worth patching :^)
but as far as the outlines, I think that maybe they just fade by distance, then the rest of it is taken care of by the fog on transparent that normally comes from the plane in front of the visor?
that moment when you need to patch a whole render graph pipeline to make a rather simple thing 
I've done it multiple times already 
i actually didn't know about this plane's existence before now, lol
what does it do exactly?
but in general yeah, it's possible to carefully reuse the color and depth buffer so this overlap is not noticable
well what's odd is that the effect of the plane is sometimes visible on some other invisible object in the scene so it's hard to see the difference always
but it often makes distant objects have fog when they didn't before
fog also becomes slightly thicker in the ship
on the light volumetrics
plane off
plane on
oh god, so it uses some custom material?
I forget tbh
damn that's quite a difference lol
it really varies in its effect
on snowy moons it mostly just affects where opaques have not drawn to depth
it's just HDRP/Lit
it has a texture "dropsCondensation", so perhaps it is controlled by something in HUDManager?
I'm pretty sure that something else also has the same effect in the scene as well, though, and I haven't got a clue what it is
it is only visible at certain camera angles, which is why the sky can become visible in spectate randomly
or it might not even be another object, it might just straight up be a bug in the fog rendering

(it is)
ye, just found it too, but it seems to change the alpha value of the texture and that's it
if we're talking about HelmetCondensationDrops()
yeah
love y'all thanks for caring so much about this project. i think im gonna disappear again now for an indeterminate amount of time... lmao
Thats a lot to read
Indeed
I'll try to make my mod compatible with this one as mine only does the preview and not the pass-through, that said my mods also adds the sound exchange between interior and exterior. Definitely looking forward to this though
@slate barn I was wondering if you could make compatibility for Mimics (fake fire exits). Also, is it possible for smaller outside enemies to access the interior? It’d be cool to be chased around the facility by an eyeless dog
They said that the navmesh stuff was very buggy and caused sutterings, so apparently no they can't go inside
This is a shot in the dark, but maybe have StarlancerAIFix be a dependency?
Can't tell, I don't know
@slate barn Here’s a mod you may want to look into if you want indoor and outdoor enemies to seamlessly go into and out of the facility.
she is aware of it, I don't believe that is among the current issues that are holding it back
How are things going? 👀

The only thing iirc that couldnt go in/out was slime. Last time i tested
I believe it was more of a shader issue than anything
Busy with life
Unless i can some how get 6 figures modding i can't neglect my job and it's currently it's busy season so its hard to find time.
I will update this thread when i have something of substance, but i'm literally working right now lol
It's fine, nobody is forced to work 24/7 on their plugin 👍
Life has its reason that reason wouldn't be able to ignore
it's not the right quote at all but it's fine
matrices projection... I know how hard it is to deal with matrices, I made a level viewer almost from scratch, rendering worldtoclip and cliptoview, or was it worldtoview and cliptoview ? Anyways
tough
But I never heard of "oblique" projections, what does it mean exactly ?
Essentially imagine the near plane not being a parallel flat cut
Oh I see
But why is it not flat ? Why is it oblique ?
Wait, that's how you calculate the position of the camera and the camera clip plane ?
yeah my bad it sounds logical to make the camera clip plane oblique compared to camera's origin
So the issue has something to do with shaders, why though ? The ship has cameras and it works fine iirc
I get why it's not possible to get rid of the effects on the camera though
its easier to visualize in 2d.
imagine the blue lines being a normal clipping plane for near and far.
red would be an oblique near clipping plane
It will make that the post-processing is visible on everything but not through the portal
Yeah that's what I imagined
You would allign the oblique plane with the portal surface
Yeah so it means that the rect has 4 different points, instead of an origin and a length/height
I've watched this video by Sebastian Lague to understand how portal effects were made in videogames, it was very interesting and it had an optimization part iirc -- That said I don't know if it applies to HDRP Unity projects
Experimenting with portals, for science.
The project is available here: https://github.com/SebLague/Portals/tree/master
If you'd like to get early access to new projects, or simply want to support me in creating more videos, please visit https://www.patreon.com/SebastianLague
Resources I used:
http://tomhulton.blogspot.com/2015/08/portal-rende...
this was my implementation because unitys built in was slow.
public static void SetObliqueProjectionMatrix(
this Camera camera,
ref Vector4 clipPlane,
Matrix4x4 sourceProjection,
ref Matrix4x4 inverseProjection
)
{
float sX = Mathf.Sign(clipPlane.x);
float sY = Mathf.Sign(clipPlane.y);
float qX =
inverseProjection.m00 * sX
+ inverseProjection.m01 * sY
+ inverseProjection.m02
+ inverseProjection.m03;
float qY =
inverseProjection.m10 * sX
+ inverseProjection.m11 * sY
+ inverseProjection.m12
+ inverseProjection.m13;
float qZ =
inverseProjection.m20 * sX
+ inverseProjection.m21 * sY
+ inverseProjection.m22
+ inverseProjection.m23;
float qW =
inverseProjection.m30 * sX
+ inverseProjection.m31 * sY
+ inverseProjection.m32
+ inverseProjection.m33;
float cMult =
(
2.0f
* (
sourceProjection.m30 * qX
+ sourceProjection.m31 * qY
+ sourceProjection.m32 * qZ
+ sourceProjection.m33 * qW
)
) / (clipPlane.x * qX + clipPlane.y * qY + clipPlane.z * qZ + clipPlane.w * qW);
sourceProjection.m20 = clipPlane.x * cMult - sourceProjection.m30;
sourceProjection.m21 = clipPlane.y * cMult - sourceProjection.m31;
sourceProjection.m22 = clipPlane.z * cMult - sourceProjection.m32;
sourceProjection.m23 = clipPlane.w * cMult - sourceProjection.m33;
camera.projectionMatrix = sourceProjection;
}
}```
This makes ALOT of static assumptions
It even has a part dedicated to optimization lol
can you release a beta version of the mod?
But it sounds a bit "newbie"-esque to follow youtube tutorials lol
My portals work in my unity project. i coded it to be seperate from lethal company. its issue with lethal companies cel shader more than anything and maybe some dot product mess ups on my end with it
Have you posted what it looks like with and without the celshading ? is it not possible to make a shader that does the same post-process than the normal camera but it substracts it ?
I know some shader stuff, but cel shaders aren't the easiest to make look good/replicate. IIRC someone in the discord did replicate it though was thinking of asking to use it
Either way, have you seen how rendering to main camera is made in the game ? The actual camera is under the map
It would probably be possible to get the portal clip area on the render texture and render it over the render-texture of the camera
I don't know if it's clear
but the game actually shows a texture rendered on a plane, as the gameplay camera
Yeah, the issue ends up being one of two things.
When you look directly at the portals center it flips the depth upside down. thats why i think its more towards a dot product error. I might of have a picture of it still
I'd really be interested into looking at what it looks like
It's hard to imagine, only described with words
Like I HAVE NEVER SEEN SOMETHING LIKE THAT
I don't want to suggest already tried solutions, and it's quite hard to explain to be honest
But have you tried to negate the Y multiplier used to render the colour texture ?
the skybox seems to render correctly over it
or, more like, behind it ?
I'm not in context of unity so i can't say if i did try that or not.
Without the celshader it looks similar to this (in editor)
it does look like an error in the dot product yes, I would love to fuck around and find out with these portals, last time I did that I reversed the terrain meshes metadata of a game engine, but it took 3 weeks, playing around with matrices and multipliers and all
clearly not worth
i lack of mathematical a computer-scientific comprehension of matrices in rendering
To be honest, I planned to implement a similar feature into my mod, not exactly a portal, but a way to see through the windows of the facility's doors to see what's going on inside, it would also have sound exchange, that said I don't know if it's really a good idea for several reasons, first my mod is meant to enhance monsters, it's not a Global Game Overhaul, secondly it looks quite tough due to the celshading (?) and lastly, I would like to make another mod that would use portals, which is a mod idea I'd really like to work on before I start my preparatory classes.
It would be a mod called "Theatre of Insanity", and basically what it does is that it smoothly transports isolated players outside of the dungeon, inside the affectionately called "Theatre of Insanity" that is canonically a place that doesn't exist (it does, but it's for the lore), that is just the materialization of the insanity of the player. It would be a liminal place, similar to backrooms but based on dungeon's theme, repeating indefinitely the same intersection, and after like 30 seconds, a mob similar to the little girl would spawn, make the player's flashlight blink and then, due to the fear caused by loneliness and overthinking, the player would run around and be smoothly transported back into the normal dungeon, in an isolated area.
That's an ambitious project, but I know that the worst part will be doing the actual portal, closely followed by making a new DunGen system generating and deleting intersections on the fly, all that based on current dungeon's theme
i think I lost myself, all that to say that I won't be doing the same thing as do you but I would love to work on your project as well
based on the image, it feels to me more like it's flipping just the color buffer when it applies posterization, which comes right after the opaques are rendered, and then the skybox renders where the depth is >= far clip in the un-flipped depth buffer
in theory, transparents should also show up right side up, you could probably test by looking at a lootbug through the portal since they use a translucent shader
I have a feeling that the issue lies somewhere in one of the nodes that zeekerss used in the posterization shader graph, but I don't really have anything to back that up
I really want to ask zeekerss if it's possible for us to see the graph and test out some solutions with the original graph, but that might be overstepping
I do want to make sure that it's not caused by a bug in HDRP first though, since the posterization uses a draw renderers custom pass that might just be projecting the opaques completely wrong
That's what I think too
I was gonna tell something, but then I remembered that the opaque texture is rendered correctly
It's been a while. How are things going?
🧟♂️
This project is technically extremely complex, I ask you for the dev of this mod not to urge it 😄
Just thought about this @slate barn, what's the big difference between "MirrorDecor" and Seamless Dungeon that prevents you to use its camera thing ?
Looks pretty fine to me
Look at it from the side
I remember looking at the code of it before i can't remember what was off about it, it might have the same issiue i had with dot products. It's been a bit since i've looked at it though so i can't say for certain
it's been busy season for my job(i'm salary) so i have 70 hour weeks of non stop programming, it's a lil exhausting to program in my freetime as well
I can understand the issues with the shader but math issues...
70h a week ???
Where the human rights at ?
Eh i get compensated fairly it's helped me pay off my debt lol
America
At this point i feel like im being trolled
I refer to the message i put not even an hour ago
XD
Sowwy i just dont check this server alot :<
Opaques are much easier to get reflections working with
Opaques ?
It's obviously not a real reflection tho
It's using a camera that shows what it sees
"reflections" doesn't have this quality
The lack of proper post processing and the fact that’s a very isolated area
Handling lighting between the moon and the interior is fucked conceptually
Yeah that's fair
When you go through doors the sun literally tuns on and off
I accomdated for that mostly
I couldn't get steam from the valves to render properly though either
Yeah i deep clone the players camera to have all the same settings except for ui related features
Which one ?
Uhm the one on the actual model
Oh ok
it doesn't use oblique projection
it is a fixed camera
as far as I'm aware, there's not a single live mod using oblique projection except for the planar reflection probes in Liminal Pools
I mean the oblique projection is far from being the worst problem
It's a certain math problem of course
But it's not a wall, unlike the shader thing
the shader thing doesn't happen without an oblique projection matrix
the oblique projection matrix is non optional
This is true
Yeah I get the shader issue, it's caused because the surface of the portal is not skipped by the render pipeline of the main shader
So it actually shades it
But what we want is not to shade it
And apply the shader yo the other camera
So the projection has no effect on it
But it's not just an oblique proj thing, in facts it's not really because of the oblique proj, it's just that the oblique proj makes it remarkable
The cel shading is affected by the projection matrix
Which is why there’s issues
Yeah the solution is to make a layer mask that the celshading doesn't celshade on
if there's not already one
the posterization shader running on the portal camera is what makes it flip, not the gameplay camera
the issue is avoided by disabling custom passes on the portal camera, but we don't want that, because it will then look out of place unless it is rendered onto an opaque material, which causes it to lack the thick lines that come from the depth buffer edge detection on everything else in the gameplay camera
Yeah that's why it needs to skip the portal surface but apply again the posterization on the portal camera
It is
The issue is coming from the cel shader being applied to an oblique projection matrix
It causes dot product errors of some kind
I linked it before, but
scenario one:
It's aways flipped unless you are looking straight at it and are perpendicular.
scenario two:
Invert it and its correct until you look straight at it then it flips
When the celshader is turned off it works fine but looks awful
I could just recreate/use another celshader that looks similar
Because without the source code to the actual celshader its really hard to debug
#dev-general message
I encountered this when i first started making this a year ago, and i've rewritten the plugin 3 different times to try to counter it
Ah that's this one, I thought the celshading was offf
🔥
Does it live? 🥺
is it?
☠️
killing my balls
This mod is STILL not out yet?
This shit is gonna be like Silksong
In dev for almost two years now 😭
Notezy you are our only hope 😭🥀 /j
I’ve been busy with work but if anyone needs help with the math I can, I think the more annoying thing when I did have time was dealing with the existing cel shader but it could of been something I messed up early on making it hard to debug that and hdrp being hdrp lol
Ah that pathetic man
Unfortunetly shader work like this is a little bit out of my league
Was worth a shot 😔
if scoops ever comes back we could ask them
since they were already working on deconstructing vanilla shader
I think if anything if remaking it from scratch and the same bug arises I would just recreate the cell shader in a way that would be compatible
I wouldn’t ever release the mod without atleast something to make it look closer to vanilla because without the cell shader I think the game looks bad, and if I only disable it in the doorways it ruins the seamless aspect
Sadly, I am allergic to Math and Shader Code 
I tried and yeah the cell shader does not like the portal shader at all
It looks fine in the unity editor because the cell shader isn't there
does look cool AF tho
could another option be generating the first tiles right outside the door and tping you after you enter?
even if it looks bad, at least is something
Without editing the map it’d be inconsistent and not great
Atleast from how I’d view it
I don't know much about shader work, but what's the problem with the shader stuff, like why cant the vanilla shader be re-used (I'm speaking after only watching the brackey's video on portals lol), I do plan on trying to tackle portals for an interior idea so... I'm trying to be not pessimistic lmao
Turns out I was doing something wrong with my camera calculations and it wasn't the shaders but there is still some weirdness with lighting
you fell off 😔
the video didn't immediately ended after kill bind
I think I got around that lag by calculating the projection matrix not using unitys function because it was buggy in hdrp
I think atleast I ran into that as well
You should open source it on GitHub so people can contribute to it and we can get a polished version.
that tree clipping into the camera makes me think this isn't an oblique projection matrix with the portal as the near plane, am I wrong?
I thought the issue was specifically with oblique projection, just orienting the camera relative to the portal exit isn't enough
Yes because when I tried to do oblique projection this happened
right
but interior portals just simply won't work if that's the solution
any portal exit area would have to be specifically designed around this in order to avoid clipping
I'm aware of that
Yeah too many maps have stuff right behind interior portals to not use obliqueproj and without it stuff gets weird looking perspective wise if there’s a hallways behind one
not to mention that some interiors likely have double sided walls that would just totally break it
The near clip rect needs to be projected as well
Oh yeah
I see. Let me see how to possibly fix this
I remember seeing similar to that
Is there other post process on cameras projection before the oblique projection ?
@slate barn not sure if you're still interested but next update zeekerss is changing the ingame shader to be a full screen shader, which im told was the major blocker for this project, just thought to let you know :p
we're so back(?)
Thanks for the heads up, has no one else been able to do anything like this yet? Might pick it back up I do have more free time starting soon
the lethal update for it isn't out yet (though we technically already have the shader since its the exact same one from #1345089401100701778's dev) so no one's done anything
if i have time i've wanted to make portals for a non euclidean environment but that'll probably take time :p
The portal system I made was pretty dynamic I wanted to make it a library but you know how things go
I love non euclidean stuff
i'd love to take a look at that sometime, im a bit intimidated cuz from what i learned it's a camera trick, but if i wanted to do that in an interior i'd need a way to do it across a bunch of rooms with one camera so i dont hog all the frames with the interior
worth noting that the Sponge dev finished reverse engineering the shader, so theoretically their version should be identical to vanilla, though I haven't tested that personally
I'm very interested to see it, it's very cool that this is a thing now finally
@tall valley @'ing because if there is interest in this kinda thing maybe worth considering if any of the shader should be modified in order to support the idea of it needing to be sampled by other mods in any certain way? dunno what that would specifically entail but maybe worth talking about before it hits the public
like eg. if certain things can be more easily exposed idk
I'd certainly be interested in helping with shader stuff. I've done view portal tricks before in unity and they're fun to work on.
How was the portal system working for this project before? Was it using an extra camera?
you can do portals without extra cameras?
Most likely not in Unity. The rendering pipeline (and occlusion) is probably too complex for a shader to change what angle/position objects are viewed from inside the shader and not have it look awful.
Anyway, if it's a camera, was the issue before that the camera was rendering the portal using the original shader (or with no shader), and then the player camera was applying it again but without depth info?
Same 
the issue was that for some reason the pass that re-rendered the geometry with the custom pass was flipping things vertically in the portal camera in most cases, seemingly due to issues with how HDRP's shaders handle the oblique projection matrix
or that's my understanding of it from screwing around with it for a few days
as far as what might be necessary to make the seamless dungeon portals work well with the new fullscreen pass, I suspect the main problem would be making it so that the portal rendered to a mesh in the main camera doesn't apply the shader a second time
I would suspect the solution to that would be to just render it in the transparent pass, since I would assume that the fullscreen pass renders after opaques and before transparents, like the original custom pass did
any passes that run after transparents should also be disabled in the portal camera, which I expect would mainly be the color correction
might need some blending between color correction settings if entering the interior changes those, but not sure if that's the case
Yeah, transparent pass would work, or just apply a mask to the shader.
It already masks everything with depth=0.0 (to avoid shading skybox), so if you wrote depth=0 to the portal that could also work.
I don't remember if I was able to find a way to write an absolute depth value in an HDRP shader actually
it's been so long since I screwed with this, but I was experimenting with grabbing depth from the RenderTexture and writing that in the shader that paints the portal, I forget if I was having trouble with getting the values to convert correctly or if I couldn't write depth at all 
i remember i tried making a kind of
space hole kind of thing
something that let you create a tunnel between two places
but the problem i ran into was that like
there was objects that let you create visual holes in geometry
but it only worked if the object was capable of transparency
things defined as aboslutely solid didnt do it
probably related to how rendering works
since all the stuff behind it basically wouldnt exist anymore
id have to interrupt that stuff earlier in the process and i dont know if Unity lets you do that
not sure what features you're talking about, but if it relies on alpha, you probably needed the material to use alpha clipping
but that's not related to what we're talking about
My attempt never really went anywhere because I am not mathematically smart enough to calculate the non-euclidean portals
does this stop at portals that shrinks/grows you?
Here's a demo of a rendering engine I've been working on that allows for Non-Euclidean worlds.
Source Code and Executable:
https://github.com/HackerPoet/NonEuclidean
If you like the things I do and want to support the channel:
Merch: https://crowdmade.com/collections/codeparade
Patreon: https://www.patreon.com/codeparade
Ko-Fi: https://ko-fi.c...
most obvious example
but you get what i mean
Following that tutorial you’ll run into issues
Unity hdrp doesn’t function the same in my experience
i think last tutorial i checked out was from brackeys
it wasnt specifically non euclidean but it basically was since it was seamless portals
Non Euclidean comes with that the tech debt of having to scale the player/camera atleast depending on what your trying to achieve to make it seem less
i can sorta see that, i'd probably more so wanna explore the room manipulation side of it, if that makes sense
Is the development planned to be continued with v80 ?
I just got no answer, it doesn't mean no.. for now
they did say they stopped progress because they couldnt find how to continue
Yeah, I know, but with the shader update it should be doable
idk if the shader change, or whatever comes in v80, will be enough to continue progress
:c
oh
didnt even see you already replied XD
was busy while typing
you could take a look :3
(10 days later)
Hey how's things going y'all?
Lol
Dafuk
There's........so much........wrong.....oh man
I wish this was generated......the fact it's real actors makes it so much worse
completely different approaches, but this mod has some pretty similar features to this
Someone could probably make an addon to my mod for this exact functionality... or maybe I could later down the road if I really feel like it. It's not planned though
I wonder what happened to the dev of this mod
Replicating the shader of the game for the entrance was apparently very painful