liquid star
This commit is contained in:
1 parent
a9b3545ee0
commit
e442a86cfc
20 files changed
+1051
-20
No files matched your search
@@ -0,0 +1,45 @@
|
|||||||
|
%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: LiquidStar 1
|
||||||
|
m_Shader: {fileID: 4800000, guid: 39b526c240f342f98df3892438221ab4, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords: []
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _CoronaIntensity: 3
|
||||||
|
- _CoronaSize: 0.15
|
||||||
|
- _EdgeSoftness: 0.08
|
||||||
|
- _GlowIntensity: 3.12
|
||||||
|
- _Scale: 8.36
|
||||||
|
- _Speed: 0.21
|
||||||
|
- _SpotScale: 6.02
|
||||||
|
- _SpotThreshold: 0.187
|
||||||
|
- _Turbulence: 1.402
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 0.5320757, g: 0.054250862, b: 0, a: 1}
|
||||||
|
- _HotColor: {r: 0.011320889, g: 0.010053102, b: 0.0005446946, a: 1}
|
||||||
|
- _SpotColor: {r: 0.15849048, g: 0.045304425, b: 0.045304425, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4d87b62cb3f1287bdbd0c96890935e5c
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
%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: LiquidStar
|
||||||
|
m_Shader: {fileID: 4800000, guid: 39b526c240f342f98df3892438221ab4, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords: []
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _CoronaIntensity: 3
|
||||||
|
- _CoronaSize: 0.15
|
||||||
|
- _EdgeSoftness: 0.08
|
||||||
|
- _GlowIntensity: 3.12
|
||||||
|
- _Scale: 8.36
|
||||||
|
- _Speed: 0.21
|
||||||
|
- _SpotScale: 6.02
|
||||||
|
- _SpotThreshold: 0.187
|
||||||
|
- _Turbulence: 1.402
|
||||||
|
m_Colors:
|
||||||
|
- _BaseColor: {r: 1, g: 0.1, b: 0, a: 1}
|
||||||
|
- _HotColor: {r: 0.011764706, g: 0.011764706, b: 0, a: 1}
|
||||||
|
- _SpotColor: {r: 0.3, g: 0, b: 0, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 55586690bd6b4a6ca0646858c09cdd6e
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
Shader "Unlit/LiquidStar"
|
||||||
|
{
|
||||||
|
Properties
|
||||||
|
{
|
||||||
|
_Speed("Flow Speed", Range(0.01, 5.0)) = 0.8
|
||||||
|
_Scale("Surface Scale", Range(0.5, 20.0)) = 3.0
|
||||||
|
_BaseColor("Base Color", Color) = (1.0, 0.1, 0.0, 1.0)
|
||||||
|
_HotColor("Hot Spot Color", Color) = (1.0, 0.9, 0.2, 1.0)
|
||||||
|
_SpotColor("Sunspot Color", Color) = (0.3, 0.0, 0.0, 1.0)
|
||||||
|
_SpotScale("Sunspot Scale", Range(1.0, 15.0)) = 5.0
|
||||||
|
_SpotThreshold("Sunspot Threshold", Range(0.0, 1.0)) = 0.45
|
||||||
|
_GlowIntensity("Glow Intensity", Range(1.0, 20.0)) = 6.0
|
||||||
|
_Turbulence("Turbulence", Range(0.0, 3.0)) = 1.2
|
||||||
|
_EdgeSoftness("Edge Softness", Range(0.01, 0.3)) = 0.08
|
||||||
|
_CoronaSize("Corona Size", Range(0.0, 0.4)) = 0.15
|
||||||
|
_CoronaIntensity("Corona Intensity", Range(0.0, 10.0)) = 3.0
|
||||||
|
}
|
||||||
|
SubShader
|
||||||
|
{
|
||||||
|
Tags { "RenderType"="Opaque" "Queue"="Geometry" }
|
||||||
|
LOD 100
|
||||||
|
ZWrite On
|
||||||
|
Cull Off
|
||||||
|
|
||||||
|
Pass
|
||||||
|
{
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma vertex vert
|
||||||
|
#pragma fragment frag
|
||||||
|
|
||||||
|
#include "UnityCG.cginc"
|
||||||
|
|
||||||
|
struct appdata
|
||||||
|
{
|
||||||
|
float4 vertex : POSITION;
|
||||||
|
float2 uv : TEXCOORD0;
|
||||||
|
float3 normal : NORMAL;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct v2f
|
||||||
|
{
|
||||||
|
float2 uv : TEXCOORD0;
|
||||||
|
float4 vertex : SV_POSITION;
|
||||||
|
float3 worldNormal : TEXCOORD1;
|
||||||
|
float3 worldPos : TEXCOORD2;
|
||||||
|
};
|
||||||
|
|
||||||
|
float _Speed;
|
||||||
|
float _Scale;
|
||||||
|
float4 _BaseColor;
|
||||||
|
float4 _HotColor;
|
||||||
|
float4 _SpotColor;
|
||||||
|
float _SpotScale;
|
||||||
|
float _SpotThreshold;
|
||||||
|
float _GlowIntensity;
|
||||||
|
float _Turbulence;
|
||||||
|
float _EdgeSoftness;
|
||||||
|
float _CoronaSize;
|
||||||
|
float _CoronaIntensity;
|
||||||
|
|
||||||
|
// 3D simplex-style noise
|
||||||
|
float3 mod289(float3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
|
||||||
|
float4 mod289(float4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
|
||||||
|
float4 permute(float4 x) { return mod289(((x * 34.0) + 10.0) * x); }
|
||||||
|
float4 taylorInvSqrt(float4 r) { return 1.79284291400159 - 0.85373472095314 * r; }
|
||||||
|
|
||||||
|
float snoise(float3 v)
|
||||||
|
{
|
||||||
|
const float2 C = float2(1.0 / 6.0, 1.0 / 3.0);
|
||||||
|
const float4 D = float4(0.0, 0.5, 1.0, 2.0);
|
||||||
|
|
||||||
|
float3 i = floor(v + dot(v, C.yyy));
|
||||||
|
float3 x0 = v - i + dot(i, C.xxx);
|
||||||
|
|
||||||
|
float3 g = step(x0.yzx, x0.xyz);
|
||||||
|
float3 l = 1.0 - g;
|
||||||
|
float3 i1 = min(g.xyz, l.zxy);
|
||||||
|
float3 i2 = max(g.xyz, l.zxy);
|
||||||
|
|
||||||
|
float3 x1 = x0 - i1 + C.xxx;
|
||||||
|
float3 x2 = x0 - i2 + C.yyy;
|
||||||
|
float3 x3 = x0 - D.yyy;
|
||||||
|
|
||||||
|
i = mod289(i);
|
||||||
|
float4 p = permute(permute(permute(
|
||||||
|
i.z + float4(0.0, i1.z, i2.z, 1.0))
|
||||||
|
+ i.y + float4(0.0, i1.y, i2.y, 1.0))
|
||||||
|
+ i.x + float4(0.0, i1.x, i2.x, 1.0));
|
||||||
|
|
||||||
|
float n_ = 0.142857142857;
|
||||||
|
float3 ns = n_ * D.wyz - D.xzx;
|
||||||
|
|
||||||
|
float4 j = p - 49.0 * floor(p * ns.z * ns.z);
|
||||||
|
|
||||||
|
float4 x_ = floor(j * ns.z);
|
||||||
|
float4 y_ = floor(j - 7.0 * x_);
|
||||||
|
|
||||||
|
float4 x = x_ * ns.x + ns.yyyy;
|
||||||
|
float4 y = y_ * ns.x + ns.yyyy;
|
||||||
|
float4 h = 1.0 - abs(x) - abs(y);
|
||||||
|
|
||||||
|
float4 b0 = float4(x.xy, y.xy);
|
||||||
|
float4 b1 = float4(x.zw, y.zw);
|
||||||
|
|
||||||
|
float4 s0 = floor(b0) * 2.0 + 1.0;
|
||||||
|
float4 s1 = floor(b1) * 2.0 + 1.0;
|
||||||
|
float4 sh = -step(h, float4(0, 0, 0, 0));
|
||||||
|
|
||||||
|
float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
|
||||||
|
float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
|
||||||
|
|
||||||
|
float3 p0 = float3(a0.xy, h.x);
|
||||||
|
float3 p1 = float3(a0.zw, h.y);
|
||||||
|
float3 p2 = float3(a1.xy, h.z);
|
||||||
|
float3 p3 = float3(a1.zw, h.w);
|
||||||
|
|
||||||
|
float4 norm = taylorInvSqrt(float4(dot(p0,p0), dot(p1,p1), dot(p2,p2), dot(p3,p3)));
|
||||||
|
p0 *= norm.x;
|
||||||
|
p1 *= norm.y;
|
||||||
|
p2 *= norm.z;
|
||||||
|
p3 *= norm.w;
|
||||||
|
|
||||||
|
float4 m = max(0.6 - float4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);
|
||||||
|
m = m * m;
|
||||||
|
return 42.0 * dot(m * m, float4(dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3)));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fractal brownian motion
|
||||||
|
float fbm(float3 p, int octaves)
|
||||||
|
{
|
||||||
|
float value = 0.0;
|
||||||
|
float amplitude = 0.5;
|
||||||
|
float frequency = 1.0;
|
||||||
|
for (int i = 0; i < octaves; i++)
|
||||||
|
{
|
||||||
|
value += amplitude * snoise(p * frequency);
|
||||||
|
amplitude *= 0.5;
|
||||||
|
frequency *= 2.0;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
v2f vert(appdata v)
|
||||||
|
{
|
||||||
|
v2f o;
|
||||||
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
|
o.uv = v.uv;
|
||||||
|
o.worldNormal = UnityObjectToWorldNormal(v.normal);
|
||||||
|
o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
float4 frag(v2f i) : SV_Target
|
||||||
|
{
|
||||||
|
// Remap UV to centered [-1, 1] range
|
||||||
|
float2 centeredUV = i.uv * 2.0 - 1.0;
|
||||||
|
|
||||||
|
// Shrink the star so disk + corona fits inside the quad
|
||||||
|
float starRadius = 1.0 / (1.0 + _CoronaSize);
|
||||||
|
float dist = length(centeredUV) / starRadius;
|
||||||
|
|
||||||
|
// Discard outside the circle + corona
|
||||||
|
if (dist > 1.0 + _CoronaSize) discard;
|
||||||
|
|
||||||
|
float time = _Time.y * _Speed;
|
||||||
|
|
||||||
|
// Use UV-based 3D coordinate for noise (flat plane, no sphere artifacts)
|
||||||
|
float3 p = float3(centeredUV * _Scale, time * 0.1);
|
||||||
|
|
||||||
|
// Liquid flow - domain warping (4 octaves for island edges)
|
||||||
|
float3 q = float3(
|
||||||
|
fbm(p + float3(0.0, 0.0, time * 0.3), 4),
|
||||||
|
fbm(p + float3(5.2, 1.3, time * 0.25), 4),
|
||||||
|
fbm(p + float3(1.7, 9.2, time * 0.35), 4)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Inner layers - low octaves for smooth fills
|
||||||
|
float3 r = float3(
|
||||||
|
fbm(p + _Turbulence * q + float3(1.7, 9.2, time * 0.15), 1),
|
||||||
|
fbm(p + _Turbulence * q + float3(8.3, 2.8, time * 0.2), 1),
|
||||||
|
fbm(p + _Turbulence * q + float3(3.1, 6.5, time * 0.1), 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
float liquidPattern = fbm(p + _Turbulence * r, 1);
|
||||||
|
|
||||||
|
// Sunspots - low frequency
|
||||||
|
float3 spotP = float3(centeredUV * _SpotScale, time * 0.05);
|
||||||
|
float spotNoise = fbm(spotP + float3(time * 0.05, time * 0.03, time * 0.07), 2);
|
||||||
|
|
||||||
|
// Darken areas where noise is below threshold = sunspots
|
||||||
|
float spotMask = smoothstep(_SpotThreshold - 0.15, _SpotThreshold, spotNoise);
|
||||||
|
|
||||||
|
// Convection cells - granulation pattern
|
||||||
|
float granulation = snoise(float3(centeredUV * _Scale * 3.0, time * 0.4));
|
||||||
|
granulation = granulation * 0.5 + 0.5;
|
||||||
|
|
||||||
|
// Blend colors
|
||||||
|
float heatMap = liquidPattern * 0.5 + 0.5;
|
||||||
|
heatMap = saturate(heatMap + granulation * 0.2);
|
||||||
|
|
||||||
|
// Base liquid surface color
|
||||||
|
float3 col = lerp(_BaseColor.rgb, _HotColor.rgb, pow(heatMap, 1.5));
|
||||||
|
|
||||||
|
// Apply sunspots (dark cooler regions)
|
||||||
|
col = lerp(_SpotColor.rgb, col, spotMask);
|
||||||
|
|
||||||
|
// Limb darkening - darken edges of the star disk
|
||||||
|
float limbDarken = 1.0 - pow(dist, 2.0);
|
||||||
|
col *= max(limbDarken, 0.3);
|
||||||
|
|
||||||
|
// HDR glow intensity
|
||||||
|
col *= _GlowIntensity;
|
||||||
|
|
||||||
|
// Outside the star disk: corona fading to black
|
||||||
|
if (dist > 1.0)
|
||||||
|
{
|
||||||
|
float coronaDist = (dist - 1.0) / _CoronaSize;
|
||||||
|
float coronaFade = (1.0 - coronaDist) * (1.0 - coronaDist);
|
||||||
|
col = lerp(_BaseColor.rgb, _HotColor.rgb, 0.7) * _CoronaIntensity * coronaFade;
|
||||||
|
}
|
||||||
|
else if (dist > 1.0 - _EdgeSoftness)
|
||||||
|
{
|
||||||
|
// Soft edge of star disk
|
||||||
|
float edgeFade = smoothstep(1.0, 1.0 - _EdgeSoftness, dist);
|
||||||
|
col = lerp(float3(0, 0, 0), col, edgeFade);
|
||||||
|
}
|
||||||
|
|
||||||
|
return float4(col, 1.0);
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 39b526c240f342f98df3892438221ab4
|
||||||
|
ShaderImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
defaultTextures: []
|
||||||
|
nonModifiableTextures: []
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
%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: SolarFlare
|
||||||
|
m_Shader: {fileID: 4800000, guid: e44218cd855f4eada13a6505c3c577f2, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords: []
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 1
|
||||||
|
m_CustomRenderQueue: 3000
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _FadeEdge: 2
|
||||||
|
- _FadeEnds: 0.15
|
||||||
|
- _FlowDir: 1
|
||||||
|
- _Intensity: 2
|
||||||
|
- _Scale: 3
|
||||||
|
- _Speed: 0.2
|
||||||
|
- _Wisps: 4
|
||||||
|
m_Colors:
|
||||||
|
- _FlareColor: {r: 1, g: 0.2, b: 0.05, a: 1}
|
||||||
|
- _HotColor: {r: 1, g: 0.8, b: 0.3, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 08c186d972d6480287ccbdf019a7ad51
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,177 @@
|
|||||||
|
Shader "Unlit/SolarFlare"
|
||||||
|
{
|
||||||
|
Properties
|
||||||
|
{
|
||||||
|
_Speed("Flow Speed", Range(0.01, 5.0)) = 1.0
|
||||||
|
_Scale("Pattern Scale", Range(0.5, 20.0)) = 3.0
|
||||||
|
_FlareColor("Flare Color", Color) = (1.0, 0.3, 0.05, 1.0)
|
||||||
|
_HotColor("Hot Color", Color) = (1.0, 0.8, 0.3, 1.0)
|
||||||
|
_Intensity("Intensity", Range(0.1, 10.0)) = 3.0
|
||||||
|
_FlowDir("Flow Direction", Range(-1, 1)) = 1.0
|
||||||
|
_FadeEdge("Edge Fade Power", Range(0.5, 5.0)) = 2.0
|
||||||
|
_FadeEnds("End Fade", Range(0.0, 0.5)) = 0.15
|
||||||
|
_Wisps("Wisp Count", Range(1.0, 8.0)) = 4.0
|
||||||
|
}
|
||||||
|
SubShader
|
||||||
|
{
|
||||||
|
Tags { "RenderType"="Transparent" "Queue"="Transparent" }
|
||||||
|
LOD 100
|
||||||
|
Blend One One
|
||||||
|
ZWrite Off
|
||||||
|
Cull Off
|
||||||
|
|
||||||
|
Pass
|
||||||
|
{
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma vertex vert
|
||||||
|
#pragma fragment frag
|
||||||
|
|
||||||
|
#include "UnityCG.cginc"
|
||||||
|
|
||||||
|
struct appdata
|
||||||
|
{
|
||||||
|
float4 vertex : POSITION;
|
||||||
|
float2 uv : TEXCOORD0;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct v2f
|
||||||
|
{
|
||||||
|
float2 uv : TEXCOORD0;
|
||||||
|
float4 vertex : SV_POSITION;
|
||||||
|
};
|
||||||
|
|
||||||
|
float _Speed;
|
||||||
|
float _Scale;
|
||||||
|
float4 _FlareColor;
|
||||||
|
float4 _HotColor;
|
||||||
|
float _Intensity;
|
||||||
|
float _FlowDir;
|
||||||
|
float _FadeEdge;
|
||||||
|
float _FadeEnds;
|
||||||
|
float _Wisps;
|
||||||
|
|
||||||
|
// 3D simplex noise (same as LiquidStar)
|
||||||
|
float3 mod289(float3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
|
||||||
|
float4 mod289(float4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
|
||||||
|
float4 permute(float4 x) { return mod289(((x * 34.0) + 10.0) * x); }
|
||||||
|
float4 taylorInvSqrt(float4 r) { return 1.79284291400159 - 0.85373472095314 * r; }
|
||||||
|
|
||||||
|
float snoise(float3 v)
|
||||||
|
{
|
||||||
|
const float2 C = float2(1.0 / 6.0, 1.0 / 3.0);
|
||||||
|
const float4 D = float4(0.0, 0.5, 1.0, 2.0);
|
||||||
|
|
||||||
|
float3 i = floor(v + dot(v, C.yyy));
|
||||||
|
float3 x0 = v - i + dot(i, C.xxx);
|
||||||
|
|
||||||
|
float3 g = step(x0.yzx, x0.xyz);
|
||||||
|
float3 l = 1.0 - g;
|
||||||
|
float3 i1 = min(g.xyz, l.zxy);
|
||||||
|
float3 i2 = max(g.xyz, l.zxy);
|
||||||
|
|
||||||
|
float3 x1 = x0 - i1 + C.xxx;
|
||||||
|
float3 x2 = x0 - i2 + C.yyy;
|
||||||
|
float3 x3 = x0 - D.yyy;
|
||||||
|
|
||||||
|
i = mod289(i);
|
||||||
|
float4 p = permute(permute(permute(
|
||||||
|
i.z + float4(0.0, i1.z, i2.z, 1.0))
|
||||||
|
+ i.y + float4(0.0, i1.y, i2.y, 1.0))
|
||||||
|
+ i.x + float4(0.0, i1.x, i2.x, 1.0));
|
||||||
|
|
||||||
|
float n_ = 0.142857142857;
|
||||||
|
float3 ns = n_ * D.wyz - D.xzx;
|
||||||
|
|
||||||
|
float4 j = p - 49.0 * floor(p * ns.z * ns.z);
|
||||||
|
|
||||||
|
float4 x_ = floor(j * ns.z);
|
||||||
|
float4 y_ = floor(j - 7.0 * x_);
|
||||||
|
|
||||||
|
float4 x = x_ * ns.x + ns.yyyy;
|
||||||
|
float4 y = y_ * ns.x + ns.yyyy;
|
||||||
|
float4 h = 1.0 - abs(x) - abs(y);
|
||||||
|
|
||||||
|
float4 b0 = float4(x.xy, y.xy);
|
||||||
|
float4 b1 = float4(x.zw, y.zw);
|
||||||
|
|
||||||
|
float4 s0 = floor(b0) * 2.0 + 1.0;
|
||||||
|
float4 s1 = floor(b1) * 2.0 + 1.0;
|
||||||
|
float4 sh = -step(h, float4(0, 0, 0, 0));
|
||||||
|
|
||||||
|
float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
|
||||||
|
float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
|
||||||
|
|
||||||
|
float3 p0 = float3(a0.xy, h.x);
|
||||||
|
float3 p1 = float3(a0.zw, h.y);
|
||||||
|
float3 p2 = float3(a1.xy, h.z);
|
||||||
|
float3 p3 = float3(a1.zw, h.w);
|
||||||
|
|
||||||
|
float4 norm = taylorInvSqrt(float4(dot(p0,p0), dot(p1,p1), dot(p2,p2), dot(p3,p3)));
|
||||||
|
p0 *= norm.x;
|
||||||
|
p1 *= norm.y;
|
||||||
|
p2 *= norm.z;
|
||||||
|
p3 *= norm.w;
|
||||||
|
|
||||||
|
float4 m = max(0.6 - float4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);
|
||||||
|
m = m * m;
|
||||||
|
return 42.0 * dot(m * m, float4(dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3)));
|
||||||
|
}
|
||||||
|
|
||||||
|
v2f vert(appdata v)
|
||||||
|
{
|
||||||
|
v2f o;
|
||||||
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
|
o.uv = v.uv;
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
float4 frag(v2f i) : SV_Target
|
||||||
|
{
|
||||||
|
float time = _Time.y * _Speed;
|
||||||
|
|
||||||
|
// UV: x wraps around cylinder, y goes along length
|
||||||
|
float2 uv = i.uv;
|
||||||
|
|
||||||
|
// Flow along the cylinder length
|
||||||
|
float flow = uv.y + time * _FlowDir * 0.2;
|
||||||
|
|
||||||
|
// Wispy tendrils flowing along the cylinder
|
||||||
|
float3 p = float3(uv.x * _Scale, flow * _Scale, time * 0.1);
|
||||||
|
|
||||||
|
float n1 = snoise(p); // 1
|
||||||
|
float n2 = snoise(p * 1.7 + float3(5.2, time * 0.15, 1.3)); // 2
|
||||||
|
float n3 = snoise(p * 0.5 + float3(time * 0.1, 3.1, 7.4)); // 3
|
||||||
|
|
||||||
|
// Wisp pattern - creates streaky tendrils
|
||||||
|
float wispAngle = uv.x * _Wisps * 6.2831;
|
||||||
|
float wisp = sin(wispAngle + n1 * 3.0 + flow * 4.0) * 0.5 + 0.5;
|
||||||
|
wisp = pow(wisp, 3.0);
|
||||||
|
|
||||||
|
// Combine noise layers
|
||||||
|
float pattern = wisp * (n2 * 0.5 + 0.5);
|
||||||
|
pattern += pow(max(0, n3 * 0.5 + 0.5), 2.0) * 0.3;
|
||||||
|
|
||||||
|
// Pulsing hotspots that travel along the cylinder
|
||||||
|
float pulse = snoise(float3(uv.x * 2.0, flow * 2.0, time * 0.3)); // 4
|
||||||
|
float hotspot = pow(saturate(pulse), 4.0);
|
||||||
|
|
||||||
|
// Radial fade - fade out at edges of cylinder (using X as wrap-around)
|
||||||
|
float radialDist = abs(uv.x - 0.5) * 2.0;
|
||||||
|
float radialFade = pow(1.0 - saturate(radialDist), _FadeEdge);
|
||||||
|
|
||||||
|
// End caps fade - fade near top and bottom of cylinder
|
||||||
|
float endFade = smoothstep(0.0, _FadeEnds, uv.y) * smoothstep(1.0, 1.0 - _FadeEnds, uv.y);
|
||||||
|
|
||||||
|
// Color
|
||||||
|
float3 col = lerp(_FlareColor.rgb, _HotColor.rgb, hotspot + pattern * 0.3);
|
||||||
|
col *= _Intensity;
|
||||||
|
|
||||||
|
float alpha = pattern * radialFade * endFade + hotspot * radialFade * endFade * 2.0;
|
||||||
|
alpha = saturate(alpha);
|
||||||
|
|
||||||
|
return float4(col * alpha, 1.0);
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e44218cd855f4eada13a6505c3c577f2
|
||||||
|
ShaderImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
defaultTextures: []
|
||||||
|
nonModifiableTextures: []
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -447,7 +447,7 @@ Camera:
|
|||||||
width: 1
|
width: 1
|
||||||
height: 1
|
height: 1
|
||||||
near clip plane: 0.3
|
near clip plane: 0.3
|
||||||
far clip plane: 4000
|
far clip plane: 15000
|
||||||
field of view: 60
|
field of view: 60
|
||||||
orthographic: 0
|
orthographic: 0
|
||||||
orthographic size: 5
|
orthographic size: 5
|
||||||
|
|||||||
Executable → Regular
File mode changed.
@@ -38,7 +38,7 @@ RenderSettings:
|
|||||||
m_ReflectionIntensity: 1
|
m_ReflectionIntensity: 1
|
||||||
m_CustomReflection: {fileID: 0}
|
m_CustomReflection: {fileID: 0}
|
||||||
m_Sun: {fileID: 263013886}
|
m_Sun: {fileID: 263013886}
|
||||||
m_IndirectSpecularColor: {r: 0.018997872, g: 0.012967637, b: 0.012967637, a: 1}
|
m_IndirectSpecularColor: {r: 0.026302574, g: 0.016013645, b: 0.017024336, a: 1}
|
||||||
m_UseRadianceAmbientProbe: 0
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
@@ -165,6 +165,7 @@ GameObject:
|
|||||||
- component: {fileID: 263013887}
|
- component: {fileID: 263013887}
|
||||||
- component: {fileID: 263013886}
|
- component: {fileID: 263013886}
|
||||||
- component: {fileID: 263013885}
|
- component: {fileID: 263013885}
|
||||||
|
- component: {fileID: 263013888}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Directional Light
|
m_Name: Directional Light
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -206,7 +207,7 @@ Light:
|
|||||||
serializedVersion: 10
|
serializedVersion: 10
|
||||||
m_Type: 1
|
m_Type: 1
|
||||||
m_Shape: 0
|
m_Shape: 0
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 0.9396224, g: 0.45192745, b: 0.374963, a: 1}
|
||||||
m_Intensity: 1.65
|
m_Intensity: 1.65
|
||||||
m_Range: 10
|
m_Range: 10
|
||||||
m_SpotAngle: 30
|
m_SpotAngle: 30
|
||||||
@@ -272,6 +273,21 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 73.696, y: 125.901, z: 236.532}
|
m_LocalEulerAnglesHint: {x: 73.696, y: 125.901, z: 236.532}
|
||||||
|
--- !u!114 &263013888
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 263013884}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a72f06e9fb1242edad819207c87af405, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
baseIntensity: 8
|
||||||
|
flickerAmount: 2
|
||||||
|
speed: 0.2
|
||||||
--- !u!1001 &286157496
|
--- !u!1001 &286157496
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -575,8 +591,9 @@ GameObject:
|
|||||||
- component: {fileID: 705507995}
|
- component: {fileID: 705507995}
|
||||||
- component: {fileID: 705507994}
|
- component: {fileID: 705507994}
|
||||||
- component: {fileID: 705507997}
|
- component: {fileID: 705507997}
|
||||||
|
- component: {fileID: 800000024}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Directional Light
|
m_Name: TopStarLight
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -817,6 +834,404 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
|
m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!1 &800000001
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 800000002}
|
||||||
|
- component: {fileID: 800000003}
|
||||||
|
- component: {fileID: 800000004}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RedStar
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 1
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &800000002
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 800000001}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||||
|
m_LocalPosition: {x: 1000, y: -1182, z: -1888}
|
||||||
|
m_LocalScale: {x: 11774.28, y: 11774.28, z: 11774.28}
|
||||||
|
m_ConstrainProportionsScale: 1
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||||
|
--- !u!33 &800000003
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 800000001}
|
||||||
|
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &800000004
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 800000001}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 0
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 2
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 0
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 55586690bd6b4a6ca0646858c09cdd6e, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 0.01
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 2
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!1 &800000006
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 800000007}
|
||||||
|
- component: {fileID: 800000008}
|
||||||
|
- component: {fileID: 800000009}
|
||||||
|
- component: {fileID: 800000014}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RedStarLight
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 1
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &800000007
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 800000006}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.9659258, y: 0, z: 0, w: 0.258819}
|
||||||
|
m_LocalPosition: {x: 1000, y: -500, z: -1000}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 150, y: 0, z: 0}
|
||||||
|
--- !u!108 &800000008
|
||||||
|
Light:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 800000006}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 10
|
||||||
|
m_Type: 1
|
||||||
|
m_Shape: 0
|
||||||
|
m_Color: {r: 0.60943377, g: 0.11870645, b: 0.056918245, a: 1}
|
||||||
|
m_Intensity: 7.12
|
||||||
|
m_Range: 8000
|
||||||
|
m_SpotAngle: 30
|
||||||
|
m_InnerSpotAngle: 21.80208
|
||||||
|
m_CookieSize: 10
|
||||||
|
m_Shadows:
|
||||||
|
m_Type: 0
|
||||||
|
m_Resolution: -1
|
||||||
|
m_CustomResolution: -1
|
||||||
|
m_Strength: 1
|
||||||
|
m_Bias: 0.05
|
||||||
|
m_NormalBias: 0.4
|
||||||
|
m_NearPlane: 0.2
|
||||||
|
m_CullingMatrixOverride:
|
||||||
|
e00: 1
|
||||||
|
e01: 0
|
||||||
|
e02: 0
|
||||||
|
e03: 0
|
||||||
|
e10: 0
|
||||||
|
e11: 1
|
||||||
|
e12: 0
|
||||||
|
e13: 0
|
||||||
|
e20: 0
|
||||||
|
e21: 0
|
||||||
|
e22: 1
|
||||||
|
e23: 0
|
||||||
|
e30: 0
|
||||||
|
e31: 0
|
||||||
|
e32: 0
|
||||||
|
e33: 1
|
||||||
|
m_UseCullingMatrixOverride: 0
|
||||||
|
m_Cookie: {fileID: 0}
|
||||||
|
m_DrawHalo: 1
|
||||||
|
m_Flare: {fileID: 0}
|
||||||
|
m_RenderMode: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_Lightmapping: 1
|
||||||
|
m_LightShadowCasterMode: 0
|
||||||
|
m_AreaSize: {x: 1, y: 1}
|
||||||
|
m_BounceIntensity: 3
|
||||||
|
m_ColorTemperature: 3500
|
||||||
|
m_UseColorTemperature: 1
|
||||||
|
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_UseBoundingSphereOverride: 0
|
||||||
|
m_UseViewFrustumForShadowCasterCull: 1
|
||||||
|
m_ShadowRadius: 0
|
||||||
|
m_ShadowAngle: 0
|
||||||
|
--- !u!114 &800000009
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 800000006}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Version: 3
|
||||||
|
m_UsePipelineSettings: 1
|
||||||
|
m_AdditionalLightsShadowResolutionTier: 2
|
||||||
|
m_LightLayerMask: 1
|
||||||
|
m_RenderingLayers: 1
|
||||||
|
m_CustomShadowLayers: 0
|
||||||
|
m_ShadowLayerMask: 1
|
||||||
|
m_ShadowRenderingLayers: 1
|
||||||
|
m_LightCookieSize: {x: 1, y: 1}
|
||||||
|
m_LightCookieOffset: {x: 0, y: 0}
|
||||||
|
m_SoftShadowQuality: 0
|
||||||
|
--- !u!114 &800000014
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 800000006}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a72f06e9fb1242edad819207c87af405, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
baseIntensity: 12
|
||||||
|
flickerAmount: 3
|
||||||
|
speed: 0.22
|
||||||
|
--- !u!114 &800000024
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 705507993}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a72f06e9fb1242edad819207c87af405, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
baseIntensity: 8
|
||||||
|
flickerAmount: 2
|
||||||
|
speed: 1.2
|
||||||
|
--- !u!1 &800000030
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 800000031}
|
||||||
|
- component: {fileID: 800000032}
|
||||||
|
- component: {fileID: 800000033}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: SolarFlare
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &800000031
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 800000030}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 970, y: 569, z: 0.0015134}
|
||||||
|
m_LocalScale: {x: 11829.856, y: 1500.4639, z: 15476.808}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &800000032
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 800000030}
|
||||||
|
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &800000033
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 800000030}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 0
|
||||||
|
m_ReflectionProbeUsage: 0
|
||||||
|
m_RayTracingMode: 0
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 08c186d972d6480287ccbdf019a7ad51, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 2
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!1 &1009813856
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1009813859}
|
||||||
|
- component: {fileID: 1009813858}
|
||||||
|
- component: {fileID: 1009813857}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RedStar (1)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 1
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!23 &1009813857
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1009813856}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 0
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 2
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 0
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 55586690bd6b4a6ca0646858c09cdd6e, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 0.01
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 2
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!33 &1009813858
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1009813856}
|
||||||
|
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!4 &1009813859
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1009813856}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||||
|
m_LocalPosition: {x: 1000, y: 2424, z: -64}
|
||||||
|
m_LocalScale: {x: 11774.28, y: 11774.28, z: 11774.28}
|
||||||
|
m_ConstrainProportionsScale: 1
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||||
--- !u!114 &1088368772 stripped
|
--- !u!114 &1088368772 stripped
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_CorrespondingSourceObject: {fileID: 8438506523596255020, guid: dcb64e3a91f1fec7ab6098f4f407830b, type: 3}
|
m_CorrespondingSourceObject: {fileID: 8438506523596255020, guid: dcb64e3a91f1fec7ab6098f4f407830b, type: 3}
|
||||||
@@ -1367,6 +1782,10 @@ PrefabInstance:
|
|||||||
propertyPath: shipControls
|
propertyPath: shipControls
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1972710421}
|
objectReference: {fileID: 1972710421}
|
||||||
|
- target: {fileID: 5731929726813851803, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
|
||||||
|
propertyPath: m_Enabled
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 9074617566735061565, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
|
- target: {fileID: 9074617566735061565, guid: ebed5434f18ca13e38d2d7bfcc18d6c3, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 3
|
value: 3
|
||||||
@@ -1528,6 +1947,10 @@ SceneRoots:
|
|||||||
- {fileID: 5198188376350273124}
|
- {fileID: 5198188376350273124}
|
||||||
- {fileID: 766862834}
|
- {fileID: 766862834}
|
||||||
- {fileID: 137910247}
|
- {fileID: 137910247}
|
||||||
- {fileID: 263013887}
|
|
||||||
- {fileID: 286157496}
|
- {fileID: 286157496}
|
||||||
- {fileID: 1197749570}
|
- {fileID: 1197749570}
|
||||||
|
- {fileID: 800000002}
|
||||||
|
- {fileID: 1009813859}
|
||||||
|
- {fileID: 800000007}
|
||||||
|
- {fileID: 263013887}
|
||||||
|
- {fileID: 800000031}
|
||||||
Executable → Regular
File mode changed.
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
File mode changed.
BIN
Binary file not shown.
Executable → Regular
-13
@@ -93,19 +93,6 @@ TextureImporter:
|
|||||||
ignorePlatformSupport: 0
|
ignorePlatformSupport: 0
|
||||||
androidETC2FallbackOverride: 0
|
androidETC2FallbackOverride: 0
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Windows Store Apps
|
|
||||||
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: 3
|
- serializedVersion: 3
|
||||||
buildTarget: Server
|
buildTarget: Server
|
||||||
maxTextureSize: 2048
|
maxTextureSize: 2048
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class FlickerLight : MonoBehaviour {
|
||||||
|
[SerializeField] float baseIntensity = 8f;
|
||||||
|
[SerializeField] float flickerAmount = 2f;
|
||||||
|
[SerializeField] float speed = 1.5f;
|
||||||
|
|
||||||
|
Light _light;
|
||||||
|
float _offset;
|
||||||
|
|
||||||
|
void Start() {
|
||||||
|
_light = GetComponent<Light>();
|
||||||
|
if (_light) baseIntensity = _light.intensity;
|
||||||
|
_offset = Random.value * 100f;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Update() {
|
||||||
|
if (!_light) return;
|
||||||
|
|
||||||
|
float t = Time.time * speed + _offset;
|
||||||
|
float noise = Mathf.PerlinNoise(t, _offset) * 2f - 1f;
|
||||||
|
noise += (Mathf.PerlinNoise(t * 2.7f, _offset + 50f) * 2f - 1f) * 0.4f;
|
||||||
|
|
||||||
|
_light.intensity = baseIntensity + noise * flickerAmount;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a72f06e9fb1242edad819207c87af405
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Reference in new issue
Block a user