添加魔力队长角色

This commit is contained in:
ZYT
2025-09-02 14:43:46 +08:00
parent e393e35d32
commit 83e5dc1b68
325 changed files with 511305 additions and 6015 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 96156af6c495e2d4eaa110c29c3b8ee4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,82 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Ad_CrankElectric
m_Shader: {fileID: 4800000, guid: bd955d9832dd6414f9659a6e1e41041c, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap:
IgnoreProjectors: true
RenderType: Transparent
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: b1ad1695d1ad59f45b226ffbd9315954, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex2:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Noise:
m_Texture: {fileID: 2800000, guid: 940bbc26959c40b4a91c2847e0adcadd, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Aberration: 0.25
- _BackfaceVisibility: 0.2
- _BlendDest: 10
- _BlendDst: 1
- _BlendSrc: 1
- _ClippedTiles: 0
- _Cull: 2
- _CullMode: 0
- _DoZWrite: 0
- _EffectAberration: 0.25
- _FlashAmount: 1
- _Flicker: 0.1
- _IdleAmount: 1
- _IdleRand: 0
- _IdleSpeed: 0.07
- _InvertIdle: 0
- _InvertPhase: 0
- _Overbright: 0
- _Phase: 1
- _PhaseRotation: 0.25
- _PhaseSharpness: 0.75
- _Radial: 0.5
- _RoundClipping: 0
- _ScaleAroundTile: 0
- _ScanlineIntensity: 0.105
- _ScanlineScale: 0
- _ScanlineShift: 0
- _Scattering: 1
- _SquareTiles: 0
- _ZTest: 4
- _ZWrite: 0
m_Colors:
- _Color: {r: 1, g: 0.9716024, b: 0.8970588, a: 1}
- _Color2: {r: 0.3969902, g: 0.6756593, b: 1, a: 1}
- _IdleData: {r: 0.1, g: 0.1, b: 0, a: 0}
- _PhaseDirection: {r: 0, g: 0, b: 0, a: 0}
- _ScaleCenter: {r: 0.5, g: 1, b: 0, a: 0}
- _Scaling: {r: 0.1, g: 0.1, b: 0, a: 0}
- _ScanlineData: {r: 0.2, g: 0.5, b: 0, a: 0}
- _TileCount: {r: 1024, g: 1024, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: ce3906ae8e8aa8d49924a56eddb2873f
labels:
- Effect
- FX
- Hologram
- Image
- Material
- SciFi
- Shader
- Utility
timeCreated: 1444758676
licenseType: Store
NativeFormatImporter:
mainObjectFileID: -1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8f691ffd551939a408b3ccf6b12ea6f2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ae3e8344ffe9ca34081bf8c19206d9f4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@@ -0,0 +1,90 @@
fileFormatVersion: 2
guid: 940bbc26959c40b4a91c2847e0adcadd
labels:
- Effect
- FX
- Image
- Texture
- Utility
timeCreated: 1444242885
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: 0
aniso: -1
mipBias: -1
wrapMode: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Standalone
maxTextureSize: 2048
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: WebGL
maxTextureSize: 2048
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 71e6f0b4a82ef4542a709cafe45bc52e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9cb3ddaee4eab5447a2dd58d5c7594c8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e1e2843c7dfc3b64a963f3d28f1ed572
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,114 @@
// This is part of the Sinuous Sci-Fi Signs v1.5 package
// Copyright (c) 2014-2018 Thomas Rasor
// E-mail : thomas.ir.rasor@gmail.com
Shader "Sci-Fi/SSFS/Base"
{
Properties
{
/*
This property block is ugly but necessary for Material Property
validation in the Custom Material Inspector.
NOTE: See "vars.cginc" for variable component explanations.
*/
[HideInInspector]_BlendSrc("Blend Src" , Int) = 1
[HideInInspector]_BlendDst("Blend Dst" , Int) = 0
[HideInInspector]_Cull("" , Int) = 2
[HideInInspector]_ZWrite("" , Int) = 8
[HideInInspector]_ZTest("" , Int) = 0
_MainTex("", 2D) = "white" {}
[HideInInspector]_MainTex2("",2D) = "black"{}
_Color("" , Color) = (1.0,1.0,1.0,1.0)
_Color2 ("" , Color) = (1.0,1.0,1.0,1.0)
_Overbright("",Range(0.0,1.0))=0.25
[NoScaleOffset]_Noise ("", 2D) = "gray" {}
_TileCount("" , Vector) = (25.0,25.0,0.0,0.0)
_SquareTiles("" , Float) = 0.0
_Phase("" , Range(0.0 , 1.0)) = 1.0
[Toggle]_InvertPhase("" , Float) = 0.0
_IdleData("",Vector) = (0.1,0.1,0.0,0.0)
_PhaseDirection("" , Vector) = (0.0,1.0,0.0,0.0)
_PhaseSharpness("" , Range(0.0,1.0)) = 0.5
_Scattering("" , Float) = 0.25
_Scaling("",Vector) = (1.0,1.0,0.5,0.5)
_Aberration("" , Range(0.0,1.0)) = 0.5
_EffectAberration("" , Range(0.0,1.0)) = 0.5
_FlashAmount("" , Range(0.0,1.0)) = 0.5
_Flicker("" , Range(0.0,0.2)) = 0.1
_BackfaceVisibility("" , Range(0.0,1.0)) = 1.0
_ScanlineData("" , Vector) = (0.2,0.5,0.0,0.0)
_ScaleAroundTile("" , Float) = 1.0
[Toggle]_ClippedTiles("" , Float) = 1.0
[Toggle]_RoundClipping("" , Float) = 0.0
}
SubShader
{
Tags { "Queue" = "Transparent" "PreviewType" = "Plane" "DisableBatching"="True" }
ZWrite [_ZWrite]
ZTest [_ZTest]
Blend [_BlendSrc] [_BlendDst]
Cull [_Cull]
Pass
{
CGPROGRAM
/*
This is the list of possible shader feature keywords.
Set these per material to have that material use specific features.
Keywords are set automatically when using the included Editors.
One downside to shader_feature is that new shader variants cannot be created from script
and all Keyword variants that are not used by materials at compilation time are excluded.
On the flip side, multi_compile compiles ALL keyword variants at compilation time.
This means when this shader is compiled, it may have quite a few versions (~1024?)
*/
/*
#pragma shader_feature ABERRATION
#pragma shader_feature BILLBOARD
#pragma shader_feature COMPLEX
#pragma shader_feature CLIPPING
#pragma shader_feature IDLE
#pragma shader_feature POST
#pragma shader_feature RADIAL
#pragma shader_feature SCALE_AROUND_TILE
#pragma shader_feature SCAN_LINES
#pragma shader_feature TEXTURE_SWAP
#pragma shader_feature WORLD_SPACE_SCANLINES
*/
#pragma multi_compile __ ABERRATION
#pragma multi_compile __ BILLBOARD
#pragma multi_compile __ COMPLEX
#pragma multi_compile __ CLIPPING
#pragma multi_compile __ IDLE
#pragma multi_compile __ POST
#pragma multi_compile __ RADIAL
#pragma multi_compile __ SCALE_AROUND_TILE
#pragma multi_compile __ SCAN_LINES
#pragma multi_compile __ TEXTURE_SWAP
#pragma multi_compile __ WORLD_SPACE_SCANLINES
#ifdef SHADER_API_D3D11
//do instancing stuff
#pragma multi_compile_instancing
#pragma target 5.0
#else
#pragma target 3.0
#endif
#pragma vertex vert
#pragma fragment frag
#include "SSFSCG.cginc"
ENDCG
}
}
CustomEditor "SSFS_Editor"
}

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: bd955d9832dd6414f9659a6e1e41041c
labels:
- Effect
- FX
- Hologram
- Post
- SciFi
- Shader
timeCreated: 1473878172
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,169 @@
// This is part of the Sinuous Sci-Fi Signs v1.5 package
// Copyright (c) 2014-2018 Thomas Rasor
// E-mail : thomas.ir.rasor@gmail.com
//
// NOTE:
// Do not delete this file.
// This file contains the majority of the functionality for SSFS shaders.
// If you do delete this file, SSFS shaders will no longer work and will fail to compile.
#define SSFSCGinc
//This looks like a comment... but it's not!
//Don't remove this, removal will prevent correct compilation for use with older Unity versions
//UNITY_SHADER_NO_UPGRADE
#if (UNITY_VERSION < 540)
#define o2w _Object2World
#define w2o _World2Object
#else
#define o2w unity_ObjectToWorld
#define w2o unity_WorldToObject
#endif
#if ( ( !WORLD_SPACE_SCANLINES && SCAN_LINES ) || POST )
#define SCREEN_POS
#endif
#include "UnityCG.cginc"
#include "cginc/maths.cginc"
#include "cginc/structs.cginc"
#include "cginc/vars.cginc"
#include "cginc/prototypes.cginc"
#include "cginc/sampling.cginc"
#include "cginc/calc.cginc"
fdata vert(vdata v)
{
fdata o;
#ifdef SHADER_API_D3D11
//do instancing stuff
UNITY_SETUP_INSTANCE_ID(v);
UNITY_TRANSFER_INSTANCE_ID(v, o);
#endif
#if ( BILLBOARD )
o.vertex = mul(
UNITY_MATRIX_P,
mul(UNITY_MATRIX_MV , float4(0,0,0,1) ) + mul(unity_ObjectToWorld,float4(v.vertex.xy,0,0))
);
#else
o.vertex = UnityObjectToClipPos(v.vertex);
#endif
o.uv = v.uv;
o.texuv = TRANSFORM_TEX(v.uv, _MainTex);
#if ( COMPLEX )
o.color = v.color;
#endif
#if ( ABERRATION )
#if ( BILLBOARD )
o.normal = v.normal;
o.worldNormal = -UNITY_MATRIX_V[2].xyz;
#else
o.normal = v.normal;
o.worldNormal = UnityObjectToWorldNormal(v.normal);
#endif
#endif
#if ( ABERRATION || WORLD_SPACE_SCANLINES )
o.worldPos = mul(o2w, v.vertex).xyz;
#endif
#ifdef SCREEN_POS
o.scrpos = ComputeScreenPos(o.vertex);
#endif
return o;
}
half4 frag
(
fdata i
#if (COMPLEX)
// VFACE is only supported on shader model 4.x+ (using 4.5 for certainty)
, fixed facing : VFACE
#endif
) : SV_TARGET
{
#ifdef SHADER_API_D3D11
//do instancing stuff
UNITY_SETUP_INSTANCE_ID(i);
#endif
loosevars v = init_vars(i);
half4 col = 1.0;
col = lerp(_Color, _Color2, v.effect.base * _FlashAmount);
#if (ABERRATION)
half2 aberrationBase = 0.0;
half fresnelAberration = 0.0;
#endif
half4 tex1 = 0.0;
#if(SCAN_LINES && COMPLEX)
v.scaledUv.x += v.scanlineShift;
#endif
#if (POST)
#if (ABERRATION)
fresnelAberration = v.view.local.xy * 0.02 * _Aberration + v.view.local.xy * 0.02 * _EffectAberration * v.effect.base;
#if(SCAN_LINES && COMPLEX)
fresnelAberration += v.scanlineShift;
#endif
tex1 = tex2DWithAberration(_MainTex, v.scaledUv, fresnelAberration , v );
#else
tex1 = tex2D(_MainTex, v.scaledUv);
#endif
#else
#if ( ABERRATION )
aberrationBase = FlattenVector(v.view.world, i.worldNormal);
fresnelAberration = v.view.fresnel * _Aberration;
#if(SCAN_LINES && COMPLEX)
fresnelAberration += v.scanlineShift;
#endif
half aberration1Strength = v.effect.base2 * _EffectAberration + fresnelAberration;
half2 tex1aberration = aberrationBase * aberration1Strength;
tex1 = tex2DWithAberration(_MainTex, v.scaledUv * _MainTex_ST.xy + _MainTex_ST.zw, tex1aberration * 0.025 , v );
#else
//aberration disabled
tex1 = tex2D(_MainTex, v.scaledUv * _MainTex_ST.xy + _MainTex_ST.zw);
#endif
#endif
#if (TEXTURE_SWAP)
half4 tex2 = 0.0;
#if (ABERRATION)
half aberration2Strength = (2.0 - v.effect.base2) * _EffectAberration + fresnelAberration;
half2 tex2aberration = aberrationBase * aberration2Strength;
tex2 = tex2DWithAberration(_MainTex2, i.uv * _MainTex2_ST.xy + _MainTex2_ST.zw, tex2aberration * 0.025 , v);
#else
tex2 = tex2D(_MainTex2, i.uv * _MainTex2_ST.xy + _MainTex2_ST.zw);
#endif
col *= lerp(tex2, tex1, v.visibility);
#else
col *= tex1 * v.visibility;
#endif
col.rgb *= (v.flash - 1.0) * v.visibility + 1.0;
col.a = max(0.0,col.a);
#if( !POST )
col.rgb *= col.a;
#endif
col.rgb *= 1.0 + _Overbright*_Overbright * 16.0;
#if (COMPLEX && !POST)
col.rgb *= i.color.rgb;
#endif
#if (SCAN_LINES)
col *= v.scanlines;
#endif
#if ( COMPLEX && !POST )
col *= (1.0 - _Flicker * 0.2 *(floor(_Time.w*30.0) % 2.0 == 0.0));
if (facing < 0.0) col = col * _BackfaceVisibility;
#endif
#ifdef debug
return debugcolor;
#endif
return max(0.0,col);
}

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 0a759141931db2845b17cd0ef9b4ae83
labels:
- Effect
- FX
- Hologram
- Post
- SciFi
- Shader
timeCreated: 1444179902
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 440f7f4f03052f746818322fe4b264c6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,289 @@
// This is part of the Sinuous Sci-Fi Signs v1.5 package
// Copyright (c) 2014-2018 Thomas Rasor
// E-mail : thomas.ir.rasor@gmail.com
/*
Method for calculating various variables per pixel that will be used throughout the shader.
The loosevars struct is passed throughout the shader to maintain consistency
and reduce unecessary or redundant computation.
*/
loosevars init_vars(fdata i)
{
loosevars v;
v.init();
v.screenratio = _ScreenParams.y / _ScreenParams.x;
#ifdef SCREEN_POS
v.scruv = i.scrpos.xy / i.scrpos.w;
#endif
CalcTile(i.uv, v);
CalcEffect( v );
#if (SCAN_LINES)
CalcScanlines(i, v);
#endif
CalcScaledUV(i.uv, v);
CalcVisibility(v);
#if (CLIPPING)
CalcTileClipping(v);
#endif
CalcFlash(v);
#if (ABERRATION)
CalcView(i, v);
#endif
return v;
}
/*
Method for calculating tile information per pixel for later use.
*/
void CalcTile(float2 uv, inout loosevars v)
{
float2 tc = _TileCount.xy;
if (_SquareTiles > 0.5)
{
#if ( POST )
tc.y = tc.x * v.screenratio;
#else
tc.y = tc.x;
#endif
}
v.tile.uv = floor(uv * tc.xy) / tc.xy;
v.tile.width = 0.5 / tc.xy;
v.tile.center = v.tile.uv + v.tile.width;
v.tile.scatter = noisetex(v.tile.center) - 0.5;
}
/*
Method for calculating and storing the effect information for later use.
*/
void CalcEffect( inout loosevars v )
{
phaseData pd = CalcPhaseData(v.tile.center, v.screenratio);
CalcTransition(pd, v);
#if ( IDLE )
CalcIdle(pd, v);
#endif
v.effect.base = saturate(pow(1.0 - v.effect.transition, 3.0));
#if ( IDLE )
v.effect.base = saturate(v.effect.base + v.effect.idle);
#endif
v.effect.base2 = 2.0 * v.effect.base;
}
/*
Method for calculating the tile visibility including clipping and phase.
*/
void CalcVisibility( inout loosevars v )
{
v.visibility = 1.0 - saturate(pow(1.0 - v.effect.transition, 4.0));
}
/*
Method for calculating tile clipping.
*/
#if (CLIPPING)
void CalcTileClipping( inout loosevars v )
{
fixed scaleClip = 1.0;
fixed2 clipFadeDist = 1.0 + v.tile.width;
if (_RoundClipping)
{
float2 clipuv = v.scaledUv;
#if ( POST )
clipuv -= v.tile.center;
clipuv.y *= v.screenratio;
clipuv += v.tile.center;
#endif
scaleClip = smoothstep(clipFadeDist.x, 1.0, sqrthalf * length(clipuv - v.tile.center) / max(v.tile.width.x, v.tile.width.y));
}
else
{
fixed2 xyclip = abs(v.scaledUv - v.tile.center) / v.tile.width;
fixed xclip = smoothstep(clipFadeDist.x, 1.0, xyclip.x);
fixed yclip = smoothstep(clipFadeDist.y, 1.0, xyclip.y);
scaleClip = xclip * yclip;
}
v.visibility = v.visibility * scaleClip;
}
#endif
/*
Method for calculating the effect flash of this tile.
*/
void CalcFlash( inout loosevars v ) { v.flash = 1.0 + v.effect.base * _FlashAmount * 10.0; }
/*
Method for computing view information for later use.
*/
#if ( ABERRATION )
void CalcView( fdata i , inout loosevars v )
{
#if ( POST )
float2 scruv2 = saturate(v.scruv);
scruv2 = scruv2 * 2.0 - 1.0;
v.view.world = normalize(float3(scruv2.x, scruv2.y, 1.0));
v.view.fresnel = 0.0;
#else
v.view.world = normalize(UnityWorldSpaceViewDir(i.worldPos));
CalcFresnel(i, v);
#endif
v.view.local = mul(w2o, float4(v.view.world, 0.0)).xyz;
}
/*
Method for calculating the fresnel term of a pixel.
*/
void CalcFresnel(fdata i , inout loosevars v)
{
v.view.fresnel = 1.0 - abs(dot(i.worldNormal, v.view.world));
}
#endif
/*
Method for calculating scanlines in the appropriate space.
*/
#if ( SCAN_LINES )
void CalcScanlines(fdata i , inout loosevars v)
{
float scale = 10.0 * _ScanlineData.y + 1.0;
float y = 0.0;
#ifdef SCREEN_POS
y = (v.scruv.y * 0.02 * scale) * _ScreenParams.y;
#else
y = i.worldPos.y * scale * 10.0;
#endif
y += _Time.w * _ScanlineData.w;
v.scanlines = 0.0;
#if (COMPLEX)
fixed d = abs(2.0*frac(y) - 1.0) - 0.5;
fixed f = fwidth(d);
v.scanlines = (f != 0.0) ? smoothstep(-f, f, d) : d;
v.scanlineShift = 5.0 * (v.scanlines-0.5) * (_ScanlineData.z / _ScreenParams.x);
#else
v.scanlines = frac(y) < 0.5;
#endif
v.scanlines = 1.0 - v.scanlines * _ScanlineData.x;
}
#endif
/*
Method for restricting the phase value to the range defined by the user.
*/
float CalcPhase( float phase , float start , float end )
{
return saturate(invlerp(start, end, phase));
}
/*
Method for calculating a tile's position along the transition.
*/
float CalcPhasePos( float2 c , float screenratio )
{
float2 phaseuv = c;
float r = _PhaseDirection.x * tau;
float sr = sin(r);
float cr = cos(r);
float pRange = max(abs(sr), abs(cr));
phaseuv = mul(phaseuv - 0.5, float2x2(cr, sr, -sr, cr)) + 0.5;
phaseuv = (phaseuv - 0.5) * pRange + 0.5;
half phasePos = saturate(phaseuv.x);
#if (RADIAL)
phaseuv = c;
#if (POST)
phaseuv -= 0.5;
phaseuv.y *= screenratio;
phaseuv += 0.5;
#endif
half radialPos = 1.0 - saturate(sqrthalf * (2.0 * length(phaseuv - 0.5)));
phasePos = lerp(phasePos, radialPos, _PhaseDirection.y );
#endif
if (_InvertPhase > 0.5)
phasePos = 1.0 - phasePos;
return phasePos;
}
/*
Method for calculating data for transition and idle animations.
*/
phaseData CalcPhaseData(float2 c , float screenratio )
{
phaseData pd;
pd.sharpness = _PhaseSharpness * 15.0 + 1.0;
pd.invsharpness = 1.0 / pd.sharpness;
pd.phasePos = CalcPhasePos(c , screenratio );
pd.scatterAmount = _Scattering * 2.0;
return pd;
}
/*
Method for calculating the base effect of tiles based on the _Phase property and the tile's position.
*/
void CalcTransition( phaseData pd , inout loosevars v )
{
fixed p = _Phase;
fixed q = 1.0 - p;
half cleanupOffset = p - 0.5;
half actualScatter = (v.tile.scatter + cleanupOffset) * pd.scatterAmount * pd.invsharpness;
half n = pd.sharpness * (pd.phasePos + actualScatter - q) + q;
v.effect.transition = saturate(n - (2.0 * q - 1.0));
}
/*
Method for calculating the idle animation effect of a tile.
*/
#if (IDLE)
void CalcIdle( phaseData pd , inout loosevars v )
{
float time = _Time.y * _IdleData.y * 3.0 + v.tile.scatter * _IdleData.z * _IdleData.z * 10.0;
fixed p = frac(time);
float idlePos = pd.phasePos;
if (_IdleData.w > 0.5) idlePos = 1.0 - idlePos;
fixed q = 1.0 - p;
half cleanupOffset = p - 0.5;
half actualScatter = (v.tile.scatter + cleanupOffset) * pd.scatterAmount * pd.invsharpness;
half n = pd.sharpness * (idlePos + actualScatter - q) + q;
v.effect.idle = _IdleData.x * (1.0 - saturate(abs(n - (3.0 * q - 1.0))));
}
#endif
/*
Method for calculating the UV as scaled per tile by effect.
*/
void CalcScaledUV(half2 texUv , inout loosevars v)
{
half2 tl = v.tile.center - v.tile.width;
half2 br = v.tile.center + v.tile.width;
half2 center = 0.5;
#if (SCALE_AROUND_TILE)
half2 tileCenterPoint = 0.0;
tileCenterPoint.x = lerp(tl.x, br.x, _Scaling.z);
tileCenterPoint.y = lerp(tl.y, br.y, _Scaling.w);
center = lerp(saturate(_Scaling.zw), tileCenterPoint, _ScaleAroundTile);
#else
center = saturate(_Scaling.zw);
#endif
half2 scaling = v.effect.base * _Scaling.xy + 1.0;
v.scaledUv = (texUv - center) * scaling + center;
}

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 34f4c73836e392c42904022b3ce2faa6
labels:
- Effect
- FX
- Hologram
- SciFi
- Shader
- Utility
timeCreated: 1489793822
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,25 @@
// This is part of the Sinuous Sci-Fi Signs v1.5 package
// Copyright (c) 2014-2018 Thomas Rasor
// E-mail : thomas.ir.rasor@gmail.com
#define pi 3.14159
#define tau 6.28318
#define sqrthalf 0.707106781187
half2 FlattenVector(half3 v, half3 n)
{
return (v - dot(v, n) * n).xy;
}
float2 rotuv(float2 p, float r, float2 c)
{
r *= tau;
float sr = sin(r);
float cr = cos(r);
return mul(p - c, float2x2(cr, sr, -sr, cr)) + c;
}
float invlerp(float a, float b, float x)
{
return (x - a) / (b - a);
}

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: b5de5391b4c087d4090819dd385c1ab5
labels:
- Effect
- FX
- Hologram
- SciFi
- Shader
- Utility
timeCreated: 1488843194
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,29 @@
// This is part of the Sinuous Sci-Fi Signs v1.5 package
// Copyright (c) 2014-2018 Thomas Rasor
// E-mail : thomas.ir.rasor@gmail.com
float noisetex(float2 uv);
float2 rotuv(float2 uv, float r, float2 center = 0.5);
phaseData CalcPhaseData(float2 c, float screenratio);
void CalcTile(float2 uv, inout loosevars v);
void CalcScaledUV(half2 texUv, inout loosevars v);
float CalcPhasePos(float2 c,float screenratio);
void CalcVisibility(inout loosevars v);
void CalcFlash(inout loosevars v);
void CalcTileClipping(inout loosevars v);
void CalcTransition(phaseData pd, inout loosevars v);
void CalcEffect(inout loosevars v);
#if ( IDLE )
void CalcIdle(phaseData pd, inout loosevars v);
#endif
#if ( ABERRATION )
half2 FlattenVector(half3 v, half3 n);
void CalcFresnel(fdata i, inout loosevars v);
void CalcView(fdata i, inout loosevars v);
#endif
#if ( SCAN_LINES )
void CalcScanlines(fdata i, inout loosevars v);
#endif

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: f0a13b0b1eebc0d4bbf86cf7f5340a92
labels:
- Effect
- FX
- Hologram
- SciFi
- Shader
- Utility
timeCreated: 1488843664
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,50 @@
// This is part of the Sinuous Sci-Fi Signs v1.5 package
// Copyright (c) 2014-2018 Thomas Rasor
// E-mail : thomas.ir.rasor@gmail.com
/*
This method samples the _Noise textured which is used for tile effect scattering.
*/
float noisetex(float2 uv)
{
#if ( COMPLEX )
return Luminance(tex2D(_Noise, uv).rgb);
#else
return tex2D(_Noise, uv).r;
#endif
}
/*
This method samples a texture 3 times to produce chromatic aberration based on a precomputed vector.
*/
#if ( ABERRATION )
half4 tex2DWithAberration(sampler2D tex, float2 uv, half2 aberrationVector, loosevars v)
{
half4 col = lerp(_Color, _Color2, v.effect.base2 * _FlashAmount);
float2 uvr = uv.xy + aberrationVector;
float2 uvg = uv.xy;
float2 uvb = uv.xy - aberrationVector;
half r, g, b, a;
#if ( POST )
// in post, _MainTex uses a zero alpha for the clearflags
// because of this, we avoid using alpha in post so the skybox does not appear black
r = (col.rgb * tex2D(tex, uvr).rgb).r;
g = (col.rgb * tex2D(tex, uvg).rgb).g;
b = (col.rgb * tex2D(tex, uvb).rgb).b;
a = max(r, max(g, b));
#else
half4 c = col * tex2D(tex, uvr);
r = c.r * c.a;
c = col * tex2D(tex, uvg);
g = c.g * c.a;
c = col * tex2D(tex, uvb);
b = c.b * c.a;
a = max(r, max(g, b));
#endif
return half4(r, g, b, a);
}
#endif

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 32aabf5e0d33f0141901b990f246f7d4
labels:
- Effect
- FX
- Hologram
- SciFi
- Shader
- Utility
timeCreated: 1489794019
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,134 @@
// This is part of the Sinuous Sci-Fi Signs v1.5 package
// Copyright (c) 2014-2018 Thomas Rasor
// E-mail : thomas.ir.rasor@gmail.com
struct vdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
#if ( COMPLEX )
float4 color : COLOR;
#endif
#if ( ABERRATION )
float3 normal : NORMAL;
#endif
#ifdef SHADER_API_D3D11
//do instancing stuff
UNITY_VERTEX_INPUT_INSTANCE_ID
#endif
};
struct fdata
{
float4 vertex : SV_POSITION;
float2 uv : TEXCOORD0;
float2 texuv : TEXCOORD1;
#if ( COMPLEX )
float4 color : COLOR;
#endif
#if ( ABERRATION || WORLD_SPACE_SCANLINES )
float3 worldPos : TEXCOORD2;
#endif
#if ( ABERRATION )
float3 normal : TEXCOORD3;
float3 worldNormal : TEXCOORD4;
#endif
#ifdef SCREEN_POS
float4 scrpos : TEXCOORD5;
#endif
#ifdef SHADER_API_D3D11
//do instancing stuff
UNITY_VERTEX_INPUT_INSTANCE_ID
#endif
};
struct tileData
{
float2 uv;//bottom left corner of the current pixel's tile
float2 width;//half width ( in uv space ) of each tile
float2 center;//center of the current pixel's tile
float2 scatter;//the amount of scatter for this tile
};
#if ( ABERRATION )
struct viewData
{
fixed3 local;//local space view direction used for image aberration
fixed3 world;//world space view direction used for fresnel
fixed fresnel;//surface fresnel term cached
};
#endif
struct effectData
{
float transition;//the transition state of this tile
#if ( IDLE )
fixed idle;//the idle animation state of this tile
#endif
fixed base;
fixed base2;// base * 2.0
};
struct loosevars
{
tileData tile;
#if ( ABERRATION )
viewData view;
#endif
effectData effect;
float screenratio;
#ifdef SCREEN_POS
float2 scruv;
#endif
#if ( SCAN_LINES )
float scanlines;
#if (COMPLEX)
float scanlineShift;
#endif
#endif
half flash;
float2 scaledUv;
fixed visibility;
void init()
{
tile.uv = 0.0;
tile.width = 0.0;
tile.center = 0.0;
tile.scatter = 0.0;//[ -0.5 , +0.5 ]
#if ( ABERRATION )
view.local = 0.0;
view.world = 0.0;
view.fresnel = 0.0;
#endif
effect.transition = 0.0;
#if ( IDLE )
effect.idle = 0.0;
#endif
effect.base = 0.0;
effect.base2 = 0.0;
#ifdef SCREEN_POS
screenratio = 0.0;
scruv = 0.0;
#endif
#if ( SCAN_LINES )
scanlines = 0.0;
#if (COMPLEX)
scanlineShift = 0.0;
#endif
#endif
flash = 0.0;
scaledUv = 0.0;
visibility = 0.0;
}
};
struct phaseData
{
float sharpness;
float invsharpness;
float phasePos;
float scatterAmount;
};

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 5215b8b35df5acc4286d29fad9cba47c
labels:
- Effect
- FX
- Hologram
- SciFi
- Shader
- Utility
timeCreated: 1488843048
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,57 @@
// This is part of the Sinuous Sci-Fi Signs v1.5 package
// Copyright (c) 2014-2018 Thomas Rasor
// E-mail : thomas.ir.rasor@gmail.com
//properties available to any shader version
fixed4 _Color;
fixed4 _Color2;
sampler2D _MainTex;
float4 _MainTex_ST;
sampler2D _Noise;
float4 _TileCount;// [ count_x , count_y , z , w ]
float4 _Scaling;// [ scaling_x , scaling_y , origin_x , origin_y ]
float4 _PhaseDirection;// [ rotation , radial , z , w ]
fixed _Phase;
fixed _PhaseSharpness;
fixed _Scattering;
fixed _InvertPhase;
fixed _Overbright;
fixed _FlashAmount;
half _SquareTiles;
//properties tied to shader features
#if ( TEXTURE_SWAP )
sampler2D _MainTex2;
float4 _MainTex2_ST;
#endif
#if ( IDLE )
fixed4 _IdleData; // [ strength , speed , noise , reverse ]
#endif
#if ( ABERRATION )
fixed _Aberration, _EffectAberration;
#endif
#if ( CLIPPING )
fixed _ClippedTiles, _RoundClipping;
#endif
#if ( SCALE_AROUND_TILE )
fixed _ScaleAroundTile;
#endif
#if ( SCAN_LINES )
fixed4 _ScanlineData; // [ intensity , scale , uv_shift , speed ]
#define doScanlines ( _ScanlineIntensity.x > 0.02 )
#endif
#if ( COMPLEX )
fixed _BackfaceVisibility;
fixed _Flicker;
#endif
//assign debugcolor anywhere and then use "#define debug" to have the fragment program return it
float4 debugcolor;

View File

@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 9d990f8a876fba04eae8b4e760bc4427
labels:
- Effect
- FX
- Hologram
- SciFi
- Shader
- Utility
timeCreated: 1488843194
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant: