All character are now moved to 0,0,0 when spawned
Hardcoded material values for 9945400 Added scale/offset to main shader
This commit is contained in:
parent
07e2c4d88c
commit
a3e3cc450a
|
@ -134,7 +134,6 @@ public class FateModelBuilder : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (go.name == "chr")
|
if (go.name == "chr")
|
||||||
{
|
{
|
||||||
go.transform.eulerAngles = Vector3.zero;
|
|
||||||
servant.BodyMain = go;
|
servant.BodyMain = go;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -147,6 +146,12 @@ public class FateModelBuilder : MonoBehaviour
|
||||||
case Material mat:
|
case Material mat:
|
||||||
{
|
{
|
||||||
servant.Materials.Add(mat);
|
servant.Materials.Add(mat);
|
||||||
|
if(mat.name == "9945400")
|
||||||
|
{
|
||||||
|
mat.mainTexture.wrapMode = TextureWrapMode.Repeat;
|
||||||
|
mat.mainTextureOffset = new Vector2(0.2f, 0.78f);
|
||||||
|
mat.mainTextureScale = new Vector2(10000, 10000);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TextAsset text:
|
case TextAsset text:
|
||||||
|
@ -194,7 +199,6 @@ public class FateModelBuilder : MonoBehaviour
|
||||||
mat.SetFloat("_Cutoff", 0.91f);
|
mat.SetFloat("_Cutoff", 0.91f);
|
||||||
UIController.Instance.CutoffSlider?.onValueChanged.AddListener((value) => { temp.SetFloat("_Cutoff", value / 100);});
|
UIController.Instance.CutoffSlider?.onValueChanged.AddListener((value) => { temp.SetFloat("_Cutoff", value / 100);});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(servant.BodyMain == null)
|
if(servant.BodyMain == null)
|
||||||
|
@ -206,6 +210,15 @@ public class FateModelBuilder : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
servant.BodyMain = Instantiate(servant.BodyMain, servant.transform);
|
servant.BodyMain = Instantiate(servant.BodyMain, servant.transform);
|
||||||
|
servant.BodyMain.transform.eulerAngles = Vector3.zero;
|
||||||
|
|
||||||
|
var root = servant.BodyMain.transform.Find("joint_all_Base");
|
||||||
|
if (root != null)
|
||||||
|
{
|
||||||
|
Debug.Log("Not null");
|
||||||
|
root.localPosition = Vector3.zero;
|
||||||
|
}
|
||||||
|
|
||||||
servant.InstantiatedObjects.Add(servant.BodyMain);
|
servant.InstantiatedObjects.Add(servant.BodyMain);
|
||||||
var simpleAnimation = servant.GetComponentInChildren<SimpleAnimation>();
|
var simpleAnimation = servant.GetComponentInChildren<SimpleAnimation>();
|
||||||
simpleAnimation.enabled = false;
|
simpleAnimation.enabled = false;
|
||||||
|
|
|
@ -36,6 +36,7 @@ Shader "FateShader3Compatible" {
|
||||||
};
|
};
|
||||||
|
|
||||||
sampler2D _MainTex;
|
sampler2D _MainTex;
|
||||||
|
float4 _MainTex_ST;
|
||||||
sampler2D _Alpha;
|
sampler2D _Alpha;
|
||||||
fixed4 _Color;
|
fixed4 _Color;
|
||||||
fixed4 _AddColor;
|
fixed4 _AddColor;
|
||||||
|
@ -47,7 +48,7 @@ Shader "FateShader3Compatible" {
|
||||||
v2f o;
|
v2f o;
|
||||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
o.color = v.color;
|
o.color = v.color;
|
||||||
o.uv = v.uv;
|
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,57 +63,7 @@ Shader "FateShader3Compatible" {
|
||||||
}
|
}
|
||||||
ENDCG
|
ENDCG
|
||||||
}
|
}
|
||||||
//Pass //Line 428 Cutoff Transparency (0.5)
|
|
||||||
//{
|
|
||||||
// Tags { "IGNOREPROJECTOR" = "true" "RenderType" = "TransparentCutout" }
|
|
||||||
// Cull Off
|
|
||||||
// ColorMask 0
|
|
||||||
// CGPROGRAM
|
|
||||||
// #pragma vertex vert
|
|
||||||
// #pragma fragment frag
|
|
||||||
// #include "UnityCG.cginc"
|
|
||||||
|
|
||||||
// struct appdata
|
|
||||||
// {
|
|
||||||
// float4 vertex : POSITION0;
|
|
||||||
// float2 uv : TEXCOORD0;
|
|
||||||
// float4 color : COLOR0;
|
|
||||||
// };
|
|
||||||
|
|
||||||
// struct v2f
|
|
||||||
// {
|
|
||||||
// float2 uv : TEXCOORD0;
|
|
||||||
// float4 vertex : POSITION0;
|
|
||||||
// float4 color : COLOR0;
|
|
||||||
// };
|
|
||||||
|
|
||||||
// sampler2D _MainTex;
|
|
||||||
// sampler2D _Alpha;
|
|
||||||
// fixed4 _Color;
|
|
||||||
// fixed4 _AddColor;
|
|
||||||
// float _Cutoff;
|
|
||||||
// float4 u_xlat0;
|
|
||||||
// float4 u_xlat1;
|
|
||||||
|
|
||||||
// v2f vert(appdata v)
|
|
||||||
// {
|
|
||||||
// v2f o;
|
|
||||||
// o.color = fixed4(0,0,0,1);
|
|
||||||
// o.uv = v.uv;
|
|
||||||
// u_xlat0 = mul(unity_ObjectToWorld, v.vertex.xyz);
|
|
||||||
// o.vertex = UnityObjectToClipPos(u_xlat0);
|
|
||||||
// return o;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// fixed4 frag(v2f i) : SV_Target
|
|
||||||
// {
|
|
||||||
// fixed4 col = tex2D(_MainTex, i.uv);
|
|
||||||
// col = _Color * col + _AddColor;
|
|
||||||
// clip(col.a - _Cutoff);
|
|
||||||
// return col;
|
|
||||||
// }
|
|
||||||
// ENDCG
|
|
||||||
//}
|
|
||||||
Pass //ADD COLORS
|
Pass //ADD COLORS
|
||||||
{
|
{
|
||||||
Cull Off // make double sided
|
Cull Off // make double sided
|
||||||
|
@ -137,6 +88,7 @@ Shader "FateShader3Compatible" {
|
||||||
};
|
};
|
||||||
|
|
||||||
sampler2D _MainTex;
|
sampler2D _MainTex;
|
||||||
|
float4 _MainTex_ST;
|
||||||
sampler2D _Alpha;
|
sampler2D _Alpha;
|
||||||
fixed4 _ColorTint;
|
fixed4 _ColorTint;
|
||||||
float _Cutoff;
|
float _Cutoff;
|
||||||
|
@ -146,7 +98,7 @@ Shader "FateShader3Compatible" {
|
||||||
{
|
{
|
||||||
v2f o;
|
v2f o;
|
||||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
o.uv = v.uv; // just pass through with no scale/offset
|
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.collab-proxy": "1.17.6",
|
"com.unity.collab-proxy": "2.0.4",
|
||||||
"com.unity.ide.rider": "3.0.16",
|
"com.unity.ide.rider": "3.0.21",
|
||||||
"com.unity.ide.visualstudio": "2.0.16",
|
"com.unity.ide.visualstudio": "2.0.18",
|
||||||
"com.unity.ide.vscode": "1.2.5",
|
"com.unity.ide.vscode": "1.2.5",
|
||||||
"com.unity.test-framework": "1.1.33",
|
"com.unity.test-framework": "1.1.33",
|
||||||
"com.unity.textmeshpro": "3.0.6",
|
"com.unity.textmeshpro": "3.0.6",
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.collab-proxy": {
|
"com.unity.collab-proxy": {
|
||||||
"version": "1.17.6",
|
"version": "2.0.4",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {},
|
||||||
"com.unity.services.core": "1.0.1"
|
|
||||||
},
|
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.ext.nunit": {
|
"com.unity.ext.nunit": {
|
||||||
|
@ -17,7 +15,7 @@
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.ide.rider": {
|
"com.unity.ide.rider": {
|
||||||
"version": "3.0.16",
|
"version": "3.0.21",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -26,7 +24,7 @@
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.ide.visualstudio": {
|
"com.unity.ide.visualstudio": {
|
||||||
"version": "2.0.16",
|
"version": "2.0.18",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -41,15 +39,6 @@
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.services.core": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"depth": 1,
|
|
||||||
"source": "registry",
|
|
||||||
"dependencies": {
|
|
||||||
"com.unity.modules.unitywebrequest": "1.0.0"
|
|
||||||
},
|
|
||||||
"url": "https://packages.unity.com"
|
|
||||||
},
|
|
||||||
"com.unity.test-framework": {
|
"com.unity.test-framework": {
|
||||||
"version": "1.1.33",
|
"version": "1.1.33",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
|
|
|
@ -134,7 +134,7 @@ PlayerSettings:
|
||||||
16:10: 1
|
16:10: 1
|
||||||
16:9: 1
|
16:9: 1
|
||||||
Others: 1
|
Others: 1
|
||||||
bundleVersion: 2.4.3
|
bundleVersion: 2.4.4
|
||||||
preloadedAssets: []
|
preloadedAssets: []
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
wsaTransparentSwapchain: 0
|
wsaTransparentSwapchain: 0
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
m_EditorVersion: 2020.3.42f1
|
m_EditorVersion: 2020.3.48f1
|
||||||
m_EditorVersionWithRevision: 2020.3.42f1 (7ade1201f527)
|
m_EditorVersionWithRevision: 2020.3.48f1 (b805b124c6b7)
|
||||||
|
|
Loading…
Reference in New Issue