14 lines
301 B
C#
14 lines
301 B
C#
using UnityEngine;
|
|
using UnityEngine.Rendering.HighDefinition;
|
|
|
|
[ExecuteInEditMode]
|
|
public class FoamBuffer : MonoBehaviour
|
|
{
|
|
public WaterSurface waterSurface;
|
|
|
|
private void Update()
|
|
{
|
|
GetComponent<DecalProjector>().material.SetTexture("_Base_Color", waterSurface.GetFoamBuffer(out var _));
|
|
}
|
|
}
|