#Custom Fog Shaders💭
1 messages · Page 1 of 1 (latest)
Global Height Fog
Local Fog Volumes (not exactly volumetric tbh)
Shoutout to @floral tartan for deleting my fucking message because I dared to attach the 3 pics together to the original post
In future just upload one/two and attach the others after in the context, these bots are repetitive which is why it's blanketed
Looks cool though
interesting, assuming this is radial fog and depth distance attenuation?
I'm not really using the default depth buffer. The GShader library gives me an RT that packs pixel world pos into .rgb and inverted pixel depth into .a
For the radial attenuation I just get the distance of the pixel from the camera
And for the edge fade for the volume I just get the pixel's distance from the bounding box's edges, and then smoothstep depending on the provided EdgeFade value
radial fog 🥀
wish i could have that local volumetric fog
would be amazingly useful for gulches and valleys with fog covering
Soon
A better fog volume. This one is actually volumetric and obscures stuff behind it, also they can overlap nicely now.
Stackable Radial Fog instances
now how do you make the volume look like some cloud
or typically like graveyard fog
the answer to both is noise textures
and yeah i am looking into that as well dw
as long as you don't really care about physical accuracy and light contribution to the fog, then yes i believe i shall
physical idc much, lights would be nice but also you cant compute every light source ever its a given
ive ran into this issue myself, every other game deals with this a bit differently
but there is no miracle solution
i do want to look into light contribution
projected texture support would def be nice
oh my god i literally needed this
soo like wheres the github or smth
i'll put it up soon
i want to at least get 1 noise masked fog volume ent in
then make some icons and pics n' shit for the workshop
does it support custom shapes?
right now i've only got a box volume
its width and height are customizable
i'll probably add a sphere as well
maybe a cone if i can figure that out as well
2D Noise modulated volume
3D one is up next
@gentle pilot Graveyard fog u were interested in :]
this one is a 2D noise one, but i'm about to do 3d as well
i want both as 3D noise textures are harder to get a hold of, and afaik vtfedit can't really handle big ones too well?
sec lemme stress test
367 fog volumes
about 850fps on empty flatgrass
erm
850fps sounds wrong, even with a beefy setup ive never went above 300 fps with nothing on
default cap is 300fps
but anyway seems good, obviously cant judge on just one layer because 3d is going to be a lot more expensive
This is with 3D noise
it could probably look better but to be quite honest i'm not fully sure what i'm doing lol
aand bitrate is ass ofc
@gentle pilot
very much like it
will most likely release soon
dunno if i wanna bother trying with cubemap fog now or later
ty ty
it probably doubles as clouds then lol
btw @cedar flame is there a repo on gh for this? How would I go about re-purposing this for very specific things
there isn't one (yet)
working without git? 
i usually do work with git, just the structure is a bit weird rn
i will put all the source code up when it's done
alr
how u wanna repurpose it
@gentle pilot i can give u the shader sources rn if u want
just the 3d noise variant is unfinished
oh hold on
for this bit
would need to smooth out the edges of the volume, make it circular and all that
i don't mind giving u the shader source
which one u want, no noise, 2d noise, or 3d noise (unfinished)?
i mean id rather wait you be done tbh
alr
Cubemap fog
Cylinder
Can be used as cones too since both ends have customizable radius
Can be used in conjunction with lamps for some cool effects
@cedar flame have you released this yet on github?
will do at the same time as workshop release
i would LOVE to include your work in my gamemode in the future :)
(with credits given)
btw @cedar flame are you doing subsurface scattering
nop
hell yeah
Release is imminent, working on the workshop and git pages
Can't really say exactly when, but it's today for sure.
really no need for that but thanks
will disect code
thank you for taking upon yourself the task of making volumetric fog
Thats insane
Would it be possible to plug in a custom volumetric texture?
Like if you processed a cloud or smoke sim into a volumetric vtf texture
would be cool if make smoke grenade out of it
you could definitely make a smoke grenade addon with it using just the given stuff it already has
i think mainly just need it so the smoke doesnt go thru walls
I don’t think that’ll work out of the box for that use case
I’m pretty sure this isn’t voxel based
Unless you’re gonna compute the volume yourself
Yeah it isn't
Perhaps one could do something with stencils and a generated mask mesh
@cedar flame is the github repo in a functional state, because ive been messing with it for an hour and none of the entities seem to draw anything?
only radial fog seems to work
and pressing E on the cubes does nothing
It should be, I haven't changed anything
You have GShader installed and enabled?
The pressing E on cubes thing is a separate issue, one I'd like more input on
Does pressing E not do anything for ALL of them or only some?
All ents?
yes
sec, i can fix that one real quick
@gentle pilot try editing them now, i pushed a commit to revert back to right-click > edit properties behaviour
i'm gonna get in-game and see if they're drawing for me
might be a gshader change i don't know about
they all seem to work fine for me
only thing i can think of suggesting rn is to go to gshader's settings and put it on its default preset
well i cant even access the settings
mmmh...
its not like im doing anything crazy either, i just have gshader through the workshop
same as your addon
g-shader? it's in the post-process tab
oh that
yeah i forgot a g
i didnt even touch it
i just pushed the update for the editing to the workshop version too, so people using that should be able to right-click edit there too
lol
i should probably add a warning for that when spawning the ents
mhm
need to tweak shader params further but getting somewhere
@cedar flame is that supposed to happen
i feel like im doing something wrong but
as long as i dont move it looks alright
albeit a bit weird in some places but i can tweak that
Ah you see, I am well aware of this problem, and there is actually a very good explanation for it
The problem here is:
I am not a graphics programmer and I have no fucking clue what I'm doing lol
But yeah I do know about it and it bugs me too
Might have to ask a slop machine about it
Honestly no clue, it should be working with world positions anyway, I don't think velocity should matter
I will def look into it though, I hate how it looks
ill just remove noise for now
I think it also only happens when you're inside the volume, so maybe it needs some special handling for that case
oh yeah