Fix scaling issues when part is created

• KSP rescales the model object back to 1,1,1 on start, so don't use that for the model that gets scaled
• Some refactoring to consolidate property IDs
• rename some classes because I am indecisive
• Add and Get methods for MaterialPropertyCollection
• Make an attempt at a scale culling fix
This commit is contained in:
2020-06-05 21:29:57 -07:00
parent 5560eee368
commit da1fbf0f2a
11 changed files with 151 additions and 89 deletions

View File

@ -0,0 +1,15 @@
using UnityEngine;
// ReSharper disable InconsistentNaming
namespace ConformalDecals {
public static class DecalPropertyIDs {
public static readonly int _BumpMap = Shader.PropertyToID("_BumpMap");
public static readonly int _BumpMap_ST = Shader.PropertyToID("_BumpMap_ST");
public static readonly int _Cull = Shader.PropertyToID("_Cull");
public static readonly int _Cutoff = Shader.PropertyToID("_Cutoff");
public static readonly int _DecalNormal = Shader.PropertyToID("_DecalNormal");
public static readonly int _DecalOpacity = Shader.PropertyToID("_DecalOpacity");
public static readonly int _DecalTangent = Shader.PropertyToID("_DecalTangent");
public static readonly int _ProjectionMatrix = Shader.PropertyToID("_ProjectionMatrix");
}
}