add some extra assets FX and SFX
This commit is contained in:
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Camera Effects/Drunk.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Camera Effects/Night Vision.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Camera Effects/Oil Paint.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Camera Effects/Pixel Shader.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Camera Effects/Solid Shader.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Camera Effects/SplitScreenMask.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,8 +10,9 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Camera Effects/Underwater Shader
|
||||
Effect.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Dissolve.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ NativeFormatImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Foot Dust Particles.mat
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Glow Shader.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ NativeFormatImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Laser Beam.mat
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Others/Cloak Shader.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -1,48 +1,57 @@
|
||||
Shader "Custom/See Through Surfaces 1" {
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" "Queue"="Geometry+1"}
|
||||
ColorMask 0
|
||||
ZWrite off
|
||||
Stencil {
|
||||
Ref 1
|
||||
Comp always
|
||||
Pass replace
|
||||
Shader "Custom/URP/SeeThroughSurfaces1"
|
||||
{
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline"="UniversalRenderPipeline"
|
||||
"RenderType"="Opaque"
|
||||
"Queue"="Geometry+1"
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
struct appdata {
|
||||
float4 vertex : POSITION;
|
||||
ColorMask 0
|
||||
ZWrite Off
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref 1
|
||||
Comp Always
|
||||
Pass Replace
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "ForwardLitStencil"
|
||||
Tags { "LightMode" = "UniversalForward" }
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
float3 positionOS : POSITION;
|
||||
};
|
||||
struct v2f {
|
||||
float4 pos : SV_POSITION;
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionHCS : SV_POSITION;
|
||||
};
|
||||
v2f vert(appdata v) {
|
||||
v2f o;
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
return o;
|
||||
|
||||
Varyings vert(Attributes IN)
|
||||
{
|
||||
Varyings OUT;
|
||||
OUT.positionHCS = TransformObjectToHClip(IN.positionOS);
|
||||
return OUT;
|
||||
}
|
||||
half4 frag(v2f i) : SV_Target {
|
||||
|
||||
half4 frag(Varyings IN) : SV_Target
|
||||
{
|
||||
// No dibuja nada, solo stencil
|
||||
return half4(1,1,0,1);
|
||||
}
|
||||
ENDCG
|
||||
|
||||
Pass {
|
||||
Cull Front
|
||||
ZTest Less
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
ENDCG
|
||||
ENDHLSL
|
||||
}
|
||||
Pass {
|
||||
Cull Back
|
||||
ZTest Greater
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Others/See Through Surfaces 1.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -1,55 +1,112 @@
|
||||
// Upgrade NOTE: upgraded instancing buffer 'Props' to new syntax.
|
||||
Shader "Custom/URP/SeeThroughSurfaces2"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_BaseColor ("Color", Color) = (1,1,1,1)
|
||||
_BaseMap ("Albedo", 2D) = "white" {}
|
||||
|
||||
Shader "Custom/See Through Surfaces 2" {
|
||||
Properties {
|
||||
_Color ("Color", Color) = (1,1,1,1)
|
||||
_MainTex ("Albedo (RGB)", 2D) = "white" {}
|
||||
_Glossiness ("Smoothness", Range(0,1)) = 0.5
|
||||
_Metallic ("Metallic", Range(0,1)) = 0.0
|
||||
}
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" "Queue"="Geometry+2"}
|
||||
_Smoothness ("Smoothness", Range(0,1)) = 0.5
|
||||
_Metallic ("Metallic", Range(0,1)) = 0.0
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref 1
|
||||
Comp notequal
|
||||
}
|
||||
|
||||
CGPROGRAM
|
||||
// Physically based Standard lighting model, and enable shadows on all light types
|
||||
#pragma surface surf Standard fullforwardshadows
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline"="UniversalRenderPipeline"
|
||||
"RenderType"="Opaque"
|
||||
"Queue"="Geometry+2"
|
||||
}
|
||||
|
||||
// Use shader model 3.0 target, to get nicer looking lighting
|
||||
#pragma target 3.0
|
||||
Stencil
|
||||
{
|
||||
Ref 1
|
||||
Comp NotEqual
|
||||
}
|
||||
|
||||
sampler2D _MainTex;
|
||||
Pass
|
||||
{
|
||||
Name "ForwardLit"
|
||||
Tags { "LightMode"="UniversalForward" }
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
HLSLPROGRAM
|
||||
|
||||
half _Glossiness;
|
||||
half _Metallic;
|
||||
fixed4 _Color;
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
// Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader.
|
||||
// See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing.
|
||||
// #pragma instancing_options assumeuniformscaling
|
||||
UNITY_INSTANCING_BUFFER_START(Props)
|
||||
// put more per-instance properties here
|
||||
UNITY_INSTANCING_BUFFER_END(Props)
|
||||
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS
|
||||
#pragma multi_compile _ _ADDITIONAL_LIGHTS
|
||||
|
||||
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;
|
||||
// Metallic and smoothness come from slider variables
|
||||
o.Metallic = _Metallic;
|
||||
o.Smoothness = _Glossiness;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normalOS : NORMAL;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionHCS : SV_POSITION;
|
||||
float3 positionWS : TEXCOORD0;
|
||||
float3 normalWS : TEXCOORD1;
|
||||
float2 uv : TEXCOORD2;
|
||||
};
|
||||
|
||||
TEXTURE2D(_BaseMap);
|
||||
SAMPLER(sampler_BaseMap);
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float4 _BaseColor;
|
||||
float _Metallic;
|
||||
float _Smoothness;
|
||||
CBUFFER_END
|
||||
|
||||
Varyings vert (Attributes IN)
|
||||
{
|
||||
Varyings OUT;
|
||||
|
||||
OUT.positionWS = TransformObjectToWorld(IN.positionOS.xyz);
|
||||
OUT.positionHCS = TransformWorldToHClip(OUT.positionWS);
|
||||
|
||||
OUT.normalWS = TransformObjectToWorldNormal(IN.normalOS);
|
||||
OUT.uv = IN.uv;
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
half4 frag (Varyings IN) : SV_Target
|
||||
{
|
||||
float4 tex = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, IN.uv);
|
||||
|
||||
float3 albedo = tex.rgb * _BaseColor.rgb;
|
||||
float alpha = tex.a * _BaseColor.a;
|
||||
|
||||
float3 normal = normalize(IN.normalWS);
|
||||
|
||||
SurfaceData surfaceData = (SurfaceData)0;
|
||||
surfaceData.albedo = albedo;
|
||||
surfaceData.alpha = alpha;
|
||||
surfaceData.metallic = _Metallic;
|
||||
surfaceData.smoothness = _Smoothness;
|
||||
surfaceData.normalTS = float3(0,0,1);
|
||||
surfaceData.occlusion = 1;
|
||||
surfaceData.emission = 0;
|
||||
surfaceData.specular = 0;
|
||||
|
||||
InputData inputData = (InputData)0;
|
||||
inputData.positionWS = IN.positionWS;
|
||||
inputData.normalWS = normal;
|
||||
inputData.viewDirectionWS = GetWorldSpaceViewDir(IN.positionWS);
|
||||
inputData.shadowCoord = TransformWorldToShadowCoord(IN.positionWS);
|
||||
inputData.bakedGI = SampleSH(normal);
|
||||
|
||||
return UniversalFragmentPBR(inputData, surfaceData);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Others/See Through Surfaces 2.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -1,70 +1,135 @@
|
||||
Shader "Custom/Transparent Diffuse (Improved)" {
|
||||
Properties {
|
||||
_Color("Main Color", Color) = (1, 1, 1, 1)
|
||||
_MainTex("Base (RGB) Trans (A)", 2D) = "white" { }
|
||||
_Glossiness ("Smoothness", Range(0,1)) = 0.5
|
||||
_Metallic ("Metallic", Range(0,1)) = 0.0
|
||||
Shader "Custom/URP/TransparentDiffuseImproved"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_BaseMap("Base Map", 2D) = "white" {}
|
||||
_BaseColor("Color", Color) = (1,1,1,1)
|
||||
|
||||
_BumpMap ("Normalmap", 2D) = "bump" {}
|
||||
}
|
||||
_Metallic("Metallic", Range(0,1)) = 0
|
||||
_Smoothness("Smoothness", Range(0,1)) = 0.5
|
||||
|
||||
SubShader {
|
||||
Tags { "Queue"="Transparent" "IgnoreProjector"="False" "RenderType"="Transparent" }
|
||||
_BumpMap("Normal Map", 2D) = "bump" {}
|
||||
}
|
||||
|
||||
// First Pass: Only render alpha (A) channel
|
||||
Pass {
|
||||
ColorMask A
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline"="UniversalRenderPipeline"
|
||||
"Queue"="Transparent"
|
||||
"RenderType"="Transparent"
|
||||
}
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
Pass
|
||||
{
|
||||
Name "ForwardLit"
|
||||
Tags { "LightMode"="UniversalForward" }
|
||||
|
||||
fixed4 _Color;
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ZWrite Off
|
||||
Cull Back
|
||||
|
||||
float4 vert(float4 vertex:POSITION) : SV_POSITION {
|
||||
return UnityObjectToClipPos(vertex);
|
||||
}
|
||||
HLSLPROGRAM
|
||||
|
||||
fixed4 frag() : SV_Target {
|
||||
return _Color;
|
||||
}
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
ENDCG
|
||||
}
|
||||
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS
|
||||
#pragma multi_compile _ _ADDITIONAL_LIGHTS
|
||||
|
||||
// Second Pass: Now render color (RGB) channel
|
||||
ColorMask RGB
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Standard alpha
|
||||
struct Attributes
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normalOS : NORMAL;
|
||||
float4 tangentOS : TANGENT;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionHCS : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float3 normalWS : TEXCOORD1;
|
||||
float3 tangentWS : TEXCOORD2;
|
||||
float3 bitangentWS : TEXCOORD3;
|
||||
float3 positionWS : TEXCOORD4;
|
||||
};
|
||||
|
||||
sampler2D _BumpMap;
|
||||
TEXTURE2D(_BaseMap);
|
||||
SAMPLER(sampler_BaseMap);
|
||||
|
||||
half _Glossiness;
|
||||
half _Metallic;
|
||||
TEXTURE2D(_BumpMap);
|
||||
SAMPLER(sampler_BumpMap);
|
||||
|
||||
struct Input {
|
||||
float4 color:COLOR;
|
||||
float2 uv_MainTex;
|
||||
float2 uv_BumpMap;
|
||||
};
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float4 _BaseColor;
|
||||
float _Metallic;
|
||||
float _Smoothness;
|
||||
CBUFFER_END
|
||||
|
||||
void surf(Input IN, inout SurfaceOutputStandard o) {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
o.Alpha = c.a;
|
||||
o.Metallic = _Metallic;
|
||||
o.Smoothness = _Glossiness;
|
||||
Varyings vert (Attributes IN)
|
||||
{
|
||||
Varyings OUT;
|
||||
|
||||
o.Normal = UnpackNormal (tex2D (_BumpMap, IN.uv_BumpMap));
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
OUT.positionWS = TransformObjectToWorld(IN.positionOS.xyz);
|
||||
OUT.positionHCS = TransformWorldToHClip(OUT.positionWS);
|
||||
OUT.uv = IN.uv;
|
||||
|
||||
Fallback "Legacy Shaders/Transparent/Diffuse"
|
||||
}
|
||||
OUT.normalWS = TransformObjectToWorldNormal(IN.normalOS);
|
||||
OUT.tangentWS = TransformObjectToWorldDir(IN.tangentOS.xyz);
|
||||
OUT.bitangentWS = cross(OUT.normalWS, OUT.tangentWS) * IN.tangentOS.w;
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
half4 frag (Varyings IN) : SV_Target
|
||||
{
|
||||
float4 baseMap = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, IN.uv);
|
||||
float3 albedo = baseMap.rgb * _BaseColor.rgb;
|
||||
float alpha = baseMap.a * _BaseColor.a;
|
||||
|
||||
float3 normalTS = UnpackNormal(SAMPLE_TEXTURE2D(_BumpMap, sampler_BumpMap, IN.uv));
|
||||
|
||||
float3x3 TBN = float3x3(
|
||||
normalize(IN.tangentWS),
|
||||
normalize(IN.bitangentWS),
|
||||
normalize(IN.normalWS)
|
||||
);
|
||||
|
||||
float3 normalWS = normalize(mul(normalTS, TBN));
|
||||
|
||||
InputData lightingInput;
|
||||
lightingInput.positionWS = IN.positionWS;
|
||||
lightingInput.normalWS = normalWS;
|
||||
lightingInput.viewDirectionWS = normalize(GetWorldSpaceViewDir(IN.positionWS));
|
||||
lightingInput.shadowCoord = TransformWorldToShadowCoord(IN.positionWS);
|
||||
lightingInput.fogCoord = 0;
|
||||
lightingInput.vertexLighting = float3(0,0,0);
|
||||
lightingInput.bakedGI = SampleSH(normalWS);
|
||||
|
||||
SurfaceData surfaceData = (SurfaceData)0;
|
||||
surfaceData.albedo = albedo;
|
||||
surfaceData.alpha = alpha;
|
||||
surfaceData.metallic = _Metallic;
|
||||
surfaceData.specular = 0;
|
||||
surfaceData.smoothness = _Smoothness;
|
||||
surfaceData.normalTS = normalTS;
|
||||
surfaceData.occlusion = 1;
|
||||
surfaceData.emission = 0;
|
||||
|
||||
surfaceData.clearCoatMask = 0;
|
||||
surfaceData.clearCoatSmoothness = 0;
|
||||
|
||||
half4 color = UniversalFragmentPBR(lightingInput, surfaceData);
|
||||
|
||||
color.a = alpha;
|
||||
return color;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Others/Transparent Diffuse (Improved).shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -1,80 +1,162 @@
|
||||
Shader "Custom/Transparent Diffuse Stipple" {
|
||||
Properties {
|
||||
_MainTex("Base (RGB)", 2D) = "white" { }
|
||||
_Color("Main Color", Color) = (1, 1, 1, 1)
|
||||
_Glossiness ("Smoothness", Range(0,1)) = 0.5
|
||||
_Metallic ("Metallic", Range(0,1)) = 0.0
|
||||
Shader "Custom/URP/TransparentDiffuseStipple"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_BaseMap("Base Map", 2D) = "white" {}
|
||||
_BaseColor("Main Color", Color) = (1,1,1,1)
|
||||
|
||||
_BumpMap ("Normalmap", 2D) = "bump" {}
|
||||
_Metallic("Metallic", Range(0,1)) = 0
|
||||
_Smoothness("Smoothness", Range(0,1)) = 0.5
|
||||
|
||||
_TransparentAmount("Transparent Amount", Float) = 1
|
||||
_StippleSize("Stipple Size", Float) = 1
|
||||
}
|
||||
_BumpMap("Normal Map", 2D) = "bump" {}
|
||||
|
||||
SubShader {
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 200
|
||||
Cull Off
|
||||
_TransparentAmount("Transparent Amount", Range(0,1)) = 1
|
||||
_StippleSize("Stipple Size", Float) = 1
|
||||
}
|
||||
|
||||
CGPROGRAM
|
||||
#pragma surface surf Standard fullforwardshadows
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline"="UniversalRenderPipeline"
|
||||
"RenderType"="Opaque"
|
||||
"Queue"="AlphaTest"
|
||||
}
|
||||
|
||||
#pragma target 3.0
|
||||
Cull Off
|
||||
|
||||
float _TransparentAmount;
|
||||
Pass
|
||||
{
|
||||
Name "ForwardLit"
|
||||
Tags { "LightMode"="UniversalForward" }
|
||||
|
||||
sampler2D _MainTex;
|
||||
HLSLPROGRAM
|
||||
|
||||
fixed4 _Color;
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS
|
||||
#pragma multi_compile _ _ADDITIONAL_LIGHTS
|
||||
|
||||
sampler2D _BumpMap;
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
|
||||
float _StippleSize;
|
||||
struct Attributes
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normalOS : NORMAL;
|
||||
float4 tangentOS : TANGENT;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
half _Glossiness;
|
||||
half _Metallic;
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionHCS : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float3 positionWS : TEXCOORD1;
|
||||
float3 normalWS : TEXCOORD2;
|
||||
float3 tangentWS : TEXCOORD3;
|
||||
float3 bitangentWS : TEXCOORD4;
|
||||
float4 screenPos : TEXCOORD5;
|
||||
};
|
||||
|
||||
static const float4x4 kThresholdMatrix = {
|
||||
1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0,
|
||||
13.0 / 17.0, 5.0 / 17.0, 15.0 / 17.0, 7.0 / 17.0,
|
||||
4.0 / 17.0, 12.0 / 17.0, 2.0 / 17.0, 10.0 / 17.0,
|
||||
16.0 / 17.0, 8.0 / 17.0, 14.0 / 17.0, 6.0 / 17.0
|
||||
};
|
||||
TEXTURE2D(_BaseMap);
|
||||
SAMPLER(sampler_BaseMap);
|
||||
|
||||
static const float4x4 kKernelMatrix = {
|
||||
1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1
|
||||
};
|
||||
TEXTURE2D(_BumpMap);
|
||||
SAMPLER(sampler_BumpMap);
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
float4 screenPos;
|
||||
float3 worldPos;
|
||||
float2 uv_BumpMap;
|
||||
};
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float4 _BaseColor;
|
||||
float _Metallic;
|
||||
float _Smoothness;
|
||||
float _TransparentAmount;
|
||||
float _StippleSize;
|
||||
CBUFFER_END
|
||||
|
||||
void surf (Input IN, inout SurfaceOutputStandard o) {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex)* _Color;
|
||||
o.Albedo = c.rgb;
|
||||
o.Alpha = c.a;
|
||||
o.Metallic = _Metallic;
|
||||
o.Smoothness = _Glossiness;
|
||||
static const float4x4 kThresholdMatrix = {
|
||||
1.0/17.0, 9.0/17.0, 3.0/17.0, 11.0/17.0,
|
||||
13.0/17.0, 5.0/17.0, 15.0/17.0, 7.0/17.0,
|
||||
4.0/17.0, 12.0/17.0, 2.0/17.0, 10.0/17.0,
|
||||
16.0/17.0, 8.0/17.0, 14.0/17.0, 6.0/17.0
|
||||
};
|
||||
|
||||
o.Normal = UnpackNormal (tex2D (_BumpMap, IN.uv_BumpMap));
|
||||
Varyings vert(Attributes IN)
|
||||
{
|
||||
Varyings OUT;
|
||||
|
||||
// Unproject the screen pixel coordiante
|
||||
float2 pos = IN.screenPos.xy / IN.screenPos.w;
|
||||
pos *= _ScreenParams.xy * _StippleSize;
|
||||
OUT.positionWS = TransformObjectToWorld(IN.positionOS.xyz);
|
||||
OUT.positionHCS = TransformWorldToHClip(OUT.positionWS);
|
||||
OUT.uv = IN.uv;
|
||||
|
||||
// Clip pixel within [start, end] distance from camera
|
||||
float interpDist = _TransparentAmount;
|
||||
OUT.normalWS = TransformObjectToWorldNormal(IN.normalOS);
|
||||
OUT.tangentWS = TransformObjectToWorldDir(IN.tangentOS.xyz);
|
||||
OUT.bitangentWS = cross(OUT.normalWS, OUT.tangentWS) * IN.tangentOS.w;
|
||||
|
||||
clip(interpDist - kThresholdMatrix[fmod(pos.x, 4)] * kKernelMatrix[fmod(pos.y, 4)]);
|
||||
}
|
||||
OUT.screenPos = ComputeScreenPos(OUT.positionHCS);
|
||||
|
||||
ENDCG
|
||||
}
|
||||
FallBack "Diffuse"
|
||||
}
|
||||
return OUT;
|
||||
}
|
||||
|
||||
half4 frag(Varyings IN) : SV_Target
|
||||
{
|
||||
float4 baseMap = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, IN.uv);
|
||||
float3 albedo = baseMap.rgb * _BaseColor.rgb;
|
||||
float alpha = baseMap.a * _BaseColor.a;
|
||||
|
||||
float3 normalTS = UnpackNormal(
|
||||
SAMPLE_TEXTURE2D(_BumpMap, sampler_BumpMap, IN.uv)
|
||||
);
|
||||
|
||||
float3x3 TBN = float3x3(
|
||||
normalize(IN.tangentWS),
|
||||
normalize(IN.bitangentWS),
|
||||
normalize(IN.normalWS)
|
||||
);
|
||||
|
||||
float3 normalWS = normalize(mul(normalTS, TBN));
|
||||
|
||||
// --- STIPPLE ---
|
||||
float2 pos = IN.screenPos.xy / IN.screenPos.w;
|
||||
pos *= _ScreenParams.xy * _StippleSize;
|
||||
|
||||
int x = (int)fmod(pos.x, 4);
|
||||
int y = (int)fmod(pos.y, 4);
|
||||
|
||||
float threshold = kThresholdMatrix[y][x];
|
||||
|
||||
clip(_TransparentAmount - threshold);
|
||||
// --- END STIPPLE ---
|
||||
|
||||
InputData lightingInput;
|
||||
lightingInput.positionWS = IN.positionWS;
|
||||
lightingInput.normalWS = normalWS;
|
||||
lightingInput.viewDirectionWS =
|
||||
normalize(GetWorldSpaceViewDir(IN.positionWS));
|
||||
lightingInput.shadowCoord =
|
||||
TransformWorldToShadowCoord(IN.positionWS);
|
||||
lightingInput.bakedGI = SampleSH(normalWS);
|
||||
lightingInput.fogCoord = 0;
|
||||
lightingInput.vertexLighting = 0;
|
||||
|
||||
SurfaceData surfaceData = (SurfaceData)0;
|
||||
|
||||
surfaceData.albedo = albedo;
|
||||
surfaceData.alpha = alpha;
|
||||
surfaceData.metallic = _Metallic;
|
||||
surfaceData.specular = 0;
|
||||
surfaceData.smoothness = _Smoothness;
|
||||
surfaceData.normalTS = normalTS;
|
||||
surfaceData.occlusion = 1;
|
||||
surfaceData.emission = 0;
|
||||
|
||||
|
||||
surfaceData.clearCoatMask = 0;
|
||||
surfaceData.clearCoatSmoothness = 0;
|
||||
|
||||
return UniversalFragmentPBR(lightingInput, surfaceData);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Others/Transparent Diffuse Stipple.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -1,109 +1,147 @@
|
||||
Shader "Outlined/Diffuse" {
|
||||
Properties {
|
||||
_Color ("Main Color", Color) = (.5,.5,.5,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_Outline ("Outline width", Range (0, 1)) = .1
|
||||
_MainTex ("Base (RGB)", 2D) = "white" { }
|
||||
}
|
||||
|
||||
CGINCLUDE
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata {
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
float4 pos : POSITION;
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
uniform float _Outline;
|
||||
uniform float4 _OutlineColor;
|
||||
|
||||
v2f vert(appdata v) {
|
||||
// just make a copy of incoming vertex data but scaled according to normal direction
|
||||
v2f o;
|
||||
Shader "Outlined/URP/Diffuse"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_BaseColor ("Main Color", Color) = (.5,.5,.5,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_Outline ("Outline Width", Range(0,1)) = 0.1
|
||||
_BaseMap ("Base Map", 2D) = "white" {}
|
||||
}
|
||||
|
||||
v.vertex *= ( 1 + _Outline);
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"RenderPipeline"="UniversalRenderPipeline"
|
||||
"RenderType"="Opaque"
|
||||
"Queue"="Geometry"
|
||||
}
|
||||
|
||||
o.pos = UnityObjectToClipPos(v.vertex);
|
||||
|
||||
//float3 norm = normalize(mul ((float3x3)UNITY_MATRIX_IT_MV, v.normal));
|
||||
//float2 offset = TransformViewToProjection(norm.xy);
|
||||
// ----------------------
|
||||
// OUTLINE PASS
|
||||
// ----------------------
|
||||
|
||||
o.color = _OutlineColor;
|
||||
return o;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
SubShader {
|
||||
//Tags {"Queue" = "Geometry+100" }
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
// note that a vertex shader is specified here but its using the one above
|
||||
Pass {
|
||||
Name "OUTLINE"
|
||||
Tags { "LightMode" = "Always" }
|
||||
Cull Front
|
||||
ZWrite On
|
||||
ColorMask RGB
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
//Offset 50,50
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
half4 frag(v2f i) :COLOR { return i.color; }
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
SubShader {
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
};
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||
o.Albedo = c.rgb;
|
||||
o.Alpha = c.a;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
Pass {
|
||||
Name "OUTLINE"
|
||||
Tags { "LightMode" = "Always" }
|
||||
Cull Front
|
||||
ZWrite On
|
||||
ColorMask RGB
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
|
||||
SetTexture [_MainTex] { combine primary }
|
||||
}
|
||||
}
|
||||
|
||||
Fallback "Diffuse"
|
||||
Pass
|
||||
{
|
||||
Name "Outline"
|
||||
Cull Front
|
||||
ZWrite On
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normalOS : NORMAL;
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionHCS : SV_POSITION;
|
||||
};
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float _Outline;
|
||||
float4 _OutlineColor;
|
||||
CBUFFER_END
|
||||
|
||||
Varyings vert (Attributes IN)
|
||||
{
|
||||
Varyings OUT;
|
||||
|
||||
float3 pos = IN.positionOS.xyz * (1 + _Outline);
|
||||
|
||||
float3 positionWS = TransformObjectToWorld(pos);
|
||||
OUT.positionHCS = TransformWorldToHClip(positionWS);
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
half4 frag (Varyings IN) : SV_Target
|
||||
{
|
||||
return _OutlineColor;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
// ----------------------
|
||||
// MAIN LIT PASS
|
||||
// ----------------------
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "ForwardLit"
|
||||
Tags { "LightMode"="UniversalForward" }
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS
|
||||
#pragma multi_compile _ _ADDITIONAL_LIGHTS
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
float4 positionOS : POSITION;
|
||||
float3 normalOS : NORMAL;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionHCS : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float3 normalWS : TEXCOORD1;
|
||||
float3 positionWS : TEXCOORD2;
|
||||
};
|
||||
|
||||
TEXTURE2D(_BaseMap);
|
||||
SAMPLER(sampler_BaseMap);
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float4 _BaseColor;
|
||||
CBUFFER_END
|
||||
|
||||
Varyings vert (Attributes IN)
|
||||
{
|
||||
Varyings OUT;
|
||||
|
||||
OUT.positionWS = TransformObjectToWorld(IN.positionOS.xyz);
|
||||
OUT.positionHCS = TransformWorldToHClip(OUT.positionWS);
|
||||
|
||||
OUT.uv = IN.uv;
|
||||
OUT.normalWS = TransformObjectToWorldNormal(IN.normalOS);
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
half4 frag (Varyings IN) : SV_Target
|
||||
{
|
||||
float4 tex = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, IN.uv);
|
||||
float3 albedo = tex.rgb * _BaseColor.rgb;
|
||||
|
||||
float3 normal = normalize(IN.normalWS);
|
||||
|
||||
Light mainLight = GetMainLight();
|
||||
|
||||
float NdotL = saturate(dot(normal, mainLight.direction));
|
||||
|
||||
float3 color = albedo * mainLight.color * NdotL;
|
||||
|
||||
return float4(color, tex.a);
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Outlined.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ NativeFormatImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Projectile Smoke.mat
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Projector.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Silhouette Only.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -1,164 +1,107 @@
|
||||
Shader "Custom/Simple Blur Shader" {
|
||||
Properties {
|
||||
_Size ("Blur", Range(0, 30)) = 1
|
||||
[HideInInspector] _MainTex ("Texture (RGB)", 2D) = "white" {}
|
||||
// _TintColor ("Tint Color", Color) = (1,1,1,1)
|
||||
Shader "Custom/URP/SimpleBlur"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_Size ("Blur", Range(0,30)) = 1
|
||||
_MainTex ("Mask", 2D) = "white" {}
|
||||
}
|
||||
Category {
|
||||
// We must be transparent, so other objects are drawn before this one.
|
||||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Opaque" }
|
||||
SubShader
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
ZWrite Off
|
||||
// Horizontal blur
|
||||
GrabPass
|
||||
"Queue"="Transparent-100"
|
||||
"RenderType"="Transparent"
|
||||
"RenderPipeline"="UniversalRenderPipeline"
|
||||
}
|
||||
|
||||
ZWrite Off
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Blur"
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
|
||||
struct Attributes
|
||||
{
|
||||
"_HBlur"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t {
|
||||
float4 vertex : POSITION;
|
||||
float2 texcoord: TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
float4 vertex : POSITION;
|
||||
float4 uvgrab : TEXCOORD0;
|
||||
float2 uvmain : TEXCOORD1;
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
float scale = -1.0;
|
||||
#else
|
||||
float scale = 1.0;
|
||||
#endif
|
||||
|
||||
o.uvgrab.xy = (float2(o.vertex.x, o.vertex.y * scale) + o.vertex.w) * 0.5;
|
||||
o.uvgrab.zw = o.vertex.zw;
|
||||
|
||||
o.uvmain = TRANSFORM_TEX(v.texcoord, _MainTex);
|
||||
o.color = v.color;
|
||||
return o;
|
||||
}
|
||||
|
||||
sampler2D _HBlur;
|
||||
float4 _HBlur_TexelSize;
|
||||
float _Size;
|
||||
|
||||
half4 frag( v2f i ) : COLOR
|
||||
{
|
||||
float alpha = tex2D(_MainTex, i.uvmain).a * i.color.a;
|
||||
half4 sum = half4(0,0,0,0);
|
||||
|
||||
#define GRABPIXEL(weight,kernelx) tex2Dproj( _HBlur, UNITY_PROJ_COORD(float4(i.uvgrab.x + _HBlur_TexelSize.x * kernelx * _Size * alpha, i.uvgrab.y, i.uvgrab.z, i.uvgrab.w))) * weight
|
||||
|
||||
sum += GRABPIXEL(0.05, -4.0);
|
||||
sum += GRABPIXEL(0.09, -3.0);
|
||||
sum += GRABPIXEL(0.12, -2.0);
|
||||
sum += GRABPIXEL(0.15, -1.0);
|
||||
sum += GRABPIXEL(0.18, 0.0);
|
||||
sum += GRABPIXEL(0.15, +1.0);
|
||||
sum += GRABPIXEL(0.12, +2.0);
|
||||
sum += GRABPIXEL(0.09, +3.0);
|
||||
sum += GRABPIXEL(0.05, +4.0);
|
||||
|
||||
return sum ;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
||||
// Vertical blur
|
||||
GrabPass
|
||||
float4 positionOS : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
"_VBlur"
|
||||
float4 positionHCS : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 screenPos : TEXCOORD1;
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
TEXTURE2D(_MainTex);
|
||||
SAMPLER(sampler_MainTex);
|
||||
|
||||
TEXTURE2D(_CameraOpaqueTexture);
|
||||
SAMPLER(sampler_CameraOpaqueTexture);
|
||||
|
||||
float4 _CameraOpaqueTexture_TexelSize;
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float _Size;
|
||||
CBUFFER_END
|
||||
|
||||
Varyings vert (Attributes IN)
|
||||
{
|
||||
Varyings OUT;
|
||||
|
||||
OUT.positionHCS = TransformObjectToHClip(IN.positionOS.xyz);
|
||||
OUT.uv = IN.uv;
|
||||
OUT.screenPos = ComputeScreenPos(OUT.positionHCS);
|
||||
OUT.color = IN.color;
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma fragmentoption ARB_precision_hint_fastest
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata_t {
|
||||
float4 vertex : POSITION;
|
||||
float2 texcoord: TEXCOORD0;
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
float4 vertex : POSITION;
|
||||
float4 uvgrab : TEXCOORD0;
|
||||
float2 uvmain : TEXCOORD1;
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
v2f vert (appdata_t v) {
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
|
||||
#if UNITY_UV_STARTS_AT_TOP
|
||||
float scale = -1.0;
|
||||
#else
|
||||
float scale = 1.0;
|
||||
#endif
|
||||
|
||||
o.uvgrab.xy = (float2(o.vertex.x, o.vertex.y * scale) + o.vertex.w) * 0.5;
|
||||
o.uvgrab.zw = o.vertex.zw;
|
||||
|
||||
o.uvmain = TRANSFORM_TEX(v.texcoord, _MainTex);
|
||||
o.color = v.color;
|
||||
return o;
|
||||
}
|
||||
|
||||
sampler2D _VBlur;
|
||||
float4 _VBlur_TexelSize;
|
||||
float _Size;
|
||||
//fixed4 _TintColor;
|
||||
|
||||
half4 frag( v2f i ) : COLOR
|
||||
{
|
||||
float alpha = tex2D(_MainTex, i.uvmain).a * i.color.a;
|
||||
half4 sum = half4(0,0,0,0);
|
||||
|
||||
#define GRABPIXEL(weight,kernely) tex2Dproj( _VBlur, UNITY_PROJ_COORD(float4(i.uvgrab.x, i.uvgrab.y + _VBlur_TexelSize.y * kernely * _Size * alpha, i.uvgrab.z, i.uvgrab.w))) * weight
|
||||
|
||||
sum += GRABPIXEL(0.05, -4.0);
|
||||
sum += GRABPIXEL(0.09, -3.0);
|
||||
sum += GRABPIXEL(0.12, -2.0);
|
||||
sum += GRABPIXEL(0.15, -1.0);
|
||||
sum += GRABPIXEL(0.18, 0.0);
|
||||
sum += GRABPIXEL(0.15, +1.0);
|
||||
sum += GRABPIXEL(0.12, +2.0);
|
||||
sum += GRABPIXEL(0.09, +3.0);
|
||||
sum += GRABPIXEL(0.05, +4.0);
|
||||
|
||||
return sum + i.color * alpha;
|
||||
}
|
||||
ENDCG
|
||||
|
||||
half4 frag (Varyings IN) : SV_Target
|
||||
{
|
||||
float2 screenUV = IN.screenPos.xy / IN.screenPos.w;
|
||||
|
||||
float alpha = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, IN.uv).a * IN.color.a;
|
||||
|
||||
half4 sum = 0;
|
||||
|
||||
float2 texel = _CameraOpaqueTexture_TexelSize.xy * _Size * alpha;
|
||||
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(-4,0)) * 0.05;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(-3,0)) * 0.09;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(-2,0)) * 0.12;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(-1,0)) * 0.15;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV) * 0.18;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(1,0)) * 0.15;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(2,0)) * 0.12;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(3,0)) * 0.09;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(4,0)) * 0.05;
|
||||
|
||||
// vertical blur
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(0,-4)) * 0.05;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(0,-3)) * 0.09;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(0,-2)) * 0.12;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(0,-1)) * 0.15;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(0,1)) * 0.15;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(0,2)) * 0.12;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(0,3)) * 0.09;
|
||||
sum += SAMPLE_TEXTURE2D(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, screenUV + texel * float2(0,4)) * 0.05;
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Simple Blur Shader.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -10,7 +10,8 @@ NativeFormatImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/Skid Smoke.mat
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-2571467988551618862
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
@@ -169,3 +156,16 @@ Material:
|
||||
- _Specular: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &1954850764280563776
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 10
|
||||
|
||||
@@ -10,7 +10,8 @@ NativeFormatImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/World Canvas.mat
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -8,7 +8,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/additive.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -8,7 +8,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/laserShader.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -8,7 +8,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/runShader.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
@@ -8,7 +8,8 @@ ShaderImporter:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure FPS TPS Creator 3D +
|
||||
2.5D
|
||||
packageVersion: 3.77h
|
||||
assetPath: Assets/Game Kit Controller/Shaders/textShader.shader
|
||||
uploadId: 814740
|
||||
uploadId: 889948
|
||||
|
||||
Reference in New Issue
Block a user