feat: add RealToon
This commit is contained in:
parent
bca9ee7cd5
commit
289bb4d76a
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6c2ff81700b1b294b869bf24ec0e960d
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dc22032b278b46f469de30872180ade5
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 658e403a0a86079459a910d6eb1ee150
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
1
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d5a3be5e8e97b7a4bbb0c7eb475b4cbd
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
|
|
@ -0,0 +1,130 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c0678c6822cb57145a91e3ed1743f981
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 13
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMipmapLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 4
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
customData:
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spriteCustomMetadata:
|
||||||
|
entries: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
mipmapLimitGroupName:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,482 @@
|
||||||
|
//MJQStudioWorks
|
||||||
|
|
||||||
|
using UnityEditor;
|
||||||
|
using System.IO;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Rendering;
|
||||||
|
using UnityEditor.PackageManager;
|
||||||
|
|
||||||
|
|
||||||
|
namespace RealToon.Editor.Welcome
|
||||||
|
{
|
||||||
|
|
||||||
|
[InitializeOnLoad]
|
||||||
|
public class RTWelcome : EditorWindow
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Variables
|
||||||
|
|
||||||
|
static float WinHig = 300;
|
||||||
|
static EditorWindow EdiWin;
|
||||||
|
static string CurrRP;
|
||||||
|
static string CurrRPDisp;
|
||||||
|
static string CurrRPVer;
|
||||||
|
static string CurrRPFullVer;
|
||||||
|
static string UniVer;
|
||||||
|
static string UniVerFull = null;
|
||||||
|
static string VRC_LV_Stat;
|
||||||
|
static bool VRC_LV_CHK;
|
||||||
|
static bool SRP_CHK_AVAI;
|
||||||
|
static Object RT_Pack;
|
||||||
|
static string RT_pac_name;
|
||||||
|
static Object RP_ReMe;
|
||||||
|
static Object RP_Qui_ReMe;
|
||||||
|
static Vector2 scroll;
|
||||||
|
static Vector2 scroll2;
|
||||||
|
static Vector2 scroll3;
|
||||||
|
static string rt_welcome_settings = "Assets/RealToon/Editor/RTW.sett";
|
||||||
|
static string[] RP_Info = { "Built-In Render Pipeline (BiRP)",
|
||||||
|
"Universal Render Pipeline (URP)",
|
||||||
|
"High Definition Render Pipeline (HDRP)" };
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region RT_Welcome
|
||||||
|
static RTWelcome()
|
||||||
|
{
|
||||||
|
if (File.Exists(rt_welcome_settings))
|
||||||
|
{
|
||||||
|
if (File.ReadAllText(rt_welcome_settings) == "0")
|
||||||
|
{
|
||||||
|
if (File.Exists(rt_welcome_settings))
|
||||||
|
{
|
||||||
|
EditorApplication.delayCall += Ini;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ini
|
||||||
|
|
||||||
|
[MenuItem("Window/RealToon/Welcome Screen")]
|
||||||
|
static void Ini()
|
||||||
|
{
|
||||||
|
EdiWin = GetWindow<RTWelcome>(true);
|
||||||
|
EdiWin.titleContent = new GUIContent("Welcome RealToon Shader User");
|
||||||
|
WinHig = 682;
|
||||||
|
EdiWin.minSize = new Vector2(658, WinHig);
|
||||||
|
EdiWin.maxSize = new Vector2(658, WinHig);
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region check_srp_ver
|
||||||
|
static void check_srp_ver()
|
||||||
|
{
|
||||||
|
var request = Client.List();
|
||||||
|
|
||||||
|
while (!request.IsCompleted) { }
|
||||||
|
|
||||||
|
if (request.Status == StatusCode.Success)
|
||||||
|
{
|
||||||
|
foreach (var package in request.Result)
|
||||||
|
{
|
||||||
|
if (package.name == "com.unity.render-pipelines.universal")
|
||||||
|
{
|
||||||
|
CurrRPVer = package.version.Substring(0, 2);
|
||||||
|
CurrRPFullVer = package.version;
|
||||||
|
CurrRP = package.displayName;
|
||||||
|
SRP_CHK_AVAI = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (package.name == "com.unity.render-pipelines.high-definition")
|
||||||
|
{
|
||||||
|
CurrRPVer = package.version.Substring(0, 2);
|
||||||
|
CurrRPFullVer = package.version;
|
||||||
|
CurrRP = package.displayName;
|
||||||
|
SRP_CHK_AVAI = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (request.Status >= StatusCode.Failure)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogWarning("URP and HDRP Packages are not available or present in your project.");
|
||||||
|
SRP_CHK_AVAI = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region check_vrc_lv
|
||||||
|
static void check_vrc_lv()
|
||||||
|
{
|
||||||
|
if (GraphicsSettings.currentRenderPipeline == null)
|
||||||
|
{
|
||||||
|
if (Directory.Exists("Assets/VRCLightVolumes"))
|
||||||
|
{
|
||||||
|
VRC_LV_CHK = true;
|
||||||
|
VRC_LV_Stat = "Is present";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
VRC_LV_CHK = false;
|
||||||
|
VRC_LV_Stat = "Not Present";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
VRC_LV_CHK = false;
|
||||||
|
VRC_LV_Stat = "BiRP Only";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region rt_pac_set
|
||||||
|
static void rt_pac_set()
|
||||||
|
{
|
||||||
|
if (GraphicsSettings.currentRenderPipeline != null)
|
||||||
|
{
|
||||||
|
if (CurrRP == "Universal Render Pipeline" || CurrRP == "Universal RP")
|
||||||
|
{
|
||||||
|
if (int.Parse(CurrRPVer) == 12 || int.Parse(CurrRPVer) == 13)
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon URP (URP 15 and 16)";
|
||||||
|
}
|
||||||
|
if (int.Parse(CurrRPVer) == 14)
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon URP (URP 14)";
|
||||||
|
}
|
||||||
|
if (int.Parse(CurrRPVer) == 15 || int.Parse(CurrRPVer) == 16)
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon URP (URP 15 and 16)";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (UniVerFull.Substring(0, 6) == "6000.0")
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon URP (Unity 6.0)";
|
||||||
|
}
|
||||||
|
else if (UniVerFull.Substring(0, 6) == "6000.1" || (int.Parse(UniVerFull.Substring(0, 1)) == 6 && int.Parse(UniVerFull.Substring(5, 1)) >= 1))
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon URP (Unity 6.1 To Later)";
|
||||||
|
}
|
||||||
|
|
||||||
|
var ids_reme = AssetDatabase.FindAssets("Please read before you unpack or import", new[] { "Assets/RealToon/RealToon Shader Packages/SRP (LWRP - URP - HDRP)/URP" });
|
||||||
|
if (ids_reme.Length == 1)
|
||||||
|
{
|
||||||
|
RP_ReMe = AssetDatabase.LoadMainAssetAtPath(AssetDatabase.GUIDToAssetPath(ids_reme[0]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("Couldn't find ReadMe's");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (CurrRP == "High Definition Render Pipeline" || CurrRP == "High Definition RP")
|
||||||
|
{
|
||||||
|
|
||||||
|
if (int.Parse(CurrRPVer) == 12 || int.Parse(CurrRPVer) == 13)
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon HDRP (HDRP 12 and 13)";
|
||||||
|
}
|
||||||
|
else if (int.Parse(CurrRPVer) == 16)
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon HDRP (HDRP 16)";
|
||||||
|
}
|
||||||
|
else if (int.Parse(CurrRPVer) == 14 || int.Parse(CurrRPVer) == 15)
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon HDRP (HDRP 14 and 15)";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (UniVerFull.Substring(0, 6) == "6000.0")
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon HDRP (Unity 6.0)";
|
||||||
|
}
|
||||||
|
else if (UniVerFull.Substring(0, 6) == "6000.1" || (int.Parse(UniVerFull.Substring(0, 1)) == 6 && int.Parse(UniVerFull.Substring(5, 1)) >= 1))
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon HDRP (Unity 6.1 To Later)";
|
||||||
|
}
|
||||||
|
|
||||||
|
var ids_reme = AssetDatabase.FindAssets("Please read before you unpack or import", new[] { "Assets/RealToon/RealToon Shader Packages/SRP (LWRP - URP - HDRP)/HDRP" });
|
||||||
|
if (ids_reme.Length == 1)
|
||||||
|
{
|
||||||
|
RP_ReMe = AssetDatabase.LoadMainAssetAtPath(AssetDatabase.GUIDToAssetPath(ids_reme[0]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("Couldn't find ReadMe's");
|
||||||
|
}
|
||||||
|
|
||||||
|
var ids_qui_reme = AssetDatabase.FindAssets("RealToon HDRP (Quick Guide)", new[] { "Assets/RealToon/RealToon Shader Packages/SRP (LWRP - URP - HDRP)/HDRP" });
|
||||||
|
if (ids_qui_reme.Length == 1)
|
||||||
|
{
|
||||||
|
RP_Qui_ReMe = AssetDatabase.LoadMainAssetAtPath(AssetDatabase.GUIDToAssetPath(ids_qui_reme[0]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log("Couldn't find Quick ReadMe's");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (int.Parse(Application.unityVersion.Substring(0, 4)) >= 2019)
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon Built-In RP [3D] (Unity 2019 and Later)";
|
||||||
|
}
|
||||||
|
else if (int.Parse(Application.unityVersion.Substring(0, 4)) < 2019)
|
||||||
|
{
|
||||||
|
RT_pac_name = "RealToon Built-In RP [3D] (Unity 2018 and below) (FV)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var ids = AssetDatabase.FindAssets(RT_pac_name);
|
||||||
|
|
||||||
|
if (ids.Length == 1)
|
||||||
|
{
|
||||||
|
RT_Pack = AssetDatabase.LoadMainAssetAtPath(AssetDatabase.GUIDToAssetPath(ids[0]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RT_pac_name = "Package Not Found In Your Project";
|
||||||
|
Debug.Log("Couldn't find packages");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Process & UI
|
||||||
|
void OnGUI()
|
||||||
|
{
|
||||||
|
Texture2D t = EditorGUIUtility.Load("Assets/RealToon/Editor/RT_GUI_Img.png") as Texture2D;
|
||||||
|
Rect rect = new Rect(233, 0, t.width + 70, t.height + 70);
|
||||||
|
GUI.DrawTexture(rect, t, ScaleMode.ScaleToFit);
|
||||||
|
|
||||||
|
EditorGUILayout.Space(76);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginVertical();
|
||||||
|
|
||||||
|
EditorGUILayout.BeginVertical();
|
||||||
|
|
||||||
|
if (GraphicsSettings.currentRenderPipeline != null)
|
||||||
|
{
|
||||||
|
if (CurrRP == "Universal Render Pipeline" || CurrRP == "Universal RP")
|
||||||
|
{
|
||||||
|
CurrRPDisp = RP_Info[1] + " v" + CurrRPFullVer;
|
||||||
|
}
|
||||||
|
else if (CurrRP == "High Definition Render Pipeline" || CurrRP == "High Definition RP")
|
||||||
|
{
|
||||||
|
CurrRPDisp = RP_Info[2] + " v" + CurrRPFullVer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CurrRPDisp = RP_Info[0] + CurrRPFullVer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GUIStyle centeredtext = GUI.skin.GetStyle("Label");
|
||||||
|
centeredtext.alignment = TextAnchor.MiddleCenter;
|
||||||
|
centeredtext.fontSize = 18;
|
||||||
|
centeredtext.fontStyle = FontStyle.Bold;
|
||||||
|
EditorGUILayout.LabelField("A PRO Anime/Toon Shader", centeredtext);
|
||||||
|
|
||||||
|
EditorGUILayout.EndVertical();
|
||||||
|
|
||||||
|
EditorGUILayout.Space(19);
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
|
||||||
|
EditorGUILayout.Space(22);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginVertical("TextArea", GUILayout.Height(90));
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("Introduction:");
|
||||||
|
|
||||||
|
scroll = EditorGUILayout.BeginScrollView(scroll, GUILayout.Height(280));
|
||||||
|
|
||||||
|
EditorGUILayout.Space(4);
|
||||||
|
|
||||||
|
GUILayout.TextArea(
|
||||||
|
"*Thank you for purchasing RealToon Shader, before you start using RealToon, please read first the 'ReadMe - Important - Guide.txt' text file for setups and infos.\n\n" +
|
||||||
|
|
||||||
|
"*All shaders packages are in the folder 'RealToon Shader Packages', just unpack the 'RealToon Shader' that correspond to your projects render pipeline.\n" +
|
||||||
|
"You can also just click the package on the Welcome Screen, To access the Welcome Screen just go to 'Window > RealToon > Welcome Screen'.\n\n" +
|
||||||
|
|
||||||
|
"*If you are a VRoid user, read the 'For VRoid-VRM users.txt' text file.\n\n" +
|
||||||
|
|
||||||
|
"*For video tutorials and user guide, see the bottom part of RealToon Inspector panel.\n\n" +
|
||||||
|
|
||||||
|
"*If you need some help/support, just send an email including the invoice number.\n" +
|
||||||
|
"See the 'User Guide.pdf' file for the links and email support.\n\n" +
|
||||||
|
|
||||||
|
"*PlayStation support is currently for URP and HDRP only.\n\n" +
|
||||||
|
|
||||||
|
"Note:\nDon't move the 'RealToon' folder to other folder, it should stay in the root folder 'Asset'.");
|
||||||
|
|
||||||
|
EditorGUILayout.EndScrollView();
|
||||||
|
|
||||||
|
EditorGUILayout.EndVertical();
|
||||||
|
|
||||||
|
EditorGUILayout.Space(22);
|
||||||
|
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
|
||||||
|
EditorGUILayout.Space(20);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginVertical("TextArea", GUILayout.Height(90));
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("Project Info:");
|
||||||
|
|
||||||
|
scroll2 = EditorGUILayout.BeginScrollView(scroll2, GUILayout.Height(140));
|
||||||
|
|
||||||
|
EditorGUILayout.Space(4);
|
||||||
|
|
||||||
|
GUIStyle Pro_info = GUI.skin.GetStyle("Label");
|
||||||
|
Pro_info.alignment = TextAnchor.MiddleLeft;
|
||||||
|
Pro_info.fontSize = 12;
|
||||||
|
|
||||||
|
GUILayout.Label("Rendering Pipeline: \n" + CurrRPDisp, Pro_info);
|
||||||
|
|
||||||
|
EditorGUILayout.Space(10);
|
||||||
|
|
||||||
|
GUILayout.Label("Unity Version: \n" + UniVerFull, Pro_info);
|
||||||
|
|
||||||
|
EditorGUILayout.Space(10);
|
||||||
|
|
||||||
|
if (GraphicsSettings.currentRenderPipeline == null)
|
||||||
|
{
|
||||||
|
GUILayout.Label("VRC Light Volumes (VRC Users Only): \n" + VRC_LV_Stat, Pro_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
EditorGUILayout.EndScrollView();
|
||||||
|
|
||||||
|
EditorGUILayout.EndVertical();
|
||||||
|
|
||||||
|
EditorGUILayout.Space(30);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginVertical("TextArea", GUILayout.Height(90));
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("Suitable Packages & ReadMe:");
|
||||||
|
|
||||||
|
scroll3 = EditorGUILayout.BeginScrollView(scroll3, GUILayout.Height(140));
|
||||||
|
|
||||||
|
GUIStyle Pro_info2 = GUI.skin.GetStyle("Label");
|
||||||
|
Pro_info2.fontSize = 12;
|
||||||
|
Pro_info2.fontStyle = FontStyle.Bold;
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("Packages: ", Pro_info2);
|
||||||
|
|
||||||
|
if(GUILayout.Button(RT_pac_name))
|
||||||
|
{
|
||||||
|
if(RT_pac_name != "Package Not Found In Your Project")
|
||||||
|
{
|
||||||
|
Debug.LogWarning("Now opening RealToon Shader package: " + RT_Pack.name);
|
||||||
|
AssetDatabase.OpenAsset(RT_Pack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EditorGUILayout.Space(10);
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("ReadMe: ", Pro_info2);
|
||||||
|
|
||||||
|
if (GraphicsSettings.currentRenderPipeline != null)
|
||||||
|
{
|
||||||
|
if (CurrRP == "Universal Render Pipeline" || CurrRP == "Universal RP")
|
||||||
|
{
|
||||||
|
if(GUILayout.Button("Read Me First (URP)"))
|
||||||
|
{
|
||||||
|
AssetDatabase.OpenAsset(RP_ReMe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (CurrRP == "High Definition Render Pipeline" || CurrRP == "High Definition RP")
|
||||||
|
{
|
||||||
|
if(GUILayout.Button("Read Me First (HDRP)"))
|
||||||
|
{
|
||||||
|
AssetDatabase.OpenAsset(RP_ReMe);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(GUILayout.Button("Quick Guide (HDRP)"))
|
||||||
|
{
|
||||||
|
AssetDatabase.OpenAsset(RP_Qui_ReMe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(GUILayout.Button("ReadMe for Manual Unpacking & Info"))
|
||||||
|
{
|
||||||
|
Application.OpenURL(Application.dataPath + "/RealToon/ReadMe - Important - Guide.txt");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(GUILayout.Button("VRoid-VRM users Read Me"))
|
||||||
|
{
|
||||||
|
Application.OpenURL(Application.dataPath + "/RealToon/For VRoid-VRM users.txt");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(GUILayout.Button("What's New"))
|
||||||
|
{
|
||||||
|
Application.OpenURL(Application.dataPath + "/RealToon/What's New.txt");
|
||||||
|
}
|
||||||
|
|
||||||
|
EditorGUILayout.EndScrollView();
|
||||||
|
|
||||||
|
EditorGUILayout.EndVertical();
|
||||||
|
|
||||||
|
EditorGUILayout.Space(20);
|
||||||
|
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
EditorGUILayout.Space(5);
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
|
||||||
|
if (GUILayout.Button("User Guide"))
|
||||||
|
{
|
||||||
|
Application.OpenURL(Application.dataPath + "/RealToon/RealToon (User Guide).pdf");
|
||||||
|
}
|
||||||
|
if (GUILayout.Button("Video Tutorials"))
|
||||||
|
{
|
||||||
|
Application.OpenURL("www.youtube.com/playlist?list=PL0M1m9smMVPJ4qEkJnZObqJE5mU9uz6SY");
|
||||||
|
}
|
||||||
|
if (GUILayout.Button("Contact/Support"))
|
||||||
|
{
|
||||||
|
Application.OpenURL("www.mjqstudioworks.weebly.com/contact.html");
|
||||||
|
}
|
||||||
|
if (GUILayout.Button("Website"))
|
||||||
|
{
|
||||||
|
Application.OpenURL("www.mjqstudioworks.weebly.com");
|
||||||
|
}
|
||||||
|
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
EditorGUILayout.EndVertical();
|
||||||
|
|
||||||
|
}
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
check_srp_ver();
|
||||||
|
check_vrc_lv();
|
||||||
|
UniVer = Application.unityVersion.Substring(0, 4);
|
||||||
|
UniVerFull = Application.unityVersion;
|
||||||
|
rt_pac_set();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDestroy()
|
||||||
|
{
|
||||||
|
if (File.Exists(rt_welcome_settings) && File.ReadAllText(rt_welcome_settings) == "0")
|
||||||
|
{
|
||||||
|
File.WriteAllText(rt_welcome_settings, "1");
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3eddd3adb3383a342a543d148d492447
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,130 @@
|
||||||
|
//RealToon Shader Cache
|
||||||
|
//MJQStudioWorks
|
||||||
|
//©2025
|
||||||
|
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace RealToon.Tools
|
||||||
|
{
|
||||||
|
public class RealToonShaderCache : EditorWindow
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Variables
|
||||||
|
|
||||||
|
static float WinHig = 300;
|
||||||
|
static EditorWindow EdiWin;
|
||||||
|
static int countsha = 0;
|
||||||
|
|
||||||
|
static string shaderCachePath = Directory.GetParent(Application.dataPath).ToString() + "/Library/ShaderCache/shader";
|
||||||
|
|
||||||
|
static string infospace = null;
|
||||||
|
|
||||||
|
static string[] rt_shaders =
|
||||||
|
{ "D_Default"
|
||||||
|
, "D_Fade_Transparency"
|
||||||
|
, "D_Refraction"
|
||||||
|
, "L_Default"
|
||||||
|
, "L_Fade_Transparency"
|
||||||
|
, "T_Default"
|
||||||
|
, "T_Fade_Transparency"
|
||||||
|
, "T_Refraction"
|
||||||
|
, "D_Default_URP"
|
||||||
|
, "D_Default_HDRP"
|
||||||
|
, "RealToon_Sobel_Outline_FX"
|
||||||
|
, "DeNorSobOutline"};
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
[MenuItem("Window/RealToon/RealToon Shader Cache")]
|
||||||
|
static void Init()
|
||||||
|
{
|
||||||
|
EdiWin = GetWindow<RealToonShaderCache>(true);
|
||||||
|
EdiWin.titleContent = new GUIContent("RealToon Shader Cache");
|
||||||
|
WinHig = 200;
|
||||||
|
EdiWin.minSize = new Vector2(440, WinHig);
|
||||||
|
EdiWin.maxSize = new Vector2(440, WinHig);
|
||||||
|
|
||||||
|
CountRTCache();
|
||||||
|
infospace = "There are " + countsha + " RealToon Shaders & Effects cached.";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnGUI()
|
||||||
|
{
|
||||||
|
|
||||||
|
var lblcenstyle = new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleCenter };
|
||||||
|
|
||||||
|
GUILayout.Space(10);
|
||||||
|
EditorGUILayout.BeginVertical();
|
||||||
|
|
||||||
|
GUILayout.Label(infospace, lblcenstyle);
|
||||||
|
|
||||||
|
CountRTCache();
|
||||||
|
infospace = "There are " + countsha + " RealToon Shaders cached.";
|
||||||
|
|
||||||
|
GUILayout.Space(10);
|
||||||
|
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
|
||||||
|
|
||||||
|
if (GUILayout.Button("Reduce/Clean Cached RealToon Shader"))
|
||||||
|
{
|
||||||
|
|
||||||
|
foreach (string rt_sha in rt_shaders)
|
||||||
|
{
|
||||||
|
string[] direc = Directory.GetDirectories(@shaderCachePath, rt_sha + "*");
|
||||||
|
|
||||||
|
foreach (string dir in direc)
|
||||||
|
{
|
||||||
|
if (direc.Length == 1)
|
||||||
|
{
|
||||||
|
Debug.Log("RealToon Shader Cache: " + rt_sha + " Shader Cache removed.");
|
||||||
|
Directory.Delete(dir.ToString(), true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (direc.Length == 0)
|
||||||
|
{
|
||||||
|
Debug.LogWarning("RealToon Shader Cache: " + rt_sha + " Shader already removed or not present.");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GUILayout.Button("Re-import RealToon Shader"))
|
||||||
|
{
|
||||||
|
AssetDatabase.ImportAsset("Assets/RealToon", ImportAssetOptions.ImportRecursive);
|
||||||
|
}
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
|
||||||
|
|
||||||
|
GUILayout.Label("Note:");
|
||||||
|
GUILayout.Label("*This will reduce or clear cached RealToon Shaders.\n" +
|
||||||
|
"*Useful for after update RealToon Shader or Re-import RealToon Shader.\n" +
|
||||||
|
"*'Re-import RealToon Shader', will cache RealToon Shaders again.");
|
||||||
|
|
||||||
|
EditorGUILayout.EndVertical();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void CountRTCache()
|
||||||
|
{
|
||||||
|
countsha = 0;
|
||||||
|
foreach (string rt_sha in rt_shaders)
|
||||||
|
{
|
||||||
|
string[] direc = Directory.GetDirectories(@shaderCachePath, rt_sha + "*");
|
||||||
|
|
||||||
|
foreach (string dir in direc)
|
||||||
|
{
|
||||||
|
++countsha;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 84840fc1d4c96e342b2cfdc247538fef
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e44691c063f9e5943b99e9a918b7647a
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b5506465586dd18499b022aff98e6ac8
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
For VRoid|VRM Users
|
||||||
|
===============================================================
|
||||||
|
There is a Swap Shader To RealToon Shader included.
|
||||||
|
This tool is Swap shader materials from
|
||||||
|
VRoid|VRM shader and Unity Shaders to RealToon shader.
|
||||||
|
It is really easy to use, just select the materials,
|
||||||
|
select from what shader is the material/s then click swap.
|
||||||
|
================================================================
|
||||||
|
|
||||||
|
*How to Use*
|
||||||
|
|
||||||
|
1. Click "Window" on the menu above beside "Help" then go to "RealToon -> Swap Shader To RealToon".
|
||||||
|
2. Select the "Materials" on your project window/panel.
|
||||||
|
3. Select from what Shader.
|
||||||
|
4. Select the options you need if available.
|
||||||
|
5. Click "Click To Swap To RealToon Shader".
|
||||||
|
6. All materials shader are now swap to RealToon Shader.
|
||||||
|
|
||||||
|
|
||||||
|
================================================================
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 82bc586cc72389c489021c62b8bc8333
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,153 @@
|
||||||
|
===========================================================================
|
||||||
|
Important - ReadMe - Quick User Guide
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
For users who first time use Unity
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
Note:
|
||||||
|
*Install the latest unity version or latest LTS version.
|
||||||
|
|
||||||
|
If your project is 3D or Built-In RP:
|
||||||
|
1.Go to folder "RealToon Shader Packages -> Built-In RP [3D]"
|
||||||
|
2.Double click "RealToon Built-In RP [3D]", the latest one with the 'Later' word on it.
|
||||||
|
3.Click "Import".
|
||||||
|
|
||||||
|
If your project is Universal Render Pipeline or High Definition RP:
|
||||||
|
1.Go to folder "RealToon Shader Packages -> SRP (LWRP - URP - HDRP)".
|
||||||
|
2.Open the folder that correspond to your project render pipeline.
|
||||||
|
3.Double click the latest one with the 'Later' word on it.
|
||||||
|
4.Click "Import".
|
||||||
|
|
||||||
|
To use RealToon:
|
||||||
|
1.Create a material by press mouse button "Right" on the "Project" window/panel.
|
||||||
|
2.Go to "Create -> Material".
|
||||||
|
3.Name your material then press keyboard key "Enter".
|
||||||
|
4.Click your created material.
|
||||||
|
5.Go to "Inspector" window/panel then change the "Shader" by left mouse button - click that drop down menu.
|
||||||
|
6-a.For 3D/Built-In: Go to "RealToon -> Default" and select "Default".
|
||||||
|
6-b.For Universal Render Pipeline: Go to "Universal Render Pipeline -> Default" and select "Default".
|
||||||
|
6-c.For High Definition RP: Go to "HDRP -> Default" and select "Default".
|
||||||
|
7.Drag your created material to the object you want to apply it.
|
||||||
|
|
||||||
|
Note:
|
||||||
|
Unity Built-In RP or 3D is the old unity render pipeline.
|
||||||
|
Unity SRP/Scriptable Render Pipeline (LWRP,URP and HDRP) are the new unity render pipeline, made using the Unity Scriptable Render Pipeline.
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
Import/Unpack RealToon Shaders Packages
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
If your project is Unity Built-In RP/3D:
|
||||||
|
1.Go to folder "RealToon Shader Packages -> Built-In RP"
|
||||||
|
2.Double click the RealToon Built-In version package you want to use.
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
If your project is Unity SRP:
|
||||||
|
1.Go to folder "RealToon Shader Packages -> SRP (LWRP - URP - HDRP)"
|
||||||
|
|
||||||
|
For LWRP:
|
||||||
|
1.Open the folder "LWRP".
|
||||||
|
2.Double click the RealToon LWRP version package you want to use.
|
||||||
|
3.Click "Import".
|
||||||
|
|
||||||
|
For URP:
|
||||||
|
1.Open the folder "URP".
|
||||||
|
2.Double click the RealToon LWRP version package you want to use.
|
||||||
|
3.Click "Import".
|
||||||
|
|
||||||
|
For HDRP:
|
||||||
|
1.Open the folder "HDRP".
|
||||||
|
2.Double click the RealToon LWRP version package you want to use.
|
||||||
|
3.Click "Import".
|
||||||
|
|
||||||
|
Note:
|
||||||
|
'Below' means older verion.
|
||||||
|
'Later' means Current and later future version.
|
||||||
|
|
||||||
|
There are 2 folder each SRP(URP & HDRP):
|
||||||
|
*Unity 6 folder is for Unity 6.0 to later/latest unity version.
|
||||||
|
*Unity 2023 and Below folder is for Unity 2023,2022,2021 and 2019
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
Accessing the shader:
|
||||||
|
[RealToon Built-In RP/3D] The shaders are in "RealToon" folder.
|
||||||
|
[RealToon LWRP] The shaders are in "Lightweight Render Pipeline" folder.
|
||||||
|
[RealToon URP] The shader is in "Universal Render Pipeline" folder.
|
||||||
|
[RealToon HDRP] The shader is in "HDRP" folder.
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
Recommended Unity and SRP Versions:
|
||||||
|
[RealToon LWRP] - Unity 2018 and LWRP V4.0.0 or latest version.
|
||||||
|
[RealToon URP] - Unity 2020.3.0 to newer versions and URP 10 or latest version.
|
||||||
|
[RealToon HDRP] - Unity 2020.2.0 to newer versions and HDRP 10 or latest version.
|
||||||
|
|
||||||
|
Unity and SRP(URP and HDRP) Versions:
|
||||||
|
[URP]
|
||||||
|
Unity 6.0 to Later - URP
|
||||||
|
Unity 2023.1.0 to before 2023.2.20 - URP 15 to 16
|
||||||
|
Unity 2021.3.0 to before 2022.2.0 - URP 14
|
||||||
|
Unity 2021.2.0 to before 2021.3.0 - URP 12 to 13
|
||||||
|
|
||||||
|
[HDRP]
|
||||||
|
Unity 6.0 to Later - HDRP
|
||||||
|
Unity 2023.2.0 to before 2023.2.20 - HDRP 16
|
||||||
|
Unity 2022.2.0 to before 2022.3.0 - HDRP 14 to 15
|
||||||
|
Unity 2021.2.0 to before 2022.2.0 - HDRP 12 to 13
|
||||||
|
|
||||||
|
Recommended Unity versions for Built-In RP/3D:
|
||||||
|
From Unity 5 to current latest unity version.
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
For Demo/Example Scenes
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
1.Go to folder "RealToon Examples"
|
||||||
|
2.Open the folder.
|
||||||
|
*For RealToon Built-In RP/3D: Built-In RP [3D] folder
|
||||||
|
*For RealToon LWRP - URP - HDRP: SRP folder
|
||||||
|
|
||||||
|
** For more info about the example/demo,
|
||||||
|
read the "Read Me First [About the Example - Demos].txt"
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
Notes
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
*For VRoid model users, read the "For VRoid model users.txt".
|
||||||
|
*For documentation or user guide, read "RealToon (User Guide).pdf" pdf/printed document file.
|
||||||
|
*To know previous or current version, read "Change - Fix Log.txt" text file.
|
||||||
|
*To know what's new, read the "What's New.txt" text file.
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
Video Tutorials
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
|
*How to download, import and unpack RealToon (URP,HDRP and BiRP) Shader Packages (For Beginners and Others levels):
|
||||||
|
https://www.youtube.com/watch?v=JVlbOYi2V3M
|
||||||
|
|
||||||
|
*RealToon Tutorials:
|
||||||
|
https://www.youtube.com/playlist?list=PL0M1m9smMVPJ4qEkJnZObqJE5mU9uz6SY
|
||||||
|
===========================================================================
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1a9714562b1d1f54b8209db56f4f9722
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1ecd1292463dbba41ae18d3c9c8dfafd
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c35075f3b7892104c9fbb8e30571ea9e
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
|
|
@ -0,0 +1,99 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a262df9417c34d94f9348dd5e946c03d
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 209 KiB |
|
|
@ -0,0 +1,99 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3f43d5b1c87da4e4d871043e1e19ac46
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 1
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 0
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 0
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID:
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f4f609eb2dc9c9f409de74267e0a996a
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ab3032666bf87064a80b0c304f26d5c1
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4fb4eafaaec7fd641960ecf923a9f59e
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
RealToon (URP)
|
||||||
|
===========================================================
|
||||||
|
Note:
|
||||||
|
===========================================================
|
||||||
|
|
||||||
|
URP is universal, from mobile, console to high end.
|
||||||
|
Shadow for Pointlight is not available on older URP versions.
|
||||||
|
Tessellation will be coming soon.
|
||||||
|
|
||||||
|
===========================================================
|
||||||
|
*How to download, import and unpack RealToon (URP) Shader Packages Video Tutorial:
|
||||||
|
https://www.youtube.com/watch?v=JVlbOYi2V3M&t=83s
|
||||||
|
===========================================================
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b27cd9e670c186d46a9a3bcf35ddb0a9
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 12d53aaf194111048be163d2c6118823
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f2d6850d720a3234a8788304af582ff9
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: be4d0c51ee19515428ded7c18c589137
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a3f4aac2557070e4b8d46c47babb417c
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b23c00d9746fd7a449110741bd21ac03
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5468d29cc8b510d47920ef4d6db9d05d
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 409a13bd17e16ba4a8defa637cb847ba
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 580baea314e3bca4e8164a0821e5c8ad
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6dbbc6eb0a9826649bd01acd58991111
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,140 @@
|
||||||
|
//RealToon HDRP - MoVecPas
|
||||||
|
//MJQStudioWorks
|
||||||
|
|
||||||
|
//=========================
|
||||||
|
|
||||||
|
struct Attributes
|
||||||
|
{
|
||||||
|
float4 position : POSITION;
|
||||||
|
float3 normalOS : NORMAL;
|
||||||
|
float4 tangentOS : TANGENT;
|
||||||
|
float2 uv : TEXCOORD0;
|
||||||
|
float3 positionOld : TEXCOORD4;
|
||||||
|
#if _ADD_PRECOMPUTED_VELOCITY
|
||||||
|
float3 alembicMotionVector : TEXCOORD5;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef N_F_DDMD_ON
|
||||||
|
float4 weights : BLENDWEIGHTS;//DOTS_LiBleSki_MV
|
||||||
|
uint4 indices : BLENDINDICES;//DOTS_LiBleSki_MV
|
||||||
|
//uint vertexID : SV_VertexID;//DOTS_CompDef_MV
|
||||||
|
#endif
|
||||||
|
|
||||||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Varyings
|
||||||
|
{
|
||||||
|
float4 positionCS : SV_POSITION;
|
||||||
|
float4 positionCSNoJitter : POSITION_CS_NO_JITTER;
|
||||||
|
float4 previousPositionCSNoJitter : PREV_POSITION_CS_NO_JITTER;
|
||||||
|
float2 uv : TEXCOORD0;
|
||||||
|
float3 positionWS : TEXCOORD1;
|
||||||
|
float3 normalWS : TEXCOORD2;
|
||||||
|
|
||||||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||||
|
UNITY_VERTEX_OUTPUT_STEREO
|
||||||
|
};
|
||||||
|
|
||||||
|
Varyings vert(Attributes input)
|
||||||
|
{
|
||||||
|
Varyings output = (Varyings)0;
|
||||||
|
|
||||||
|
UNITY_SETUP_INSTANCE_ID(input);
|
||||||
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
||||||
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(UNITY_DOTS_INSTANCING_ENABLED)
|
||||||
|
|
||||||
|
#ifdef N_F_DDMD_ON
|
||||||
|
|
||||||
|
float4 _LBS_CD_Position = input.position;
|
||||||
|
float3 _LBS_CD_Normal = input.normalOS;
|
||||||
|
//float4 _LBS_CD_Tangent = input.tangentOS; //not currently needed
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
float4 _LBS_CD_Position = 0;
|
||||||
|
float3 _LBS_CD_Normal = 0;
|
||||||
|
float4 _LBS_CD_Tangent = 0;
|
||||||
|
|
||||||
|
DOTS_LiBleSki(input.indices, input.weights, input.position.xyz, input.normalOS.xyz, input.tangentOS.xyz, (float3)_LBS_CD_Position, _LBS_CD_Normal, (float3)_LBS_CD_Tangent);//DOTS_LiBleSki_MV
|
||||||
|
//DOTS_CompDef(input.vertexID, (float3)_LBS_CD_Position, _LBS_CD_Normal, (float3)_LBS_CD_Tangent);//DOTS_CompDef_MV
|
||||||
|
_LBS_CD_Position.w = 1.0;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
float4 _LBS_CD_Position = input.position;
|
||||||
|
float3 _LBS_CD_Normal = input.normalOS;
|
||||||
|
//float4 _LBS_CD_Tangent = input.tangentOS; //not currently needed
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
const VertexPositionInputs vertexInput = GetVertexPositionInputs(_LBS_CD_Position.xyz);
|
||||||
|
|
||||||
|
//RT_SE
|
||||||
|
#if N_F_SE_ON
|
||||||
|
input.position = RT_SE(vertexInput.positionWS, input.position);
|
||||||
|
_LBS_CD_Position = input.position;
|
||||||
|
#endif
|
||||||
|
//==
|
||||||
|
|
||||||
|
//RT_PA
|
||||||
|
#if N_F_PA_ON
|
||||||
|
output.positionCS = mul(RT_PA(vertexInput.positionWS), float4(_LBS_CD_Position.xyz,1.0) );
|
||||||
|
#else
|
||||||
|
output.positionCS = vertexInput.positionCS;
|
||||||
|
#endif
|
||||||
|
//==
|
||||||
|
|
||||||
|
output.uv = TRANSFORM_TEX(input.uv, _MainTex);
|
||||||
|
output.positionWS = TransformObjectToWorld(_LBS_CD_Position.xyz);
|
||||||
|
output.normalWS = TransformObjectToWorldDir(_LBS_CD_Normal);
|
||||||
|
output.positionCSNoJitter = mul(_NonJitteredViewProjMatrix, mul(UNITY_MATRIX_M, _LBS_CD_Position));
|
||||||
|
|
||||||
|
float4 prevPos = (unity_MotionVectorsParams.x == 1) ? float4(input.positionOld, 1) : _LBS_CD_Position;
|
||||||
|
#if _ADD_PRECOMPUTED_VELOCITY
|
||||||
|
prevPos = prevPos - float4(input.alembicMotionVector, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
output.previousPositionCSNoJitter = mul(_PrevViewProjMatrix, mul(UNITY_PREV_MATRIX_M, prevPos));
|
||||||
|
|
||||||
|
ApplyMotionVectorZBias(output.positionCS);
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
float4 frag(Varyings input) : SV_Target
|
||||||
|
{
|
||||||
|
UNITY_SETUP_INSTANCE_ID(input);
|
||||||
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
|
||||||
|
|
||||||
|
#ifdef N_F_TP_ON
|
||||||
|
half4 _MainTex_var = RT_Tripl_Default(_MainTex, sampler_MainTex, input.positionWS, input.normalWS);
|
||||||
|
#else
|
||||||
|
half4 _MainTex_var = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, TRANSFORM_TEX(input.uv, _MainTex));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//RT_CO
|
||||||
|
RT_CO(input.uv, _MainTex_var, _MainTex_var.a, input.positionWS, input.normalWS, input.positionCS.xy);
|
||||||
|
//==
|
||||||
|
|
||||||
|
|
||||||
|
//RT_NFD
|
||||||
|
#ifdef N_F_NFD_ON
|
||||||
|
RT_NFD(input.positionCS.xy);
|
||||||
|
#endif
|
||||||
|
//==
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(LOD_FADE_CROSSFADE)
|
||||||
|
LODFadeCrossFade(input.positionCS);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return float4(CalcNdcMotionVectorFromCsPositions(input.positionCSNoJitter, input.previousPositionCSNoJitter), 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 13d5ac7414ba40c4a95664ea1aa48e50
|
||||||
|
ShaderIncludeImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7314c2e030540e5409b59feea5b784ae
|
||||||
|
ShaderIncludeImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1a20f2a1310293740b6c544a6fcc743b
|
||||||
|
ShaderIncludeImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8bb1dffeb58b33748a6224c3880b70af
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8a6b9672af71dd24a90aff56deebb295
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e7465c6b31a542d43a0240672077f1cf
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,9 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6459b2db96a08ca41b0f9b39dc7ad59e
|
||||||
|
ShaderImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
defaultTextures: []
|
||||||
|
nonModifiableTextures: []
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8503504c0d606ac44a6f11bc845e085b
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
//RealToon - Custom Shadow Resolution
|
||||||
|
//MJQStudioWorks
|
||||||
|
//©2025
|
||||||
|
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace RealToon.Script
|
||||||
|
{
|
||||||
|
[ExecuteInEditMode]
|
||||||
|
[RequireComponent(typeof(Light))]
|
||||||
|
[AddComponentMenu("RealToon/Tools/Custom Shadow Resolution")]
|
||||||
|
public class CustomShadowResolution : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Header("Custom Shadow Resolution V1.0.0")]
|
||||||
|
[Header("Note: Higher Shadow Resolution = More GPU RAM Usage.")]
|
||||||
|
[Header("For RealToon Built-In RP Only")]
|
||||||
|
|
||||||
|
[Space(10)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Input value")]
|
||||||
|
public int Value = 2048;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Final Resolution (Value * 2)")]
|
||||||
|
public int FinalResolution = 4096;
|
||||||
|
|
||||||
|
[Space(10)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Reset to default value")]
|
||||||
|
public bool Reset = false;
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
this.GetComponent<Light>().shadowCustomResolution = FinalResolution;
|
||||||
|
FinalResolution = Value * 2;
|
||||||
|
|
||||||
|
if (Reset == true)
|
||||||
|
{
|
||||||
|
Value = 2048;
|
||||||
|
FinalResolution = 4096;
|
||||||
|
Reset = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Value < 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
Value = 0;
|
||||||
|
FinalResolution = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ef184494de3501f4ca1c8d8839a36f11
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: faeff1c229edd844db97efa9068e8296
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,237 @@
|
||||||
|
//RealToon - Frame By Frame Rendering V1.0.0
|
||||||
|
//MJQStudioWorks
|
||||||
|
//©2025
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
namespace RealToon.Tools.FrameByFrameRendering
|
||||||
|
{
|
||||||
|
[AddComponentMenu("RealToon/Tools/Frame By Frame Rendering/Frame By Frame Rendering (Default)")]
|
||||||
|
public class FrameByFrameRendering_Default : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Header("(Frame By Frame Rendering V1.0.0)")]
|
||||||
|
[Header("Click 'Play' button to start render.")]
|
||||||
|
|
||||||
|
[Space(20)]
|
||||||
|
|
||||||
|
[Header("==============================")]
|
||||||
|
[Header("(Settings)")]
|
||||||
|
|
||||||
|
[Space(5)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Example Path: C:/TheNameOfTheFolder (Default folder name is Rendered Files and it will be created to your unity root project folder if this set to empty.")]
|
||||||
|
public string PathFolder = "Rendered Files";
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("PNG File Name")]
|
||||||
|
public string PNGFileName = "Frame";
|
||||||
|
|
||||||
|
[Space(15)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Frame Rate (Set this to 24 if you want Film Style framerate.")]
|
||||||
|
public int FrameRate = 24;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Start frame to start rendering.")]
|
||||||
|
public int StartFrame = 0;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("End frame to end rendering.")]
|
||||||
|
public int EndFrame = 100;
|
||||||
|
|
||||||
|
[Space(15)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Render single frame or single image only, For Illustration or Art use.")]
|
||||||
|
public bool SingleFrameRenderingMode = false;
|
||||||
|
|
||||||
|
[Header("==============================")]
|
||||||
|
|
||||||
|
[Header("(Information [Display Only] )")]
|
||||||
|
|
||||||
|
[Space(5)]
|
||||||
|
[Tooltip("Display the current frame of your scene/play. (Display Only)")]
|
||||||
|
public int CurrentFrame = 0;
|
||||||
|
|
||||||
|
[Tooltip("Display the information of the operation or rendering. (Display Only)")]
|
||||||
|
public string info = string.Empty;
|
||||||
|
|
||||||
|
private bool StartRendering = false;
|
||||||
|
private bool StartFrameCheck = false;
|
||||||
|
private string CurrentRenderedFile = string.Empty;
|
||||||
|
private int StartFrameCont = 0;
|
||||||
|
private int EndFrameCont = 100;
|
||||||
|
private int FrameRateCont = 24;
|
||||||
|
private string PathFolderCont = "Rendered Files";
|
||||||
|
private string PNGFileNameCont = "Frame";
|
||||||
|
private bool SingleFrameRenderingCont = false;
|
||||||
|
|
||||||
|
private System.IO.DirectoryInfo DirInfo;
|
||||||
|
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (StartFrameCont <= -1)
|
||||||
|
{
|
||||||
|
StartFrameCheck = false;
|
||||||
|
StartRendering = false;
|
||||||
|
info = "Rendering has not started because 'Start Frame' value is less than 0.";
|
||||||
|
Debug.LogError(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (EndFrameCont <= 0)
|
||||||
|
{
|
||||||
|
StartFrameCheck = false;
|
||||||
|
StartRendering = false;
|
||||||
|
info = "Rendering has not started because 'End Frame' value is 0 or less than 0.";
|
||||||
|
Debug.LogError(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FrameRateCont <= 0)
|
||||||
|
{
|
||||||
|
StartFrameCheck = false;
|
||||||
|
StartRendering = false;
|
||||||
|
info = "Rendering has not started because 'Frame Rate' value is 0 or less than 0.";
|
||||||
|
Debug.LogError(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PNGFileName == string.Empty)
|
||||||
|
{
|
||||||
|
PNGFileName = "Frame";
|
||||||
|
info = "File Name set to 'Frame' because the field is not set or empty.";
|
||||||
|
Debug.LogError(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PathFolder == string.Empty)
|
||||||
|
{
|
||||||
|
PathFolder = "Rendered Files";
|
||||||
|
info = "Folder Path set to 'Rendered Files' and will be created to your UNITY ROOT PROJECT FOLDER because the field is not set or empty.";
|
||||||
|
Debug.LogError(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
Time.captureFramerate = FrameRate;
|
||||||
|
StartFrameCont = StartFrame;
|
||||||
|
EndFrameCont = EndFrame;
|
||||||
|
FrameRateCont = FrameRate;
|
||||||
|
SingleFrameRenderingCont = SingleFrameRenderingMode;
|
||||||
|
PathFolderCont = PathFolder;
|
||||||
|
PNGFileNameCont = PNGFileName;
|
||||||
|
|
||||||
|
DirInfo = new System.IO.DirectoryInfo(PathFolder);
|
||||||
|
|
||||||
|
if (!System.IO.Directory.Exists(PathFolder))
|
||||||
|
{
|
||||||
|
System.IO.Directory.CreateDirectory(PathFolder);
|
||||||
|
info = "Folder '" + PathFolder + "' Has Been Created To Your Root Project Folder.";
|
||||||
|
Debug.LogWarning(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (SingleFrameRenderingMode == false)
|
||||||
|
{
|
||||||
|
info = "Video/Animation Mode";
|
||||||
|
Debug.LogWarning(info);
|
||||||
|
|
||||||
|
if (DirInfo.GetFiles().Length != 0)
|
||||||
|
{
|
||||||
|
StartFrameCheck = false;
|
||||||
|
StartRendering = false;
|
||||||
|
info = "(Video/Animation Mode) Rendering not started because there are already rendered frames or files in this folder ('" + PathFolder + "'), Please empty this folder or make another folder by changing the Path Folder.";
|
||||||
|
Debug.LogError(info);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StartFrameCheck = true;
|
||||||
|
StartRendering = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StartFrameCheck = true;
|
||||||
|
StartRendering = true;
|
||||||
|
info = "Picture or Single Frame Rendering Mode";
|
||||||
|
Debug.LogWarning(info);
|
||||||
|
EndFrameCont = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
CurrentFrame = Time.frameCount - 1;
|
||||||
|
StartFrame = StartFrameCont;
|
||||||
|
EndFrame = EndFrameCont;
|
||||||
|
SingleFrameRenderingMode = SingleFrameRenderingCont;
|
||||||
|
PathFolder = PathFolderCont;
|
||||||
|
PNGFileName = PNGFileNameCont;
|
||||||
|
|
||||||
|
if (PathFolder == string.Empty)
|
||||||
|
{
|
||||||
|
PathFolder = "Rendered Files";
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
if (StartFrameCheck == true)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (CurrentFrame == StartFrameCont)
|
||||||
|
{
|
||||||
|
info = "Rendering Has Started.";
|
||||||
|
Debug.LogWarning(info);
|
||||||
|
StartRendering = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StartRendering == true)
|
||||||
|
{
|
||||||
|
if (SingleFrameRenderingMode == false)
|
||||||
|
{
|
||||||
|
string fname = string.Format("{0}/" + PNGFileNameCont + " {1:D04}.png", PathFolderCont, CurrentFrame);
|
||||||
|
CurrentRenderedFile = fname;
|
||||||
|
info = fname;
|
||||||
|
|
||||||
|
#if UNITY_2017_1_OR_NEWER
|
||||||
|
ScreenCapture.CaptureScreenshot(fname);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_5_6
|
||||||
|
Application.CaptureScreenshot(fname);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string fname = string.Format("{0}/" + PNGFileNameCont + " " + System.DateTime.Now.ToString("hh_mm_ss") + ".png", PathFolderCont, CurrentFrame);
|
||||||
|
CurrentRenderedFile = fname;
|
||||||
|
info = fname;
|
||||||
|
|
||||||
|
#if UNITY_2017_1_OR_NEWER
|
||||||
|
ScreenCapture.CaptureScreenshot(fname);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_5_6
|
||||||
|
Application.CaptureScreenshot(fname);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (CurrentFrame == EndFrame)
|
||||||
|
{
|
||||||
|
info = "Rendering Has Ended." + " [Last Rendered File: " + CurrentRenderedFile + "]";
|
||||||
|
Debug.LogWarning(info);
|
||||||
|
StartRendering = false;
|
||||||
|
StartFrameCheck = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 38f2863825408a940b834eb29e4811b4
|
||||||
|
timeCreated: 1527622178
|
||||||
|
licenseType: Store
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 65518
|
||||||
|
packageName: RealToon (Pro Anime/Toon Shader)
|
||||||
|
packageVersion: 5.0.8p8
|
||||||
|
assetPath: Assets/RealToon/RealToon Tools/FrameByFrameRendering/FrameByFrameRendering_Default.cs
|
||||||
|
uploadId: 629436
|
||||||
|
|
@ -0,0 +1,178 @@
|
||||||
|
//RealToon - Frame By Frame Rendering V1.0.0
|
||||||
|
//MJQStudioWorks
|
||||||
|
//©2025
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
namespace RealToon.Tools.FrameByFrameRendering
|
||||||
|
{
|
||||||
|
[AddComponentMenu("RealToon/Tools/Frame By Frame Rendering/Frame By Frame Rendering (Manual)")]
|
||||||
|
public class FrameByFrameRendering_Manual : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Header("(Frame By Frame Rendering V1.0.0)")]
|
||||||
|
[Header("Click 'Play' & 'Render' button to start render one by one.")]
|
||||||
|
|
||||||
|
[Space(20)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Current Frame Number")]
|
||||||
|
public int FrameNumber = 0;
|
||||||
|
|
||||||
|
[Space(5)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Start Render")]
|
||||||
|
public bool Render = false;
|
||||||
|
|
||||||
|
[Header("==============================")]
|
||||||
|
[Header("(Settings)")]
|
||||||
|
|
||||||
|
[Space(5)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Example Path: C:/TheNameOfTheFolder (Default folder name is Rendered Files and it will be created to your unity root project folder if this set to empty.")]
|
||||||
|
public string PathFolder = "Rendered Files";
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("PNG File Name")]
|
||||||
|
public string PNGFileName = "Frame";
|
||||||
|
|
||||||
|
[Space(15)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Render single frame or single image only, For Illustration or Art use.")]
|
||||||
|
public bool PictureMode = false;
|
||||||
|
|
||||||
|
[Header("==============================")]
|
||||||
|
|
||||||
|
[Header("(Information [Display Only] )")]
|
||||||
|
|
||||||
|
[Space(5)]
|
||||||
|
|
||||||
|
[Tooltip("Display the information of the operation or rendering. (Display Only)")]
|
||||||
|
public int LastRenderedFrame = 0;
|
||||||
|
public string info = string.Empty;
|
||||||
|
|
||||||
|
private string CurrentRenderedFile = string.Empty;
|
||||||
|
private string PathFolderCont = "Rendered Files";
|
||||||
|
private string PNGFileNameCont = "Frame";
|
||||||
|
private int FrameNumberCont = 0;
|
||||||
|
private bool PictureModeCont = false;
|
||||||
|
private bool PreventRender = false;
|
||||||
|
|
||||||
|
private System.IO.DirectoryInfo DirInfo;
|
||||||
|
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (PNGFileName == string.Empty)
|
||||||
|
{
|
||||||
|
PNGFileName = "Frame";
|
||||||
|
info = "File Name set to 'Frame' because the field is not set or empty.";
|
||||||
|
Debug.LogError(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PathFolder == string.Empty)
|
||||||
|
{
|
||||||
|
PathFolder = "Rendered Files";
|
||||||
|
info = "Folder Path set to 'Rendered Files' and will be created to your UNITY ROOT PROJECT FOLDER because the field is not set or empty.";
|
||||||
|
Debug.LogError(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
PictureModeCont = PictureMode;
|
||||||
|
PathFolderCont = PathFolder;
|
||||||
|
PNGFileNameCont = PNGFileName;
|
||||||
|
FrameNumberCont = FrameNumber;
|
||||||
|
|
||||||
|
DirInfo = new System.IO.DirectoryInfo(PathFolder);
|
||||||
|
|
||||||
|
if (!System.IO.Directory.Exists(PathFolder))
|
||||||
|
{
|
||||||
|
System.IO.Directory.CreateDirectory(PathFolder);
|
||||||
|
info = "Folder '" + PathFolder + "' Has Been Created To Your Root Project Folder.";
|
||||||
|
Debug.LogWarning(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (PictureMode == false)
|
||||||
|
{
|
||||||
|
info = "Frame by Frame Rendering Mode";
|
||||||
|
Debug.LogWarning(info);
|
||||||
|
|
||||||
|
if (DirInfo.GetFiles().Length != 0)
|
||||||
|
{
|
||||||
|
PreventRender = true;
|
||||||
|
Render = false;
|
||||||
|
info = "(Frame by Frame Mode) Rendering not started because there are already rendered frames or files in this folder ('" + PathFolder + "'), Please empty this folder or make another folder by changing the Path Folder.";
|
||||||
|
Debug.LogError(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
info = "Picture or Single Frame Rendering Mode";
|
||||||
|
Debug.LogWarning(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
PictureMode = PictureModeCont;
|
||||||
|
PathFolder = PathFolderCont;
|
||||||
|
PNGFileName = PNGFileNameCont;
|
||||||
|
LastRenderedFrame = FrameNumberCont;
|
||||||
|
|
||||||
|
if (FrameNumber <= 0)
|
||||||
|
{
|
||||||
|
FrameNumber = FrameNumberCont;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PreventRender == false)
|
||||||
|
{
|
||||||
|
if (Render == true)
|
||||||
|
{
|
||||||
|
if (PictureMode == false)
|
||||||
|
{
|
||||||
|
string fname = string.Format("{0}/" + PNGFileNameCont + " {1:D04}.png", PathFolderCont, FrameNumber);
|
||||||
|
CurrentRenderedFile = fname;
|
||||||
|
|
||||||
|
#if UNITY_2017_1_OR_NEWER
|
||||||
|
ScreenCapture.CaptureScreenshot(fname);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_5_6
|
||||||
|
Application.CaptureScreenshot(fname);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
FrameNumber += 1;
|
||||||
|
FrameNumberCont = FrameNumber;
|
||||||
|
|
||||||
|
info = CurrentRenderedFile;
|
||||||
|
Debug.LogWarning(info);
|
||||||
|
Render = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string fname = string.Format("{0}/" + PNGFileNameCont + " " + System.DateTime.Now.ToString("hh_mm_ss") + ".png", PathFolderCont, FrameNumber);
|
||||||
|
CurrentRenderedFile = fname;
|
||||||
|
|
||||||
|
#if UNITY_2017_1_OR_NEWER
|
||||||
|
ScreenCapture.CaptureScreenshot(fname);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_5_6
|
||||||
|
Application.CaptureScreenshot(fname);
|
||||||
|
#endif
|
||||||
|
info = CurrentRenderedFile;
|
||||||
|
Debug.LogWarning(info);
|
||||||
|
Render = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9f51a2cb54804064b8fc03edfef062fb
|
||||||
|
timeCreated: 1527764313
|
||||||
|
licenseType: Store
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
AssetOrigin:
|
||||||
|
serializedVersion: 1
|
||||||
|
productId: 65518
|
||||||
|
packageName: RealToon (Pro Anime/Toon Shader)
|
||||||
|
packageVersion: 5.0.8p8
|
||||||
|
assetPath: Assets/RealToon/RealToon Tools/FrameByFrameRendering/FrameByFrameRendering_Manual.cs
|
||||||
|
uploadId: 629436
|
||||||
|
|
@ -0,0 +1,404 @@
|
||||||
|
//RealToon - Perspective Adjustment [Helper]
|
||||||
|
//MJQStudioWorks
|
||||||
|
//©2025
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace RealToon.Script
|
||||||
|
{
|
||||||
|
|
||||||
|
[ExecuteAlways]
|
||||||
|
[AddComponentMenu("RealToon/Tools/Perspective Adjustment - Controller")]
|
||||||
|
public class PerspectiveAdjustmentController : MonoBehaviour
|
||||||
|
{
|
||||||
|
[HideInInspector]
|
||||||
|
[SerializeField]
|
||||||
|
Transform[] SubTran;
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
[SerializeField]
|
||||||
|
Material[] Mat;
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
[SerializeField]
|
||||||
|
Transform[] attac;
|
||||||
|
|
||||||
|
[Header("Note: Perspective Adjustment feature will be automatically enable\nOn the materials of the object/model that uses RealToon Shader.")]
|
||||||
|
[Header("It is recommend to set the Clipping Planes - Near of the camera\nto 0.01 to prevent slicing when near.")]
|
||||||
|
|
||||||
|
[Space(25)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("This will change the perspective of an object to 2D or 3D or FOV stretch look.\nFor 2d toon/anime look, set it to 0.5 or 0.")]
|
||||||
|
public float Perspective = 1;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("This will change the clipping on the object.\nChange this if the object is overlapping front or back.")]
|
||||||
|
public float Clip = 0;
|
||||||
|
|
||||||
|
[Space(15)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("This will adjust the size of the object when the camera is closer.")]
|
||||||
|
public float CloseUpSize = 0;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("How smooth the transition of the sizing.")]
|
||||||
|
public float CloseUpSizeSmoothTransition = 1;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Distance transition from the camera to the object.")]
|
||||||
|
public float CloseUpSizeDistance = 0;
|
||||||
|
|
||||||
|
[Space(15)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Can animate the values/properties or create keyframe.")]
|
||||||
|
public bool CanAnimateIt = true;
|
||||||
|
|
||||||
|
int coun_obj_wi_ralsha = 0;
|
||||||
|
int coun_obj_mat = 0;
|
||||||
|
int coun_obj_mat_arr = 0;
|
||||||
|
|
||||||
|
string RT_Sha_Nam_URP = "Universal Render Pipeline/RealToon/Version 5/Default/Default";
|
||||||
|
string RT_Sha_Nam_HDRP = "HDRP/RealToon/Version 5/Default";
|
||||||
|
|
||||||
|
string RT_Sha_Nam_BiRP_DD = "RealToon/Version 5/Default/Default";
|
||||||
|
string RT_Sha_Nam_BiRP_DFT = "RealToon/Version 5/Default/Fade Transparency";
|
||||||
|
string RT_Sha_Nam_BiRP_DR = "RealToon/Version 5/Default/Refraction";
|
||||||
|
string RT_Sha_Nam_BiRP_TDD = "RealToon/Version 5/Tessellation/Default";
|
||||||
|
string RT_Sha_Nam_BiRP_TDFT = "RealToon/Version 5/Tessellation/Fade Transparency";
|
||||||
|
string RT_Sha_Nam_BiRP_TDR = "RealToon/Version 5/Tessellation/Refraction";
|
||||||
|
string RT_Sha_Nam_BiRP_DDL = "RealToon/Version 5/Lite/Default";
|
||||||
|
string RT_Sha_Nam_BiRP_DFTL = "RealToon/Version 5/Lite/Fade Transparency";
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
[SerializeField]
|
||||||
|
bool checkstart = true;
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
if (checkstart == true)
|
||||||
|
{
|
||||||
|
InitStart();
|
||||||
|
checkstart = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LateUpdate()
|
||||||
|
{
|
||||||
|
if (Mat != null)
|
||||||
|
{
|
||||||
|
if (CanAnimateIt == true)
|
||||||
|
{
|
||||||
|
foreach (Material Mate in Mat)
|
||||||
|
{
|
||||||
|
if (Mate != null)
|
||||||
|
{
|
||||||
|
if (Mate.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_TDR ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DDL ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DFTL)
|
||||||
|
{
|
||||||
|
Set_Shad_Prop(Mate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnValidate()
|
||||||
|
{
|
||||||
|
if (Mat != null)
|
||||||
|
{
|
||||||
|
foreach (Material Mate in Mat)
|
||||||
|
{
|
||||||
|
if (Mate != null)
|
||||||
|
{
|
||||||
|
if (Mate.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_TDR ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DDL ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DFTL)
|
||||||
|
{
|
||||||
|
Set_Shad_Prop(Mate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove Later
|
||||||
|
void OnDestroy()
|
||||||
|
{
|
||||||
|
Res_Shad_Prop();
|
||||||
|
foreach (Material Mate in Mat)
|
||||||
|
{
|
||||||
|
if (Mate != null)
|
||||||
|
{
|
||||||
|
if (Mate.shader.name == RT_Sha_Nam_URP || Mate.shader.name == RT_Sha_Nam_HDRP)
|
||||||
|
{
|
||||||
|
Mate.SetFloat("_N_F_PA", 0.0f);
|
||||||
|
Mate.DisableKeyword("N_F_PA_ON");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
void Reset()
|
||||||
|
{
|
||||||
|
if (Mat != null)
|
||||||
|
{
|
||||||
|
checkstart = true;
|
||||||
|
Res_Shad_Prop();
|
||||||
|
|
||||||
|
foreach (Material Mate in Mat)
|
||||||
|
{
|
||||||
|
if (Mate != null)
|
||||||
|
{
|
||||||
|
if (Mate.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_TDR ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DDL ||
|
||||||
|
Mate.shader.name == RT_Sha_Nam_BiRP_DFTL)
|
||||||
|
{
|
||||||
|
Set_Shad_Prop(Mate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
coun_obj_wi_ralsha = 0;
|
||||||
|
coun_obj_mat = 0;
|
||||||
|
coun_obj_mat_arr = 0;
|
||||||
|
InitStart();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Init
|
||||||
|
|
||||||
|
void InitStart()
|
||||||
|
{
|
||||||
|
if (attac == null || attac.Length == 0)
|
||||||
|
{
|
||||||
|
attac = this.gameObject.GetComponentsInChildren<Transform>();
|
||||||
|
}
|
||||||
|
|
||||||
|
int x = 0;
|
||||||
|
foreach (Transform Trans in attac)
|
||||||
|
{
|
||||||
|
|
||||||
|
Debug.Log("yes");
|
||||||
|
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDR ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DDL ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFTL)
|
||||||
|
{
|
||||||
|
coun_obj_wi_ralsha++;
|
||||||
|
coun_obj_mat += Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterials.Length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Trans.GetComponent<MeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDR ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DDL ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFTL)
|
||||||
|
{
|
||||||
|
coun_obj_wi_ralsha++;
|
||||||
|
coun_obj_mat += Trans.GetComponent<MeshRenderer>().sharedMaterials.Length;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SubTran = new Transform[coun_obj_wi_ralsha];
|
||||||
|
|
||||||
|
foreach (Transform Trans in attac)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDR ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DDL ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFTL)
|
||||||
|
{
|
||||||
|
SubTran[x] = Trans;
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Trans.GetComponent<MeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDR ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DDL ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFTL)
|
||||||
|
{
|
||||||
|
SubTran[x] = Trans;
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Mat = new Material[coun_obj_mat];
|
||||||
|
|
||||||
|
|
||||||
|
foreach (Transform Trans in SubTran)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDR ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DDL ||
|
||||||
|
Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFTL)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterials.Length; i++)
|
||||||
|
{
|
||||||
|
Mat[coun_obj_mat_arr] = Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterials[i];
|
||||||
|
coun_obj_mat_arr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Trans.GetComponent<MeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_TDR ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DDL ||
|
||||||
|
Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_BiRP_DFTL)
|
||||||
|
{
|
||||||
|
|
||||||
|
for (int i = 0; i < Trans.GetComponent<MeshRenderer>().sharedMaterials.Length; i++)
|
||||||
|
{
|
||||||
|
Mat[coun_obj_mat_arr] = Trans.GetComponent<MeshRenderer>().sharedMaterials[i];
|
||||||
|
coun_obj_mat_arr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Material Mat in Mat)
|
||||||
|
{
|
||||||
|
if (Mat != null)
|
||||||
|
{
|
||||||
|
Set_Shad_Prop(Mat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
void Set_Shad_Prop(Material Mat)
|
||||||
|
{
|
||||||
|
if (Mat.IsKeywordEnabled("N_F_PA_ON") == true)
|
||||||
|
{
|
||||||
|
Mat.SetFloat("_PresAdju", Perspective);
|
||||||
|
Mat.SetFloat("_ClipAdju", Clip);
|
||||||
|
Mat.SetFloat("_PASize", CloseUpSize);
|
||||||
|
Mat.SetFloat("_PASmooTrans", CloseUpSizeSmoothTransition);
|
||||||
|
Mat.SetFloat("_PADist", CloseUpSizeDistance);
|
||||||
|
}
|
||||||
|
else if (Mat.IsKeywordEnabled("N_F_PA_ON") != true)
|
||||||
|
{
|
||||||
|
Mat.EnableKeyword("N_F_PA_ON");
|
||||||
|
Mat.SetInt("_N_F_PA", 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Res_Shad_Prop()
|
||||||
|
{
|
||||||
|
Perspective = 1.0f;
|
||||||
|
Clip = 0.0f;
|
||||||
|
CloseUpSize = 0.0f;
|
||||||
|
CloseUpSizeSmoothTransition = 1.0f;
|
||||||
|
CloseUpSizeDistance = 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1d88305a8ddd7fd4e96cb2d8311ee035
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,142 @@
|
||||||
|
//RealToon - ShadowT SDF Mode [Helper]
|
||||||
|
//MJQStudioWorks
|
||||||
|
//©2025
|
||||||
|
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace RealToon.Script
|
||||||
|
{
|
||||||
|
[ExecuteAlways]
|
||||||
|
[AddComponentMenu("RealToon/Tools/ShadowT SDF Mode - Helper")]
|
||||||
|
public class ShadowTSDFModeHelper : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Header("Note: ShadowT feature and SDF Mode will be automatically enable\nWhen you put a material that uses RealToon Shader on the Material slot.")]
|
||||||
|
|
||||||
|
[Space(25)]
|
||||||
|
|
||||||
|
[Space(10)]
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("A material that uses 'RealToon - ShadowT' feature and enabled 'SDF Mode'.")]
|
||||||
|
public Material Material = null;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("An object to follow the position.")]
|
||||||
|
public Transform ObjectToFollow = null;
|
||||||
|
|
||||||
|
[Space(10)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("The amount of light.")]
|
||||||
|
float LightThreshold = 200.0f;
|
||||||
|
|
||||||
|
[Space(10)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Invert the Foward/Front position of the object.")]
|
||||||
|
bool ForwardInverted = false;
|
||||||
|
|
||||||
|
[Tooltip("Invert the Right position of the object.")]
|
||||||
|
[SerializeField]
|
||||||
|
bool RightInverted = false;
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
[SerializeField]
|
||||||
|
bool checkstart = true;
|
||||||
|
|
||||||
|
string RT_Sha_Nam_URP = "Universal Render Pipeline/RealToon/Version 5/Default/Default";
|
||||||
|
string RT_Sha_Nam_HDRP = "HDRP/RealToon/Version 5/Default";
|
||||||
|
|
||||||
|
string RT_Sha_Nam_BiRP_DD = "RealToon/Version 5/Default/Default";
|
||||||
|
string RT_Sha_Nam_BiRP_DFT = "RealToon/Version 5/Default/Fade Transparency";
|
||||||
|
string RT_Sha_Nam_BiRP_DR = "RealToon/Version 5/Default/Refraction";
|
||||||
|
string RT_Sha_Nam_BiRP_TDD = "RealToon/Version 5/Tessellation/Default";
|
||||||
|
string RT_Sha_Nam_BiRP_TDFT = "RealToon/Version 5/Tessellation/Fade Transparency";
|
||||||
|
string RT_Sha_Nam_BiRP_TDR = "RealToon/Version 5/Tessellation/Refraction";
|
||||||
|
|
||||||
|
void LateUpdate()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (Material == null || ObjectToFollow == null)
|
||||||
|
{ }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Material.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDR)
|
||||||
|
{
|
||||||
|
Material.SetFloat("_ShadowTLightThreshold", LightThreshold);
|
||||||
|
|
||||||
|
if (ForwardInverted != true)
|
||||||
|
{
|
||||||
|
Material.SetVector("_ObjectForward", ObjectToFollow.transform.forward);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Material.SetVector("_ObjectForward", -ObjectToFollow.transform.forward);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RightInverted != true)
|
||||||
|
{
|
||||||
|
Material.SetVector("_ObjectRight", ObjectToFollow.transform.right);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Material.SetVector("_ObjectRight", -ObjectToFollow.transform.right);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnValidate()
|
||||||
|
{
|
||||||
|
if (Material == null)
|
||||||
|
{
|
||||||
|
checkstart = true;
|
||||||
|
}
|
||||||
|
else if (Material != null)
|
||||||
|
{
|
||||||
|
if (Material.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDR)
|
||||||
|
{
|
||||||
|
if (checkstart == true)
|
||||||
|
{
|
||||||
|
if ( (Material.IsKeywordEnabled("N_F_ST_ON") == false && Material.IsKeywordEnabled("N_F_STSDFM_ON") == false) ||
|
||||||
|
(Material.IsKeywordEnabled("N_F_ST_ON") == true && Material.IsKeywordEnabled("N_F_STSDFM_ON") == false) ||
|
||||||
|
(Material.IsKeywordEnabled("N_F_ST_ON") == false && Material.IsKeywordEnabled("N_F_STSDFM_ON") == true) )
|
||||||
|
{
|
||||||
|
Material.EnableKeyword("N_F_ST_ON");
|
||||||
|
Material.SetFloat("_N_F_ST", 1.0f);
|
||||||
|
|
||||||
|
Material.EnableKeyword("N_F_STSDFM_ON");
|
||||||
|
Material.SetFloat("_N_F_STSDFM", 1.0f);
|
||||||
|
checkstart = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset()
|
||||||
|
{
|
||||||
|
Material = null;
|
||||||
|
ObjectToFollow = null;
|
||||||
|
checkstart = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 95fa5deb8c924354ca0134d1af35c289
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,315 @@
|
||||||
|
//RealToon - Smear Effect [Helper]
|
||||||
|
//MJQStudioWorks
|
||||||
|
//©2025
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace RealToon.Script
|
||||||
|
{
|
||||||
|
|
||||||
|
[ExecuteAlways]
|
||||||
|
[AddComponentMenu("RealToon/Tools/Smear Effect - Helper")]
|
||||||
|
|
||||||
|
public class SmearEffectHelper : MonoBehaviour
|
||||||
|
{
|
||||||
|
Queue<Vector3> recentPositions = new Queue<Vector3>();
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
[SerializeField]
|
||||||
|
Transform[] SubTran;
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
[SerializeField]
|
||||||
|
Material[] Mat;
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
[SerializeField]
|
||||||
|
Transform[] attac;
|
||||||
|
|
||||||
|
[Header("Note: Smear Effect feature will be automatically enable\nOn the materials of the object/model that uses RealToon Shader.")]
|
||||||
|
|
||||||
|
[Space(25)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("An object to control the smear effect.")]
|
||||||
|
public Transform SmearController;
|
||||||
|
|
||||||
|
[Space(10)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("How long the distorted line trails stays on the previous position.")]
|
||||||
|
int Delay = 15;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("How large/small the trailing noise.")]
|
||||||
|
float NoiseSize = 100;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("How tall/short the trailing noise.")]
|
||||||
|
float TrailSize = 1.5f;
|
||||||
|
|
||||||
|
[Space(10)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Pause the current smear effect.")]
|
||||||
|
bool PauseSmear = false;
|
||||||
|
|
||||||
|
int coun_obj_wi_ralsha = 0;
|
||||||
|
int coun_obj_mat = 0;
|
||||||
|
int coun_obj_mat_arr = 0;
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
[SerializeField]
|
||||||
|
bool checkstart = true;
|
||||||
|
|
||||||
|
string RT_Sha_Nam_URP = "Universal Render Pipeline/RealToon/Version 5/Default/Default";
|
||||||
|
string RT_Sha_Nam_HDRP = "HDRP/RealToon/Version 5/Default";
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
if (checkstart == true)
|
||||||
|
{
|
||||||
|
InitStart();
|
||||||
|
checkstart = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LateUpdate()
|
||||||
|
{
|
||||||
|
if (SmearController != null)
|
||||||
|
{
|
||||||
|
if (PauseSmear != true)
|
||||||
|
{
|
||||||
|
if (Mat != null)
|
||||||
|
{
|
||||||
|
foreach (Material mate in Mat)
|
||||||
|
{
|
||||||
|
if (mate != null)
|
||||||
|
{
|
||||||
|
mate.SetVector("_ObjPosi", SmearController.position);
|
||||||
|
recentPositions.Enqueue(SmearController.position);
|
||||||
|
|
||||||
|
if (recentPositions.Count > Delay)
|
||||||
|
mate.SetVector("_PrevPosition", recentPositions.Dequeue());
|
||||||
|
|
||||||
|
Set_Shad_Prop(mate);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void Reset()
|
||||||
|
{
|
||||||
|
if (Mat != null)
|
||||||
|
{
|
||||||
|
foreach (Material mate in Mat)
|
||||||
|
{
|
||||||
|
if (mate != null)
|
||||||
|
{
|
||||||
|
mate.SetVector("_ObjPosi", new Vector4(0, 0, 0, 0));
|
||||||
|
mate.SetVector("_PrevPosition", new Vector4(0, 0, 0, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
recentPositions.Dequeue();
|
||||||
|
recentPositions.Clear();
|
||||||
|
checkstart = true;
|
||||||
|
coun_obj_wi_ralsha = 0;
|
||||||
|
coun_obj_mat = 0;
|
||||||
|
coun_obj_mat_arr = 0;
|
||||||
|
Res_Shad_Prop();
|
||||||
|
InitStart();
|
||||||
|
checkstart = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnDisable()
|
||||||
|
{
|
||||||
|
recentPositions.Dequeue();
|
||||||
|
foreach (Material mate in Mat)
|
||||||
|
{
|
||||||
|
if (mate != null)
|
||||||
|
{
|
||||||
|
mate.SetVector("_ObjPosi", new Vector4(0, 0, 0, 0));
|
||||||
|
mate.SetVector("_PrevPosition", new Vector4(0, 0, 0, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove Later
|
||||||
|
void OnDestroy()
|
||||||
|
{
|
||||||
|
recentPositions.Clear();
|
||||||
|
Res_Shad_Prop();
|
||||||
|
foreach (Material Mate in Mat)
|
||||||
|
{
|
||||||
|
if (Mate != null)
|
||||||
|
{
|
||||||
|
if (Mate.shader.name == RT_Sha_Nam_URP || Mate.shader.name == RT_Sha_Nam_HDRP)
|
||||||
|
{
|
||||||
|
Mate.SetVector("_ObjPosi", new Vector4(0, 0, 0, 0));
|
||||||
|
Mate.SetVector("_PrevPosition", new Vector4(0, 0, 0, 0));
|
||||||
|
Mate.SetFloat("_N_F_SE", 0.0f);
|
||||||
|
Mate.DisableKeyword("N_F_SE_ON");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#region Init
|
||||||
|
|
||||||
|
void InitStart()
|
||||||
|
{
|
||||||
|
if (attac == null || attac.Length == 0)
|
||||||
|
{
|
||||||
|
attac = this.gameObject.GetComponentsInChildren<Transform>();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SmearController == null)
|
||||||
|
{
|
||||||
|
SmearController = this.gameObject.transform;
|
||||||
|
}
|
||||||
|
|
||||||
|
int x = 0;
|
||||||
|
foreach (Transform Trans in attac)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP || Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP)
|
||||||
|
{
|
||||||
|
coun_obj_wi_ralsha++;
|
||||||
|
coun_obj_mat += Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterials.Length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Trans.GetComponent<MeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP || Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP)
|
||||||
|
{
|
||||||
|
coun_obj_wi_ralsha++;
|
||||||
|
coun_obj_mat += Trans.GetComponent<MeshRenderer>().sharedMaterials.Length;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SubTran = new Transform[coun_obj_wi_ralsha];
|
||||||
|
|
||||||
|
foreach (Transform Trans in attac)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP || Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP)
|
||||||
|
{
|
||||||
|
SubTran[x] = Trans;
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Trans.GetComponent<MeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP || Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP)
|
||||||
|
{
|
||||||
|
SubTran[x] = Trans;
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Mat = new Material[coun_obj_mat];
|
||||||
|
|
||||||
|
|
||||||
|
foreach (Transform Trans in SubTran)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP || Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterials.Length; i++)
|
||||||
|
{
|
||||||
|
Mat[coun_obj_mat_arr] = Trans.GetComponent<SkinnedMeshRenderer>().sharedMaterials[i];
|
||||||
|
coun_obj_mat_arr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Trans.GetComponent<MeshRenderer>() == true)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial != null)
|
||||||
|
{
|
||||||
|
if (Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_URP || Trans.GetComponent<MeshRenderer>().sharedMaterial.shader.name == RT_Sha_Nam_HDRP)
|
||||||
|
{
|
||||||
|
|
||||||
|
for (int i = 0; i < Trans.GetComponent<MeshRenderer>().sharedMaterials.Length; i++)
|
||||||
|
{
|
||||||
|
Mat[coun_obj_mat_arr] = Trans.GetComponent<MeshRenderer>().sharedMaterials[i];
|
||||||
|
coun_obj_mat_arr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Material Mat in Mat)
|
||||||
|
{
|
||||||
|
if (Mat != null)
|
||||||
|
{
|
||||||
|
Set_Shad_Prop(Mat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
void Set_Shad_Prop(Material Mat)
|
||||||
|
{
|
||||||
|
if (Mat.IsKeywordEnabled("N_F_SE_ON") == true)
|
||||||
|
{
|
||||||
|
Mat.SetFloat("_NoiseSize", NoiseSize);
|
||||||
|
Mat.SetFloat("_TrailSize", TrailSize);
|
||||||
|
}
|
||||||
|
else if (Mat.IsKeywordEnabled("N_F_SE_ON") != true)
|
||||||
|
{
|
||||||
|
Mat.EnableKeyword("N_F_SE_ON");
|
||||||
|
Mat.SetInt("_N_F_SE", 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void Res_Shad_Prop()
|
||||||
|
{
|
||||||
|
NoiseSize = 100;
|
||||||
|
TrailSize = 1.5f;
|
||||||
|
Delay = 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 70edf0dcaad695848aedb4f363c11b43
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,129 @@
|
||||||
|
//RealToon - SmoothObjectNomal [Helper]
|
||||||
|
//MJQStudioWorks
|
||||||
|
//©2025
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace RealToon.Script
|
||||||
|
{
|
||||||
|
[ExecuteAlways]
|
||||||
|
[AddComponentMenu("RealToon/Tools/Smooth Object Normal - Helper")]
|
||||||
|
public class SmoothObjectNormalHelper : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Header("Note: Smooth Object Normal feature will be automatically enable\nWhen you put a material that uses RealToon Shader on the Material slot.")]
|
||||||
|
|
||||||
|
[Space(25)]
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Range(0f, 1f)]
|
||||||
|
[Tooltip("The amount of Smoothed Object Normal.")]
|
||||||
|
public float Intensity = 0;
|
||||||
|
|
||||||
|
[Space(10)]
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("A material that uses 'RealToon - Smooth Object Normal' feature.")]
|
||||||
|
public Material Material = null;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("An object to follow the position.")]
|
||||||
|
public Transform ObjectToFollow = null;
|
||||||
|
|
||||||
|
[Space(10)]
|
||||||
|
[SerializeField]
|
||||||
|
[Tooltip("Show object normal.")]
|
||||||
|
public bool ShowNormal = false;
|
||||||
|
|
||||||
|
[HideInInspector]
|
||||||
|
[SerializeField]
|
||||||
|
bool checkstart = true;
|
||||||
|
|
||||||
|
string RT_Sha_Nam_URP = "Universal Render Pipeline/RealToon/Version 5/Default/Default";
|
||||||
|
string RT_Sha_Nam_HDRP = "HDRP/RealToon/Version 5/Default";
|
||||||
|
|
||||||
|
string RT_Sha_Nam_BiRP_DD = "RealToon/Version 5/Default/Default";
|
||||||
|
string RT_Sha_Nam_BiRP_DFT = "RealToon/Version 5/Default/Fade Transparency";
|
||||||
|
string RT_Sha_Nam_BiRP_DR = "RealToon/Version 5/Default/Refraction";
|
||||||
|
string RT_Sha_Nam_BiRP_TDD = "RealToon/Version 5/Tessellation/Default";
|
||||||
|
string RT_Sha_Nam_BiRP_TDFT = "RealToon/Version 5/Tessellation/Fade Transparency";
|
||||||
|
string RT_Sha_Nam_BiRP_TDR = "RealToon/Version 5/Tessellation/Refraction";
|
||||||
|
|
||||||
|
string RT_Sha_Nam_BiRP_LD = "RealToon/Version 5/Lite/Default";
|
||||||
|
string RT_Sha_Nam_BiRP_LFT = "RealToon/Version 5/Lite/Fade Transparency";
|
||||||
|
|
||||||
|
void LateUpdate()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (Material == null || ObjectToFollow == null)
|
||||||
|
{ }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Material.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDR ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_LD ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_LFT)
|
||||||
|
{
|
||||||
|
Vector3 ObjPos = ObjectToFollow.gameObject.transform.position;
|
||||||
|
Material.SetVector("_XYZPosition", ObjPos);
|
||||||
|
Material.SetFloat("_SmoothObjectNormal", Intensity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnValidate()
|
||||||
|
{
|
||||||
|
if (Material == null)
|
||||||
|
{
|
||||||
|
checkstart = true;
|
||||||
|
}
|
||||||
|
else if (Material != null)
|
||||||
|
{
|
||||||
|
if (Material.shader.name == RT_Sha_Nam_URP ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_HDRP ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DD ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DFT ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_DR ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDD ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDFT ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_TDR ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_LD ||
|
||||||
|
Material.shader.name == RT_Sha_Nam_BiRP_LFT)
|
||||||
|
{
|
||||||
|
if (checkstart == true)
|
||||||
|
{
|
||||||
|
if (Material.IsKeywordEnabled("N_F_SON_ON") == false)
|
||||||
|
{
|
||||||
|
Material.EnableKeyword("N_F_SON_ON");
|
||||||
|
Material.SetFloat("_N_F_SON", 1.0f);
|
||||||
|
checkstart = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(ShowNormal)
|
||||||
|
{
|
||||||
|
case true:
|
||||||
|
Material.SetFloat("_ShowNormal", 1.0f);
|
||||||
|
break;
|
||||||
|
case false:
|
||||||
|
Material.SetFloat("_ShowNormal", 0.0f);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset()
|
||||||
|
{
|
||||||
|
Material = null;
|
||||||
|
ObjectToFollow = null;
|
||||||
|
checkstart = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 81bb1f0a42687e64bbbb9942add38b86
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
What's New to RealToon V5.0.13 (June 2025)
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
[New]
|
||||||
|
- VRC Light Volumes Support (VRChat) (Built-In/BiRP)
|
||||||
|
*VRC Light Volumes packages is needed to be able to use this.
|
||||||
|
|
||||||
|
- Anti - Aliasing Softness (New Companion Option for Anti - Aliasing Affect Cutout) (URP)
|
||||||
|
*This will adjust the Anti - Aliasing Softness/Hardness Cutout.
|
||||||
|
|
||||||
|
- Stencil: Pass (New Option For Outline) (URP)
|
||||||
|
*Use it to resolve 'Mask UI' and other assets like weather and fog overlap issues.
|
||||||
|
*Use 'Keep' for Mask UI while 'Invert' for other assets like weather and fog.
|
||||||
|
|
||||||
|
- Limit Light Intensity (New Option For Lighthing) (Built-In/BiRP, URP & HDRP)
|
||||||
|
*To limit light intensity, minimum and maximum intensity value.
|
||||||
|
|
||||||
|
- RealToon Resources (New Folder Added)
|
||||||
|
*Some resource for you to use on your objects/models that uses RealToon Shader.
|
||||||
|
|
||||||
|
- A new Improved RealToon Welcome Screen
|
||||||
|
*You can just click a button to import the right RealToon Shader package.
|
||||||
|
*Information section about your project including SRP version and Unity Versions,
|
||||||
|
You don't need to go to package manager to see the versions.
|
||||||
|
|
||||||
|
- Map Mode (New Option For Self Lit)
|
||||||
|
*This will allow you to use Emission Maps.
|
||||||
|
|
||||||
|
- Lightmap Support (RealToon Shader - Default Lite) (Built-In/BiRP)
|
||||||
|
- WebGPU support (URP) (Unity 6 to Later)
|
||||||
|
- Nintendo Switch 2 support (URP & HDRP)
|
||||||
|
|
||||||
|
|
||||||
|
[Changes]
|
||||||
|
- Change RealToon Reflection Roughtness shader variable "_ReflectionRoughtness" to "_Smoothness". (URP)
|
||||||
|
*Changed so that other assets affects RealToon's Reflection roughtness value.
|
||||||
|
|
||||||
|
[Fixed]
|
||||||
|
- 'Cutout' does not affect Depth. (URP)
|
||||||
|
- 'Anisotropic Highlights' does not work. (URP) (Deferred and Deferred+) (Unity 6.1)
|
||||||
|
- 'UI Mask' overlap issues, resolve by setting the added new outline option 'Stencil: Pass' to 'Keep'. (URP)
|
||||||
|
- 'Gloss Texture Follow Light' not working properly. (URP)
|
||||||
|
- Raytracing doubled declared punctual light function. (HDRP)
|
||||||
|
|
||||||
|
====================================
|
||||||
|
|
||||||
|
#Read the "Change - Fix Log.txt." file for previous updates.
|
||||||
|
#This update supports Unity 5, 2017, 2018, 2019, 2020, 2022, 2023, Unity 6 and future unity versions.
|
||||||
|
|
||||||
|
[Other Notes]
|
||||||
|
* If you encounter some problems or need help just contact by email.
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c26904c71091b8245b97cc178a3802dc
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"name": "realtoon",
|
||||||
|
"displayName": "RealToon",
|
||||||
|
"version": "5.0.13",
|
||||||
|
"unity": "2018.3",
|
||||||
|
"keywords": [],
|
||||||
|
"category": "Unity"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 499dede7cae51224aa8f215b63a4d149
|
||||||
|
PackageManifestImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Loading…
Reference in New Issue