Added texture preprocessor to enforce no filtering

This commit is contained in:
nothke 2024-08-17 13:08:28 +02:00
parent f20994a8db
commit 63747c7f7f
5 changed files with 36 additions and 5 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 51fc89590d392e4458728c087b430687
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,12 @@
using UnityEngine;
using UnityEditor;
class TexturePreprocessor : AssetPostprocessor
{
void OnPreprocessTexture()
{
// if (assetPath.Contains("_bumpmap"))
TextureImporter textureImporter = (TextureImporter)assetImporter;
textureImporter.filterMode = FilterMode.Point;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d33006e1540e5a649b300c3c7954e1f3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -37,8 +37,8 @@ public class WeightDetector : MonoBehaviour
return totalMass; return totalMass;
} }
private void Update() //private void Update()
{ //{
Debug.Log(GetTotalWeight()); // Debug.Log(GetTotalWeight());
} //}
} }

View File

@ -34,7 +34,7 @@ TextureImporter:
maxTextureSize: 2048 maxTextureSize: 2048
textureSettings: textureSettings:
serializedVersion: 2 serializedVersion: 2
filterMode: 1 filterMode: 0
aniso: 1 aniso: 1
mipBias: 0 mipBias: 0
wrapU: 0 wrapU: 0