r2mods/ilspy_dump/ror2_csproj/GlobalShaderTextures.cs

32 lines
861 B
C#

using UnityEngine;
[ExecuteInEditMode]
public class GlobalShaderTextures : MonoBehaviour
{
public Texture warpRampTexture;
public string warpRampShaderVariableName;
public Texture eliteRampTexture;
public string eliteRampShaderVariableName;
public Texture snowMicrofacetTexture;
public string snowMicrofacetNoiseVariableName;
private void OnValidate()
{
Shader.SetGlobalTexture(warpRampShaderVariableName, warpRampTexture);
Shader.SetGlobalTexture(eliteRampShaderVariableName, eliteRampTexture);
Shader.SetGlobalTexture(snowMicrofacetNoiseVariableName, snowMicrofacetTexture);
}
private void Start()
{
Shader.SetGlobalTexture(warpRampShaderVariableName, warpRampTexture);
Shader.SetGlobalTexture(eliteRampShaderVariableName, eliteRampTexture);
Shader.SetGlobalTexture(snowMicrofacetNoiseVariableName, snowMicrofacetTexture);
}
}