|
|
@ -22,8 +22,6 @@ namespace ConformalDecals {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Project(Matrix4x4 orthoMatrix, OrientedBounds projectorBounds, Transform projector, bool useBaseNormal) {
|
|
|
|
public void Project(Matrix4x4 orthoMatrix, OrientedBounds projectorBounds, Transform projector, bool useBaseNormal) {
|
|
|
|
var targetBounds = _targetRenderer.bounds;
|
|
|
|
|
|
|
|
if (projectorBounds.Intersects(targetBounds)) {
|
|
|
|
|
|
|
|
_projectionEnabled = true;
|
|
|
|
_projectionEnabled = true;
|
|
|
|
|
|
|
|
|
|
|
|
var targetMaterial = _targetRenderer.sharedMaterial;
|
|
|
|
var targetMaterial = _targetRenderer.sharedMaterial;
|
|
|
@ -50,10 +48,6 @@ namespace ConformalDecals {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
|
|
|
|
_projectionEnabled = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool Render(Material decalMaterial, MaterialPropertyBlock partMPB, Camera camera) {
|
|
|
|
public bool Render(Material decalMaterial, MaterialPropertyBlock partMPB, Camera camera) {
|
|
|
|
if (_projectionEnabled) {
|
|
|
|
if (_projectionEnabled) {
|
|
|
|