diff --git a/Assets/Audio/Audio Visualiser.asset b/Assets/Audio/Audio Visualiser.asset index 0f0dcd0..0222e0b 100644 --- a/Assets/Audio/Audio Visualiser.asset +++ b/Assets/Audio/Audio Visualiser.asset @@ -28,7 +28,7 @@ MonoBehaviour: multiplier: -500 channel: 1 sample: 525 - - name: _SkyWeight + - name: _AudioSample1 multiplier: -500 channel: 1 sample: 400 diff --git a/Assets/Materials/Enemy.mat b/Assets/Materials/Enemy.mat index c983e1a..54d24f0 100644 --- a/Assets/Materials/Enemy.mat +++ b/Assets/Materials/Enemy.mat @@ -120,8 +120,8 @@ Material: m_Colors: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1} - - _Color1: {r: 1, g: 0, b: 0.009225845, a: 1} - - _Color2: {r: 0, g: 1, b: 0.9568691, a: 1} + - _Color1: {r: 0, g: 0.0323627, b: 1, a: 1} + - _Color2: {r: 1, g: 0, b: 0.4276967, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _FarColor: {r: 0, g: 0.06666667, b: 0.006862745, a: 0} - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/Shaders/enemy.shader b/Assets/Shaders/enemy.shader index f18bf95..3361bbc 100644 --- a/Assets/Shaders/enemy.shader +++ b/Assets/Shaders/enemy.shader @@ -183,7 +183,7 @@ Shader "custom/enemy" float4 c = _Color1; c = lerp(_Color1, _Color2, length(p)); - c = lerp(c, _FarColor, normalised); + c = lerp(c, _FarColor, normalised * _Intensity); // float distanceAhead = IN.wpos.z - 6; // float ca = clamp(distanceAhead * 0.1,0,1); diff --git a/Assets/Shaders/obstacle.shader b/Assets/Shaders/obstacle.shader index 482a649..efc08e2 100644 --- a/Assets/Shaders/obstacle.shader +++ b/Assets/Shaders/obstacle.shader @@ -267,7 +267,7 @@ Shader "custom/obstacle" float noise = SAMPLE_TEXTURE2D(_NoiseMap, sampler_NoiseMap, IN.wpos.yz); // c *= noise; - c = lerp(c, _FarColor, _DistanceToNextBeat + noise); + c = lerp(c, _FarColor, (_DistanceToNextBeat*_Intensity + noise)); c.a = 0.0; return c; diff --git a/Assets/Shaders/tunnel.shader b/Assets/Shaders/tunnel.shader index 2bdb960..c6811f5 100644 --- a/Assets/Shaders/tunnel.shader +++ b/Assets/Shaders/tunnel.shader @@ -40,6 +40,8 @@ Shader "custom/tunnel" _OuterCircleThickness("Outer Circle Thickness", Range(0,1.0)) = 0.1 _Intensity("Intensity", Range(0,1.0)) = 1.0 + _AudioSample1("Audio Sample 1", Float) = 0.0 + _NebulaMap("Nebula Map", 2D) = "black" _StarMap("Star Map", 2D) = "black" _FractalMap("Fractal Map", 2D) = "black" @@ -120,6 +122,8 @@ Shader "custom/tunnel" float _PlayerXPos; float _PlayerXMove; float _TrackWidth = 20; + + float _AudioSample1; TEXTURE2D(_NebulaMap); SAMPLER(sampler_NebulaMap); @@ -337,9 +341,9 @@ Shader "custom/tunnel" // sky float4 sky = _BackgroundColor; - sky += f * _FractalColor; // fractal - sky += s * _StarsColor; // stars - float4 clouds = n * _CloudColor; + sky += f * _FractalColor * _Intensity * (_DistanceSinceLastBeat*_DistanceToNextBeat); // fractal + sky += s * _StarsColor * _Intensity; // stars + float4 clouds = n * _CloudColor * _DistanceToNextBeat * _Intensity; clouds *= (1.0-g); // mask out ground sky += clouds; sky *= (1.0-g); // mask out ground @@ -359,6 +363,7 @@ Shader "custom/tunnel" // ground_color = lerp(ground_color, ground_fast, ground_fast); ground_color+= ground_fast; ground_color *= _GroundColor; + ground_color *= 1.0+_DistanceToNextBeat * _Intensity * (1.0+_AudioSample1); color = max(color, ground_color); // bars