Global Snow uses replacement shaders to render a snow-covered version of the geometry. This snow layer is rendered before transparent objects as a screen-space effect. Objects that render during the transparent queue won’t be clipped by Global Snow, so this issue should only happen when some opaque shaders don’t expose the RenderType appropriately (which is a recommendation). Try using Fix Materials option in Scene Setup section of the inspector. Another solution to this issue involves editing that object shader and set the RenderType tag to one of the following: When you edit the shader, the change should read like this (other tags should not be touched!): Other render types supported are:
SubShader {
Tags { "RenderType"="Opaque" ... }
...
}
This is a 2-step process: Once you open the file, you will immediately see the commented lines. Remove the comment tags (/* and */) to enable the stencil filter
You need to add the GlobalSnowCollisionDetector script to any geometry (except for the terrain) if you want it to support terrain marks when collisions occurs. Demo scene contains some geometry that allows terrain marks over them using this approach. You can also add custom terrain marks using code, see below
You can use this code to add footprints at any position:GlobalSnow snow = GlobalSnow.instance;
snow.FootprintAt(position, direction);
Yes, the footprint feature uses the Footprint texture located in Resources/Textures folder. Feel free to use another texture for your footprints Alternatively, you can use the Terrain Marks feature to generate footprints-like marks as your FPS character moves (enable the FPS Marks option)
You can specify a default mark size using the GlobalSnow inspector or if using the API you can pass a value between 0 and 1. You can also add GlobalSnowColliderExtraInfo script to any object and set the mark size individually in this script.
Increase the Extents parameter or reduce the View Distance parameter in the Terrain Marks section of Global Snow inspector
You can find 3 snow footfalls audio clips inside GlobalSnow/Resources/Footfalls folder. Assign them to your First Person Controller script (footsteps sounds property). Note that there’s currently no way to determine if there’s snow under players feet. You could use a RayCast from above the player position to check if it’s under cover and switch between normal footfalls and snow footfalls
Support for snow reflections in Unity Water Pro system from Standard Assets is included. For instructions on setting up, please check the README file inside GlobalSnow/Extras/WaterReflections folder
VR support is supported/not guaranteed due to the differences in Unity versions, VR modes, pipelines and VR SDK features. It’s recommended to use deferred rendering since the performance will be better.
Forward rendering mode Standard Tree billboards render as transparent objects hence you need to make a couple of changes: Deferred rendering mode Locate the GrassAndBillboardsReplacementShaders package inside the folder Resources/Workflow_Deferred_Shaders/Grass & Billboards and import it. Once imported, they should automatically override the default shaders (it’s possible that you need to reload the scene).
If you use deferred mode, you can rename GlobalSnow.shader file to something like “GlobalSnow.shader.old” inside the folder Resources/Workflow_Forward/Shaders. This way, Unity won’t waste time compiling this complex snow shader. If you use forward rendering mode, edit GlobalSnow.shader file and look for these groups of keywords: For example, if you really want to use terrain marks, you could replace this line: with This change will enforce the use of terrain marks without multiplying the number of shader variants while also reducing compilation time. #pragma multi_compile __ GLOBALSNOW_FLAT_SHADING GLOBALSNOW_RELIEF GLOBALSNOW_OCCLUSION
#pragma multi_compile __ GLOBALSNOW_OPAQUE_CUTOUT
#pragma multi_compile __ GLOBALSNOW_FOOTPRINTS
#pragma multi_compile __ GLOBALSNOW_TERRAINMARKS
#pragma multi_compile __ GLOBALSNOW_TERRAINMARKS
#define GLOBALSNOW_TERRAINMARKS 1
If you use a custom terrain shader that support holes, you can use the “CircularHole” or “QuadHole” prefabs located in GlobalSnow/Resources/Prefabs folder to erase the snow over the entrance of the hole. These prefabs are just normal geometry what use a custom material “GlobalSnowEraser” and have the “GlobalSnowIgnoreCoverage” script attached. You can use any other geometry, assign the same material and script and it will act as a stencil object – snow will not appear behind that geometry.
If you have issues with the grass or grass billboard included in the folder Global Snow / Resources / Workflow_Deferred/Shaders / Grass & Billboards in deferred rendering path try the following: Option 1: Edit WavingGrass.shader and WavingGrassBillboard.shader and replace with Option 2: Edit WavingGrass.shader and WavingGrassBillboard.shader and do not modify the Queue tag but instead comment out this pragma:"Queue" = "Geometry+200"
"Queue" = "Geometry+1200"
// exclude_path:deferred
To exclude objects from snow, usually the exclusion options detailed in this manual apply. However, since FPS weapons render very close to the camera near clip plane, we can just exclude any snow coverage if the position of the pixel in the depth buffer is very small. This trick only works for deferred rendering path. Edit GlobalSnowDeferredOptions.cginc file and uncomment Save the changes and verify the result in your scene. You may need to increase the NEAR_DISTANCE_SNOW value if the weapon still receives snow. EXCLUDE_NEAR_SNOW
Use the method This method returns 0 if there’s no snow, or a value greater than 0 if there’s snow at that position.
GetSnowAmountAt(worldPosition);
Use the methods MaskFill and MaskFillArea to modify the contents of the coverage mask. The MaskFillArea method provides different overloads and can accept a gameobject so it will update the coverage mask area under the given gameobject.
Please use the Support Forum and post your question there. Our team will get back to you shortly.