Skip to content

Commit

Permalink
chore: remove Optimize Material
Browse files Browse the repository at this point in the history
  • Loading branch information
Tliks committed Feb 6, 2025
1 parent 46ae0a0 commit 3453d1d
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 268 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
### Deprecated

### Removed
- Optimize Material
- may fix an issue where the preview renderertexture was not displayed correctly in VirtualLens2.

### Fixed

Expand Down
3 changes: 0 additions & 3 deletions Editor/AutoConfigureTextureEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public class AutoConfigureTextureEditor : Editor
private SerializedProperty FormatMode;
private SerializedProperty MaintainCrunch;
private SerializedProperty OptimizeMipMap;
private SerializedProperty OptimizeMaterial;
private SerializedProperty ResolutionReduction;
private SerializedProperty IsPCOnly;
private SerializedProperty Exclude;
Expand All @@ -21,7 +20,6 @@ private void OnEnable()
FormatMode = serializedObject.FindProperty(nameof(AutoConfigureTexture.FormatMode));
MaintainCrunch = serializedObject.FindProperty(nameof(AutoConfigureTexture.MaintainCrunch));
OptimizeMipMap = serializedObject.FindProperty(nameof(AutoConfigureTexture.OptimizeMipMap));
OptimizeMaterial = serializedObject.FindProperty(nameof(AutoConfigureTexture.OptimizeMaterial));
ResolutionReduction = serializedObject.FindProperty(nameof(AutoConfigureTexture.ResolutionReduction));
IsPCOnly = serializedObject.FindProperty(nameof(AutoConfigureTexture.IsPCOnly));
Exclude = serializedObject.FindProperty(nameof(AutoConfigureTexture.Exclude));
Expand All @@ -41,7 +39,6 @@ public override void OnInspectorGUI()
}
}
PropertyField(OptimizeMipMap);
PropertyField(OptimizeMaterial);
PropertyField(ResolutionReduction);
PropertyField(IsPCOnly);
PropertyField(Exclude);
Expand Down
8 changes: 0 additions & 8 deletions Editor/OptimizeMaterial.meta

This file was deleted.

117 changes: 0 additions & 117 deletions Editor/OptimizeMaterial/General.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Editor/OptimizeMaterial/General.cs.meta

This file was deleted.

37 changes: 0 additions & 37 deletions Editor/OptimizeMaterial/OptimizeMaterial.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Editor/OptimizeMaterial/OptimizeMaterial.cs.meta

This file was deleted.

55 changes: 0 additions & 55 deletions Editor/OptimizeMaterial/lilToon.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Editor/OptimizeMaterial/lilToon.cs.meta

This file was deleted.

14 changes: 0 additions & 14 deletions Editor/PluginDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@ public class PluginDefinition : Plugin<PluginDefinition>

protected override void Configure()
{

InPhase(BuildPhase.Resolving).
Run("Invoke Shader Optimization", ctx =>
{
var root = ctx.AvatarRootObject;

var components = root.GetComponentsInChildren<AutoConfigureTexture>();

foreach (var component in components)
{
OptimizeMaterial.Apply(ctx, component);
}
});

InPhase(BuildPhase.Generating).
Run("Attach TextureConfigurator", ctx =>
{
Expand Down
6 changes: 5 additions & 1 deletion Runtime/AutoConfigureTexture.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using VRC.SDKBase;

Expand Down Expand Up @@ -28,9 +30,11 @@ public class AutoConfigureTexture: MonoBehaviour, IEditorOnly
public FormatMode FormatMode = FormatMode.Balanced;
public bool MaintainCrunch = true;
public bool OptimizeMipMap = true;
public bool OptimizeMaterial = true;
public Reduction ResolutionReduction = Reduction.Normal;
public bool IsPCOnly = true;
public List<Texture2D> Exclude = new();

// 削除された機能。バージョンを下げたときの互換性用にフィールドは残すが、次のマイナーあたりで削除する。
[Obsolete] public bool OptimizeMaterial = false;
}
}

0 comments on commit 3453d1d

Please sign in to comment.