mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
small tweaks
This commit is contained in:
parent
d1e4d2ac4f
commit
5652f0dda1
Binary file not shown.
@ -427,6 +427,5 @@ namespace ConformalDecals {
|
||||
target.Render(decalMaterial, part.mpb, camera);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -17,6 +17,9 @@ namespace ConformalDecals {
|
||||
|
||||
// property block
|
||||
private readonly MaterialPropertyBlock _decalMPB;
|
||||
|
||||
private static readonly int normalID = Shader.PropertyToID("_BumpMap");
|
||||
private static readonly int normalIDST = Shader.PropertyToID("_BumpMap_ST");
|
||||
|
||||
public ProjectionTarget(MeshRenderer targetRenderer, Mesh targetMesh, bool useBaseNormal) {
|
||||
target = targetRenderer.transform;
|
||||
@ -26,10 +29,7 @@ namespace ConformalDecals {
|
||||
|
||||
_decalMPB = new MaterialPropertyBlock();
|
||||
|
||||
if (useBaseNormal) {
|
||||
var normalID = Shader.PropertyToID("_BumpMap");
|
||||
var normalIDST = Shader.PropertyToID("_BumpMap_ST");
|
||||
|
||||
if (useBaseNormal && targetMaterial.HasProperty(normalID)) {
|
||||
var normal = targetMaterial.GetTexture(normalID);
|
||||
if (normal != null) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user