Update Game Kit Controller assets
Bulk modifications across the Game Kit Controller package: updated materials and shader, adjusted particle prefabs, and numerous prefab updates for Character Customization, Inventory, Map System, Locked Camera System, Probuilder export objects, Gravity, Health, Mission System and other scene elements. These changes appear to be a large asset rework/reimport or parameter/reference updates to keep prefabs and materials in sync.
This commit is contained in:
Binary file not shown.
@@ -1,91 +1,47 @@
|
||||
Shader "Custom/URP_SurfaceShader_VC"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
Shader "Custom/SurfaceShader_VC" {
|
||||
Properties{
|
||||
_Color("Color", Color) = (1,1,1,1)
|
||||
_MainTex("Albedo (RGB)", 2D) = "white" {}
|
||||
_Normal("Normal Map", 2D) = "bump" {}
|
||||
_Normal("Normap Map", 2D) = "bump" {}
|
||||
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "Queue" = "Transparent" "RenderType" = "Transparent" }
|
||||
SubShader{
|
||||
Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" }
|
||||
LOD 200
|
||||
Blend One OneMinusSrcAlpha
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "FORWARD"
|
||||
Tags { "LightMode" = "UniversalForward" }
|
||||
CGPROGRAM
|
||||
// Physically based Standard lighting model, and enable shadows on all light types
|
||||
#pragma surface surf Standard fullforwardshadows vertex:vert alpha:fade
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile_fog
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
// Use shader model 3.0 target, to get nicer looking lighting
|
||||
#pragma target 3.0
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
float3 normalOS : NORMAL;
|
||||
float4 tangentOS : TANGENT;
|
||||
};
|
||||
sampler2D _MainTex;
|
||||
sampler2D _Normal;
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionHCS : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
float3 normalWS : TEXCOORD1;
|
||||
float3 tangentWS : TEXCOORD2;
|
||||
float3 bitangentWS : TEXCOORD3;
|
||||
float fogFactor : TEXCOORD4;
|
||||
};
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
float4 vertex : SV_POSITION;
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float4 _Color;
|
||||
CBUFFER_END
|
||||
|
||||
TEXTURE2D(_MainTex); SAMPLER(sampler_MainTex);
|
||||
TEXTURE2D(_Normal); SAMPLER(sampler_Normal);
|
||||
|
||||
Varyings vert(Attributes IN)
|
||||
{
|
||||
Varyings OUT;
|
||||
OUT.positionHCS = TransformObjectToHClip(IN.positionOS.xyz);
|
||||
OUT.uv = IN.uv;
|
||||
OUT.color = IN.color;
|
||||
float3 normalWS = TransformObjectToWorldNormal(IN.normalOS);
|
||||
float3 tangentWS = TransformObjectToWorldDir(IN.tangentOS.xyz);
|
||||
float3 bitangentWS = cross(normalWS, tangentWS) * IN.tangentOS.w;
|
||||
OUT.normalWS = normalWS;
|
||||
OUT.tangentWS = tangentWS;
|
||||
OUT.bitangentWS = bitangentWS;
|
||||
OUT.fogFactor = ComputeFogFactor(OUT.positionHCS.z / OUT.positionHCS.w);
|
||||
return OUT;
|
||||
}
|
||||
|
||||
float4 frag(Varyings IN) : SV_Target
|
||||
{
|
||||
float4 albedo = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, IN.uv) * _Color;
|
||||
float3 normalTS = UnpackNormal(SAMPLE_TEXTURE2D(_Normal, sampler_Normal, IN.uv));
|
||||
float3x3 TBN = float3x3(IN.tangentWS, IN.bitangentWS, IN.normalWS);
|
||||
float3 normalWS = normalize(mul(normalTS, TBN));
|
||||
|
||||
float3 viewDirWS = normalize(_WorldSpaceCameraPos - IN.positionHCS.xyz);
|
||||
float3 lightDirWS = normalize(_MainLightPosition.xyz);
|
||||
float3 lightColor = _MainLightColor.rgb;
|
||||
|
||||
float NdotL = saturate(dot(normalWS, lightDirWS));
|
||||
float3 diffuse = albedo.rgb * lightColor * NdotL * IN.color.rgb;
|
||||
|
||||
float alpha = albedo.a * IN.color.a;
|
||||
diffuse = MixFog(diffuse, IN.fogFactor);
|
||||
return float4(diffuse, alpha);
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
void vert(inout appdata_full v, out Input o)
|
||||
{
|
||||
UNITY_INITIALIZE_OUTPUT(Input, o);
|
||||
o.color = v.color;
|
||||
}
|
||||
FallBack "Universal Forward"
|
||||
|
||||
fixed4 _Color;
|
||||
|
||||
void surf(Input IN, inout SurfaceOutputStandard o) {
|
||||
// Albedo comes from a texture tinted by color
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb*IN.color;
|
||||
o.Normal = UnpackNormal(tex2D(_Normal, IN.uv_MainTex));
|
||||
o.Alpha = c.a*IN.color.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}
|
||||
Reference in New Issue
Block a user