From 829f8612c457c6f93ecd15b309e1e32371786efe Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Mon, 11 Jan 2021 04:36:35 +0000 Subject: [PATCH] shader/material tweaks --- Assets/Materials/Ship.mat | 2 +- Assets/Shaders/obstacle.shader | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Assets/Materials/Ship.mat b/Assets/Materials/Ship.mat index ec86b5d..defadf2 100644 --- a/Assets/Materials/Ship.mat +++ b/Assets/Materials/Ship.mat @@ -115,7 +115,7 @@ Material: - _Color1: {r: 0, g: 0.48155433, b: 0.5377358, a: 1} - _Color2: {r: 1.2078432, g: 0, b: 1.1058824, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _FlashColor: {r: 0, g: 0, b: 0, a: 1} + - _FlashColor: {r: 7.999999, g: 7.999999, b: 7.999999, a: 1} - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} m_BuildTextureStacks: [] --- !u!114 &1642389398374086642 diff --git a/Assets/Shaders/obstacle.shader b/Assets/Shaders/obstacle.shader index f9eb61e..813c1fa 100644 --- a/Assets/Shaders/obstacle.shader +++ b/Assets/Shaders/obstacle.shader @@ -33,7 +33,7 @@ Shader "custom/obstacle" Pass { -// Blend OneMinusDstColor OneMinusSrcAlpha + Blend OneMinusDstColor OneMinusSrcAlpha // Blend SrcAlpha HLSLPROGRAM @@ -259,8 +259,12 @@ Shader "custom/obstacle" float normalised = IN.wpos.z/500.0; // float4 c = float4(lerp(_Color1, _Color2, t).xyz, _Alpha); float4 c = _Color1; - c *= tape_noise(IN.polar/0.00005); - c = lerp(c, _FarColor, _DistanceToNextBeat); + //c *= tape_noise(IN.polar/0.00005); + float noise = SAMPLE_TEXTURE2D(_NoiseMap, sampler_NoiseMap, IN.wpos.yz); + // c *= noise; + + c = lerp(c, _FarColor, _DistanceToNextBeat + noise); + c.a = 0.0; return c; }