I’m surprised that I haven’t been able to find anything on this. I’m using Unity’s terrain objects for my landscapes, but I need to make the shoreline faintly reflective (e.g., for wet sand on beaches etc) up to a small elevation above the waterline. I know how to write shader-based code to produce specular effects and reflection, but in this case I’m dealing with terrain objects rather than my own. I suppose the easiest method would be to modify the MeshTerrain4Splats.shader (which I assume is the one used for terrains?) so that it adds a cubemap-based reflection effect between certain elevations; but : 1) that will only work for bodies of water that have a constant elevation for the water surface (ruling out waterfalls and the like); 2) it won’t allow accurate reflections of nearby objects (it’s just a cubemap), and the sloping nature of most beaches will prevent using reflections based on render-to-texture methods; 3) something tells me that adding code like this to that shader is likely to break something.
Surely someone must have dealt with this issue before, so I’m wondering if anyone has any advice on “best practices”.
up
Use standard shader. It’s more than capable of this.