Stylized Grass Shader Documentation

Stylized Grass Shader

Stylized Grass Shader
Author: jonathan
Version: 1.2.0
Dated: 31 Aug 2019

2.Compatibilty #

Unity version
The minimum supported version is 2019.4.0 LTS, compatible up to Unity 2021.1. Tested in 2021.2a14 without any issues so far. Unity 2019.3 is no longer being tested on, since an LTS version (2019.4) is available.

Beta and Alpha versions may work but will not be eligible for support, due to the frequent changes. These versions, as the name implies, are for beta testing only. Once a release version is available, the package will be retested and an update will soon follow to fix/correct any issues.

Scriptable Render Pipeline
Only compatible with the Universal Render Pipeline, minimum required version is 7.4.1 (available in 2019.4.0+). HDRP support will unfortunately not be added, as this practically requires everything to be rebuild from the ground up + indefinite support/maintenance.

Tested URP versions:

  • 7.4.1
  • 7.5.1
  • 8.1.0
  • 10.2.2 (previously 9.0.0-preview)
  • 11.0.0
  • 12.0.0 (alpha)

Please note that every URP version release tends to break something. Changes to the URP shader libraries are undocumented, so it takes some time before the package is compatible with newer versions. Unless a maximum version is stated here or on the store page, it is compatible with all higher versions of the URP.

Deferred Rendering

This is available on Unity 2021.2/URP 12. Translucency shading will not work in Deferred rendering, because lighting will no longer be calculated directly in the shader itself.

Support was added in version 1.1.6, but may be prone to breaking, since it built on an preview version of URP. Once URP 12 comes out of preview, compatibility will be revisited.

The shader has been tested using an Oculus Rift where no issues have been encountered. It does not use anything that requires VR-specific code, hence there’s no compatibility concerns.

Note that the shader has an “Alpha to coverage” feature which will greatly reduce aliasing when MSAA is used.

Not supported and untested thus far. Due to the wide range of devices out there, and the often obscure graphical issues that might occur on specific devices, I don’t have the time to support and test this platform. Mobile platforms are very sensitive to alpha-tested shaders and overdraw (surfaces rendering over each other) which is very common when it comes to grass. This is one of the main reasons why the shader cannot be optimized for mobile and my tests indicated.

Compatible with both OpenGL and Metal.

Tested via a third party on Playstation 4, where no issues were present. Verified to work on Xbox One X (UWP). The shader is similar to the Lit/Simple Lit shader in the URP. This leads to assume the chance of any graphical or compiling issues are minimal.

Shader runs without any issues on Nintendo Switch, but performance is a pressing issue. In general, the platform is very sensitive to alpha tested/cutout materials, which is the biggest performance hit. This is pretty much a requirement for a grass shader, so this limits the amount of grass that can be visible at a time.

Third party integrations

Please see this page.

Yes No Suggest edit
Last updated on July 20, 2021
2 of 2 users found this section helpful
Suggest Edit