David Holland
banner
davidhol.land
David Holland
@davidhol.land
🎬 http://youtube.com/@denovodavid
🌏 http://davidhol.land
📍 Melbourne, Australia
Thank you :)
I do depth comparison a few pixels down from the current fragment to see if it's larger than some threshold. Seems to work alright.
December 2, 2025 at 11:40 PM
Yeah I use lerp/smoothstep to subtly blend between each step of the toon shader. Likewise, the cloud noise it not perfectly sharp, which helps with flickering. Good luck with the shader programming, it's fun to learn!
September 20, 2025 at 11:07 PM
I probably had the grass density too high, it can really be more sparse and still have the desired effect. The clouds are a global noise texture sampled in the light function with world space UVs (when LIGHT_IS_DIRECTIONAL) and used as attenuation for my custom toon shading.
September 19, 2025 at 11:25 PM
I don't know how Unity does rendering these days, but Godot uses forward rendering, so I just put my custom outline material on each object and it works. In the Water section of the article I have a paragraph about the depth/normals pre-pass, as that information is required for the outlines.
August 4, 2025 at 10:11 PM
You can either bake that information into the multimesh instance data or sample it from a texture. For my tree leaves, I sample positions/normals on a mesh and pass that into the multimesh. If you're doing procedural terrain grass, let's hope you have a heightmap to sample from.
July 24, 2025 at 10:47 PM
No problem. You'll need to make sure all your inputs to your lighting model are the same for grass and ground. I set LIGHT_VERTEX equal to the model origin (MODELVIEW_MATRIX[3].xyz) and NORMAL equal to ground/surface normal.
July 24, 2025 at 10:12 PM
Thanks, I'm seeing how far I can get without engines or libraries. I'll still use Godot for prototypes and game jams.
June 21, 2025 at 2:11 AM
Thanks, friend. Specifically for this style, it can be hard to add a sense of depth to the scene without it looking too 3D, which is why I spent much effort on the god-rays. Also, smooth shading can look odd, but sharp shadows can cause flickering, due to the low resolution; it's a balancing act.
June 9, 2025 at 10:04 AM
Man I've ran into this many times, following a bunch of overloaded classes/methods just to find what the "default" values of a struct are.
June 5, 2025 at 11:45 PM
Perhaps this crudely drawn diagram may help(?)
May 25, 2025 at 5:54 AM
a point on the plane; I check the shadow attenuation at that point (using a custom Godot shader language function), coloring the fragment if lit; then ray march a few more times using a defined gap to create the layers of light.
May 25, 2025 at 5:54 AM
I find it difficult to explain, but I'll give it a shot. I have a post-processing shader that ray marches into the scene; there is a mathematically defined plane in world space that is parallel to the sun direction; in view space, using the x/y coords of the current fragment, I solve for z to get...
May 25, 2025 at 5:54 AM
… the distance from the cell centre, used to animate the lines length.
April 21, 2025 at 12:41 AM
The red and green channels encode a vector pointing away from the centre of each cell. That way, my shader can extract the horizontal direction relative to the view, even when rotated. The blue channel is random per cell, used for timing offset of animation. Alpha channel is…
April 21, 2025 at 12:39 AM
Thanks! I'm not totally sure, just building out mechanics that I like. Something single player, with minimal systems; a little adventure :)
March 25, 2025 at 10:29 PM
3D Pixel Art Rendering | David Holland
www.davidhol.land
September 24, 2024 at 3:31 AM
I'M VERY SORRY 😭
November 1, 2023 at 9:49 AM