shader/material tweaks

This commit is contained in:
Cat Flynn 2021-01-11 04:36:35 +00:00
parent 73d3a6bfc2
commit 829f8612c4
2 changed files with 8 additions and 4 deletions

View File

@ -115,7 +115,7 @@ Material:
- _Color1: {r: 0, g: 0.48155433, b: 0.5377358, a: 1} - _Color1: {r: 0, g: 0.48155433, b: 0.5377358, a: 1}
- _Color2: {r: 1.2078432, g: 0, b: 1.1058824, a: 1} - _Color2: {r: 1.2078432, g: 0, b: 1.1058824, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, 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} - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: [] m_BuildTextureStacks: []
--- !u!114 &1642389398374086642 --- !u!114 &1642389398374086642

View File

@ -33,7 +33,7 @@ Shader "custom/obstacle"
Pass Pass
{ {
// Blend OneMinusDstColor OneMinusSrcAlpha Blend OneMinusDstColor OneMinusSrcAlpha
// Blend SrcAlpha // Blend SrcAlpha
HLSLPROGRAM HLSLPROGRAM
@ -259,8 +259,12 @@ Shader "custom/obstacle"
float normalised = IN.wpos.z/500.0; float normalised = IN.wpos.z/500.0;
// float4 c = float4(lerp(_Color1, _Color2, t).xyz, _Alpha); // float4 c = float4(lerp(_Color1, _Color2, t).xyz, _Alpha);
float4 c = _Color1; float4 c = _Color1;
c *= tape_noise(IN.polar/0.00005); //c *= tape_noise(IN.polar/0.00005);
c = lerp(c, _FarColor, _DistanceToNextBeat); float noise = SAMPLE_TEXTURE2D(_NoiseMap, sampler_NoiseMap, IN.wpos.yz);
// c *= noise;
c = lerp(c, _FarColor, _DistanceToNextBeat + noise);
c.a = 0.0;
return c; return c;
} }