From cc9929544da3f993a46a4fafa471cbd214c97215 Mon Sep 17 00:00:00 2001 From: yum Date: Sat, 18 Nov 2023 19:00:05 -0800 Subject: Update README --- Demos/grass_demo.PNG | Bin 0 -> 2218023 bytes README.md | 14 ++++++++++++++ Shaders/grass/grass_lighting.cginc | 1 + 3 files changed, 15 insertions(+) create mode 100644 Demos/grass_demo.PNG diff --git a/Demos/grass_demo.PNG b/Demos/grass_demo.PNG new file mode 100644 index 0000000..f434740 Binary files /dev/null and b/Demos/grass_demo.PNG differ diff --git a/README.md b/README.md index 064113c..7d87f27 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,20 @@ Then assign the shader you want (like yum\_food/parallax) to a material. Please ask setup questions [on the discord](https://discord.gg/YWmCvbCRyn). +## Grass (`yum_food/grass`) + +![Grass demo](Demos/grass_demo.PNG) + +A simple geometry shader that repeats a tile of grass 16 times and uses a noise texture to apply a wind effect on the geometry. + +Right now only the noise texture is configurable. + +Measured @ ~3.0 ms per frame at 4k + +TODO: add a mask to enable controlling where grass spawns. + +See `Shaders/grass/grass_10m_tile.prefab`. + ## Parallax (`yum_food/parallax`) ![Parallax demo](Demos/parallax_demo.gif) diff --git a/Shaders/grass/grass_lighting.cginc b/Shaders/grass/grass_lighting.cginc index b657354..4630f99 100644 --- a/Shaders/grass/grass_lighting.cginc +++ b/Shaders/grass/grass_lighting.cginc @@ -181,6 +181,7 @@ float4 effect(inout v2f i, out float depth) float3 c = lerp(brown, green, uv_phase); albedo = float4(c, 1.0); } + albedo *= 0.8; float3 normal = i.normal; // Rotate the normals a little to make the blades of grass appear more -- cgit v1.2.3