summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2023-11-18 19:00:05 -0800
committeryum <yum.food.vr@gmail.com>2023-11-18 19:00:51 -0800
commitcc9929544da3f993a46a4fafa471cbd214c97215 (patch)
treec2aa106fc8b29de7c186fe386166e75cc55ff657
parent03368f2d8660c90b760051363be50552e4b27cc8 (diff)
Update README
-rw-r--r--Demos/grass_demo.PNGbin0 -> 2218023 bytes
-rw-r--r--README.md14
-rw-r--r--Shaders/grass/grass_lighting.cginc1
3 files changed, 15 insertions, 0 deletions
diff --git a/Demos/grass_demo.PNG b/Demos/grass_demo.PNG
new file mode 100644
index 0000000..f434740
--- /dev/null
+++ b/Demos/grass_demo.PNG
Binary files 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