Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Fog of War Shader and Unity Terrain Trees/Grass

Discussion in 'Shaders' started by Velo222, Apr 17, 2014.

  1. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    I purchased a fog of war asset off of the asset store and the package provided a terrain shader that works with the fog of war system. The shader correctly "shrouds" the terrain textures (splats?) underneath the fog with the shader effect. However, for some reason the shader does not cover/shroud the terrain trees and terrain grass textures at all.

    Interestingly, in fiddling with the shader myself a bit, I figured out how to get my actual tree prefab that I use with the terrain script to work with the fog of war correctly. But as soon as I add the tree prefab to the terrain script, and "paint" on the trees, they stop working with the fog of war shader. :confused:

    Does anyone know why this might be the case? I think I have to modify the provided terrain shader somehow to get the trees under the fog of war correctly. But I'm not sure what I'd have to modify. Thanks for any help.