Brute Force - Grass Shader Documentation
9. FAQ & Troubleshooting
I opened the package scene and all I see is pink!
You opened the wrong scene, there is 2 variations of the Grass Shader: one for Unity Standard and one for URP.
Use the folders corresponding to your render pipeline:
I can't find the URP folders and when I import the package it says only v1.0
Contact me at email@example.com with your unity asset store order and I will give it directly to you, chances are the unity package manager is forcing the wrong one on your unity version.
You can solve this issue without my help by installing any unity above 2019.4 and importing the package, then you can export the unity package in your projects.
I dragged and dropped the mobile material on a plane and the grass isn't there
Please read the Mac & Mobile documentation page
I have shadow artefacts on Mobile URP
The problem comes from the URP pipeline itself, to get around this issue you need to set your shadow cascade count to 2 or more:
The grass looks so pale/bright in my project
Color differences may occur when you're not using the default unity color space depending on your Unity version and Render Pipeline, (Gamme for Built-in and Linear for URP)
Either change the rendering color space or simply tune the materials to look the way you want
My grass is flat with plain color on my custom imported mesh
This happens because you have no UVs on your custom mesh, to render textures properly and to customize the grass you need to unwrap the UV of your mesh using your 3D software (here blender):
A world coordinate feature for UVs is in the work for the next updates (even though it is not recommended to use it instead of a classic UV for performance reasons)
I'm on Mac/Mobile and my grass disappear on builds
You need all your grass meshes to have the "Read/Write" enabled in your mesh import settings, this can only be done on your side of the editor. If not enabled your modified mesh will not show up in builds.
There's a visible fading halo in the grass
The halo effect in the grass is caused by the self shadows casting (grass casting shadows on itself).
If you don't need self shadow casting you can disable it in the material property, and if you want to ease the shadows transition you can do so via the Quality tab in the project settings:
The Halo effect is still there when I move the angle of the camera
I recently added the "Use Better Shader model precision" pragma for the terrain shaders that you can use to diminish the mipmap filtering effect. If you are not using terrain shaders and want this to be done for others as well please contact me.
The terrain grass is weird when I put it on my 1000x1000 terrain
The first terrain grass material was designed with 50x50 units terrain in mind, the default 1000x1000 Unity terrains very big and generally a bad idea to use as metrics reference.
But in the case you insist on using a big terrain I added a new material preset that is more accurate for big terrains:
To customize the grass material for bigger terrain please upscale those values:
Unity crashes when loading the Terrain Shader
This means your video card lacks proper video memory and/or the right video driver. There is however a quick fix you can implement. Go to Project Settings > Player > Other Settings, and then disable Auto Graphics API for Windows and put Direct3D12 above Direct3D11. You can also try this with OpenGl.
The grass effects is bleeding when too far from camera
Make sure your CameraEffect is following a main Transform and also read how to increase the CameraEffect size in the Getting Started section (bottom of the page)
The Particle Effect is visible in the editor or at runtime
If you want to not see the particle effect rendering inside the editor, you have to disable the same layer it's in by using the layers visibility option, here the layer used is TransparentFX:
And if you need to disable it's visibility inside the game window or on build you need to do the same for the camera culling masks of your main camera:
The grass doesn't work properly in VR
Simply enable the "Use for VR" pragma in the material property of the grass.
The mesh is invisible in the editor using URP
This is an annoying Unity bug that's been plaguing the latest version of Unity overall, some versions are just straight up cursed, for instance you could replace my shader with the most basic URP shader that is from the official Unity URP documentation and it still wouldn't work.
There is 2 solutions for this:
-The simplest one but it's not the best for the long run: set the render queue over every sand materials to more than 2501 like so:
And because my snow shader uses custom shadow technique you will still have shadows.
-The better solution is to switch to a better Unity version (every LTS below 2021.3.13 unity version are the best because they get frequent updates and are generally better supported by everyone), I use 2021.13 frequently and it's the most reliable.
2022.2 even though it's in beta doesn't seem to have this issue.