r2mods/ilspy_dump/ror2_csproj/GlobalShaderTextures.cs

32 lines
861 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
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);
}
}