Fix Dithered Particle Shader
Dithered Particles were completely busted for some reason, replaced with new shader that works properly Fade out stardust at arena limits
This commit is contained in:
parent
d61d2f19ed
commit
5ceb23f5f9
4 changed files with 73 additions and 55 deletions
|
|
@ -135,7 +135,8 @@ void UpdateParticles(uint3 id : SV_DispatchThreadID, int3 groupID : SV_GroupThre
|
|||
float noise;
|
||||
const float3 flowDir = flow(particles[id.x].position, noise);
|
||||
particles[id.x].position += flowDir * (lifetime * noise);
|
||||
const float fade = smoothstep(0,ceilingHeight, particles[id.x].position.y);
|
||||
const float d = pow(density(particles[id.x].position) + .01, 0.1);
|
||||
particles[id.x].size = lerp(minimumSize, maximumSize, saturate(RandomValue())) * parabola(lifetime, 2);
|
||||
particles[id.x].size = lerp(minimumSize, maximumSize, saturate(RandomValue()*fade)) * parabola(lifetime, 2);
|
||||
particles[id.x].color = HueTexture.SampleLevel(samplerHueTexture, float2(RandomValue(), 0.0f), 0.0f).rgb * d;
|
||||
}
|
||||
Loading…
Reference in a new issue