You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ongeki_ChibiViewer/Assets/FX/FX_CopyAndShareMat_SetParam...

80 lines
2.0 KiB

using System;
using UnityEngine;
namespace FX
{
// Token: 0x02000752 RID: 1874
public class FX_CopyAndShareMat_SetParam3 : MonoBehaviour
{
// Token: 0x06003015 RID: 12309 RVA: 0x00101E40 File Offset: 0x00101E40
private void Start()
{
foreach (Renderer renderer in this._renderers)
{
if (renderer != null && renderer.material != null)
{
if (this._sharedMaterial == null)
{
this._sharedMaterial = new Material(renderer.material);
}
renderer.material = this._sharedMaterial;
}
}
this._propertyID_ValueName1 = Shader.PropertyToID(this.valueName1);
this._propertyID_ValueName2 = Shader.PropertyToID(this.valueName2);
this._propertyID_ValueName3 = Shader.PropertyToID(this.valueName3);
}
// Token: 0x06003016 RID: 12310 RVA: 0x00101EEC File Offset: 0x00101EEC
private void Update()
{
if (this._sharedMaterial != null)
{
this._sharedMaterial.SetFloat(this._propertyID_ValueName1, this.value1);
this._sharedMaterial.SetFloat(this._propertyID_ValueName2, this.value2);
this._sharedMaterial.SetFloat(this._propertyID_ValueName3, this.value3);
}
}
// Token: 0x040055CF RID: 21967
[SerializeField]
private string valueName1 = "_Exposure";
// Token: 0x040055D0 RID: 21968
[SerializeField]
private float value1;
// Token: 0x040055D1 RID: 21969
[SerializeField]
private string valueName2 = "_Opacity";
// Token: 0x040055D2 RID: 21970
[SerializeField]
private float value2;
// Token: 0x040055D3 RID: 21971
[SerializeField]
private string valueName3 = string.Empty;
// Token: 0x040055D4 RID: 21972
[SerializeField]
private float value3;
// Token: 0x040055D5 RID: 21973
[SerializeField]
private Renderer[] _renderers;
// Token: 0x040055D6 RID: 21974
private Material _sharedMaterial;
// Token: 0x040055D7 RID: 21975
private int _propertyID_ValueName1;
// Token: 0x040055D8 RID: 21976
private int _propertyID_ValueName2;
// Token: 0x040055D9 RID: 21977
private int _propertyID_ValueName3;
}
}