Shader Talk - Conversations on GLSL

ITS BACK!

wooop… figured we would kick back on this old thread and start it off with something fun.

I am working on a procedural volumetric cube system, where if things go well it will be able to generate clouds and other wispy things with some level of control.

I have been loosly basing it off of Creating a Volumetric Ray Marcher
Gonna have to really start digging in now and refining some of the caluculations but for the most part its a good start.

https://playground.babylonjs.com/#1UWAVK#4
https://playground.babylonjs.com/#1UWAVK#6

Anyone else have any cool glsl stuff they are working on? I was thinking about putting up a shadertoy like tool for us made with the BJS system… but I wonder if anyone would use it.

eventually here I want to do the Volume Map with a 3d texture and then do some other fun things with 3d textures, but there is just so little time in the day with real work that has to be done.

8 Likes

love it:) I always loved raymarching algorithms

And nice use of the shadermaterial

1 Like

Hey @Pryme8,

Cool stuff! Would love to see you submit this to the 4.0 Release Video as you continue to develop it!

Nice Work!

whoa I am flattered, if I can get the sorting issue and the marching entry point artifacts fixed ill be more then happy to!

1 Like

https://playground.babylonjs.com/#1UWAVK#7

I was able to fix the dithering crazyness on the sides which is a great fix! Now I need to figure out to get the projection planes aligned.

1 Like

Awesome! Can’t wait to dig into this…

https://playground.babylonjs.com/#1UWAVK#15

I’m really close… The plane snapping calculations are off by a little bit, but at last you can enter the volume now.

next step is depth sorting, then performance.

1 Like

https://playground.babylonjs.com/#1UWAVK#19

Access to some of the params now… Gotta start tailoring the performance and really start hampering down on somethings.

I think it might be smarter to use a lookup table then procedural, and then I will need to also figure out the plane orientation adjustments.

So close it hurts:
https://playground.babylonjs.com/#1UWAVK#23

3 Likes

If anyone feels like having a shader that interacts with sound.
https://www.babylonjs-playground.com/#MFSFQ8#1
You could have multiple areas that you are sampling, this is just showing a quick rendition of the bin and then the totalVolume

https://www.babylonjs-playground.com/#MFSFQ8#3
This one is showing it interact with other shader values in this one a raymarched spheroid.

3 Likes

https://www.babylonjs-playground.com/#XXJUMU#1

so I started doing a scene that I am hoping will make converting ShaderToy stuff easier.

Once I can get through this and start understanding more or less what all the comparable uniform and varying are (and why they use things like fragColor vs gl_fragColor), Ill write up a converter that hopefully you could just past the Shadertoy link and bam get a version running in bjs that is serializable.

Don’t really have much more time to look at this today, thats why Im dropping it here for now even though its not functioning.

2 Likes

Anyone know of a good shader that will work to make images like these:
61%209001-136_t 63%201044-136
RKS-830-507_t

Seamless with one pass? Prolly just some simple texture synthesis, it just all the references I find are way more complex then what I would need.

Most textures will be close to tillable but just off, Im sure somebody has knows a good glsl script I can look at. It does not have to be perfect even, just a really good likeness of the texture.

1 Like

Here we go I need to find a deployment like this:

1 Like

I don’t know if this will help or not but Book of Shaders Gallery is really good

Someday I hope to have time to deepdive that…

2 Likes

I figured some people might like this:
https://playground.babylonjs.com/#V98HBA#3
its a “direct” port of:
https://www.shadertoy.com/view/ld3Gz2

UPDATE
Here is how you would enable camera controls from the active camera.
https://playground.babylonjs.com/#V98HBA#2

UPDATE
I changed the links on here to make it redirect you to the more clearly attributed one.

9 Likes

This is INSANE!

that incredible very good @Pryme8

1 Like

I cant take any credit that is all IQ’s work.

All I did was convert it to BJS as a postPass, which seems to be the easy way to do shadertoy conversions.

In the past I was making a plane and making a custom shader and doing a bunch of extra steps, this kinda makes it quick.

The benefits of doing it with a mesh though is I can pass it to an rtt and then at different rendersteps change the state of the shader to grab certain information as desired for later processing.

I need to figure out how to have a hidden camera doing this and have it save its hidden output as a texture so I can bind it to the display pass and do simulations that way which I’m thinking will solve some of the complexity issues I have been having with ping-ponging buffers in BJS.

2 Likes

Here is something I put a little more energy into.
https://www.babylonjs-playground.com/#8GPMLP#6

Its accelerated sphere Marching!!!

Woot! actually really kinda excited about this one. I am going to be able to do way way way more with my raymarched scenes now.

To celebrate it I did up my logo as a SDF. :slight_smile:

2 Likes

Really cool…wish I understood half of it.

To me sphereMarch looks like falcon heavy!

Did not even know about postProcess or onApply.

Thanks… someday I try to catch up a little bit. : )

http://erleuchtet.org/~cupe/permanent/enhanced_sphere_tracing.pdf

1 Like