Files
beyond/Assets/ThirdParty/SDF Baker/SDFr/SDFData.cs
2024-11-20 15:21:28 +01:00

21 lines
535 B
C#

using UnityEngine;
namespace SDFr
{
public class SDFData : AVolumeData
{
public Texture3D sdfTexture;
public float maxDistance;
private static readonly int _SDFVolumeTex = Shader.PropertyToID("_SDFVolumeTex");
private static readonly int _SDFVolumeExtents = Shader.PropertyToID("_SDFVolumeExtents");
public void SetMaterialProperties(MaterialPropertyBlock props)
{
props.SetTexture(_SDFVolumeTex, sdfTexture);
props.SetVector(_SDFVolumeExtents, bounds.extents);
//TODO apply atlas etc
}
}
}