I was wondering if anybody here has any recommendations for books or tutorials for people who want to get into shader programming. I’d like to create my own pixel shaders (of course for Babylon mainly), but apart from the GLSL syntax and data types, which are pretty clear to me, I don’t know where to get started. Is there any tutorial that shows by example how to build e.g. a water shader? Most tutorials are very heavy on the OpenGL API and very light on the actual shader code.
hmm yeah maybe this is the best way. What do you think the easiest goal to achieve for a beginner is? Apart from just solid color fills or something like that of course
Quick question regarding using 2d texture arrays, is there any limit as to the size of the texture array, or performance impacts when compared to the standard 1 sample texture atlas method?
Does anybody by any chance have a babylon-compatible example of a fur shader at hand? For GLSL, I only found this through Google, but it looks rather low-quality. We can surely do better, right? Am I correct in assuming that for WebGL/Babylon you can use the exact same GLSL shaders as for OpenGL?
edit: Apparently at some point a Fur Material was introduced, that makes everything much easier! So no need for a custom shader right now, it’s all good!
If nothing turns up, then that will be my goal to strive for when learning shaders! I will report my progress here of course, and maybe you will have to endure more of my stupid questions
Thanks for that too! Maybe I’ll try out a couple of 'em, including the standard FurMaterial, and then ask some of my test victims which one they like best
Hair has always been kinda tricky in webgl. I think once we have geometry shaders things like that will be much more robust. @Necips has the right idea for now though.
If you wanna move around the scene on your own, I boot strapped in our camera.
If we really really wanted to be fancy, we could do a simplified version of the distance function on the CPU side and do collisions with the structure. I just aint got time for that.
I’m actually just scanning over this raymarch algo. That dithering/jitter is a thing of beauty wow. I am totally gonna have to gut my marching setups for something like this… some other day though, welp back to work!
Just made a a punishment-demo powered by shaders. All logic on GPU, JS only passes a pen position.
It uses an intermediate procedural texture for rendering the puncture. Should work well on phones.
You just need to make sure you have a depth value being calculated by the shader that matches the scenes depth then you can mix the shader with physical meshes. @Necips
You might be able to look up the volumetric fog stuff I was doing or the depth sorted raymarching setups I have out there for examples.
@Pryme8 did you got the chance to create something like shadertoy for babylonjs where we can see playgrounds for the created shader to re-use them in other playgrounds ?
and i am starting to learn shaders but i am having alot of difficulties because lack of resources in babylonjs is there a tool where its visual and user friendly like the shadergraph in blender that will generate a glsl shader to use it in babylonjs
and alot of time when i try to use a glsl shader that was created in a third party app it give me alot of errors in babylonjs cyos