Shader Talk - Conversations on GLSL

The sub-shaders, I don’t see how to do any noise generation nodes or custom script nodes basically, if I could make like a function/script node that outputs values and custom uniforms to tweek just for them like what shaderfrog is showing then yeah I could do it with the nodes.

But right now it seems it would be easier to just do it as a custom shader.

Yep. We won’t have loops for v1

but we’re getting there it looks like :slight_smile: (Dave you have been killin it, thank you!)

https://playground.babylonjs.com/#KGL7BT

So here are the first steps of doing it as a shader.

Here is a little bit of tweaking to the first part:
https://playground.babylonjs.com/#KGL7BT#2

Now to do the colors.
https://playground.babylonjs.com/#KGL7BT#4
There are a billion-zillion ways to color it…

Looking awesome! Thanks for taking on the challenge.

Am studying your code to see how you translated ShaderFrog format (or three format i suppose) to BJS. I take it by your comments above (and looking at the code), that there isn’t a simple conversion methodology (eg: A goes here. B goes here. Change name of uniform C to D, etc). In other words, was no straight forward way to copy/paste/minorly-modify to get working in CYOS?

Not when the shader was built as a node based shader no, not really… I mean it is possible though, I will work with you right now to try to figure that out if you want.

First step we need to see the shader code for the sub-shader nodes, wanna help me hunt that part down?

Sure thing. Only thing is I just started learning about shaders last week… so it’s mostly greek to me (first time i hear about “node based shader” in reading this thread this morning). Assume it’s due to the way ShaderFrog composites shaders? But yes, absolutely up for hunting/learning…

Oh I found the code int he CYOS that you posted… give me a second brother!

Looks like it was composed from:
Big Wiggles - ShaderFrog.com (Big Wiggles)
and
Configurable Oil Spill - ShaderFrog.com (Configurable Oil Spill)

Is that what you meant by sub-shaders?

https://www.babylonjs-playground.com/#QW9U25

There is some weird stuff coming out of this, but I will get it figured out.

Thanks for finding those they might help troubleshoot this.
Ahh its because I was using a ICO sphere:
https://www.babylonjs-playground.com/#QW9U25#1

https://www.babylonjs-playground.com/#QW9U25#2

Cause The Monkey King <3’s you for posting in this thread!

In all honesty I just learned something by converting that (about using multiple functions that cumulatively effect the main output) and validated something that I was unsure about (that we have a shortcut to the position matrix without all the extra hubbub).

So I appreciate the challenge!

You are a god among men.

I am now set to study your code for rest of day so I can figure out how you did it. Also, just by a quick line-by-line comparison, it seems like converting from the Shaderfrog Three format to BJS could be workable via a conversion script… as in: everything(?) has a predictable/consistent format from one to the other. Think I may try to write a converter if this is the case.

yup, and if you need any help on what’s what let me know.

I started doing something like that a while ago for Shadertoy, but then IQ yelled at me and I kinda lost all motivation…

Its kinda shitty when your idols turn on you.

aFalcon likes Shader Talk vmuch. Will deepdive breadcrumb trail someday. Thank you Monkey King.

Who IQ?

http://www.iquilezles.org/

https://www.shadertoy.com/view/3lsSzf

Impressive

…clicked this IQ YouTube sub so fast it broke the bell…

link perfectly represents life mission…

:heart: is just a parabola? oh snap!

Gr8 “mathamagics” link. Thx.

will someday drop it into https://www.desmos.com/calculator/ to see what happens…

GRAPH TOY!?!


afalcon deepdives for… rest of life. : )
http://www.iquilezles.org/apps/graphtoy/
killer links via MonkeyKing. :pray:

I’m still not able to update the doc due to the “direction” parameter, see my message here. If possible, I want to PR with an exhaustive list.

Where does “direction” comes from? I don’t think we have a built in with this value