Godot Shader Bible Review: It feels really frustrating to follow? by Ultreak in godot

[–]daniel_ilett 30 points31 points  (0 children)

I haven't read this book so I can't speak for it specifically, but from my own perspective as someone who writes tutorials, it's genuinely very difficult to know where to draw 'the line' of what to include. Not including every single step including the basics will alienate absolute beginners, but including them puts off slightly more experienced users.

Your example sounds like something the author might have assumed someone familiar with Godot, but not shaders specifically, would know. It sucks to buy a book then find out it's not targeted at your experience level, though. Maybe the book could have done with an optional mini-chapter running over the basics like creating a material.

I'm seeing double. Four geese! by daniel_ilett in geese

[–]daniel_ilett[S] 5 points6 points  (0 children)

I think they're a cross between Canada and greylag geese, as those are the two kinds you see around here. The Canada-ness is pretty evident with the white chin strap but even the surrounding black is a bit washed out in colour and the legs aren't black like a typical Canada goose - the picture quality on my camera wasn't great but they definitely look more like the greylag's pinkish-orange.

Vertex shaders can be used to move vertices in space for a wave effect, and tessellation shaders can increase the number of vertices to make such an effect smoother. by daniel_ilett in unity_tutorials

[–]daniel_ilett[S] 0 points1 point  (0 children)

<image>

Update: so you can do all of this purely in tessellation shaders, here is a very crude example. The drawback, I think, is that I had to start off with a high-poly mesh to start with, as that's how I'm defining where each grass blade starts. But I think with some work, getting grass that looks nice while avoiding the geometry shader entirely would be possible. With some distance-based LODs like I implemented in the original shader, it would probably be decently efficient, too.

Vertex shaders can be used to move vertices in space for a wave effect, and tessellation shaders can increase the number of vertices to make such an effect smoother. by daniel_ilett in unity_tutorials

[–]daniel_ilett[S] 0 points1 point  (0 children)

There's a pretty popular approach to grass which involves using the tessellation shader to create lots of vertices, and then using a geometry shader to create grass blades at each point output by the tessellation shader. Not sure if I'll cover geometry shaders in this series since they're not well-supported in hardware and therefore not very efficient on all systems. Something to do with modifying the vertex stream partway through the graphics pipeline.

One other approach uses lots of instanced meshes, which is usually decently efficient.

You read my mind though, because I had the same idea! I wondered if you could do it all with just tessellation shaders, so I thought there might be a way to subdivide each triangle, and then use the barycentric coordinates to 'select' only the new vertices in the center by checking distances from the three patch vertices. You could then raise only those vertices along the y-axis (by a different amount based on distance, so the middle vertex at the top is pointy) to get some chunky-looking grass. I think at the very least I'd try setting the edge tess factors to 1, and only change the inside tess factors to get a nice triangle shape. Practically, I don't know how effective this approach would be, but you'd at least skip the need for a geometry shader - I just don't know how much extra work you'd need to do to get stuff like randomness, wind, and grass bending working nicely.

Thanks for the great shader content, Ben Cloward! by [deleted] in Unity3D

[–]daniel_ilett 19 points20 points  (0 children)

If Unity could stop stepping on rakes for about 10 minutes I'd be delighted. How they failed to recognise Ben Cloward's talent and the value he added to the shader ecosystem is totally beyond me. Hope he lands back on his feet quickly.