Gateway destinations (#21040)
* Gateway generation * Gateway stuff * gatewehs * mercenaries * play area * Range fixes and tweaks * weh * Gateway UI polish * Lots of fixes * Knock some items off * Fix dungeon spawning Realistically we should probably be using a salvage job. * wahwah * wehvs * expression * weh * eee * a * a * WEH * frfr * Gatwey * Fix gateway windows * Fix gateway windows * a * a * Better layer masking * a * a * Noise fixes * a * Fix fractal calculations * a * More fixes * Fixes * Add layers back in * Fixes * namespaces and ftl * Other TODO * Fix distance * Cleanup * Fix test
This commit is contained in:
27
Resources/Textures/Shaders/world_gradient_circle.swsl
Normal file
27
Resources/Textures/Shaders/world_gradient_circle.swsl
Normal file
@@ -0,0 +1,27 @@
|
||||
// Has 2 circles, an inner one that is unaffected and an outer one.
|
||||
light_mode unshaded;
|
||||
|
||||
const highp vec4 color = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
// Position of the center in pixel terms.
|
||||
uniform highp vec2 position;
|
||||
uniform highp float maxRange;
|
||||
uniform highp float minRange;
|
||||
uniform highp float bufferRange;
|
||||
uniform highp float gradient;
|
||||
|
||||
void fragment() {
|
||||
highp float distance = length(FRAGCOORD.xy - position);
|
||||
|
||||
if (distance > maxRange) {
|
||||
discard;
|
||||
}
|
||||
else if (distance < minRange) {
|
||||
COLOR = color;
|
||||
}
|
||||
else {
|
||||
|
||||
highp float ratio = 1.0 - pow((distance - minRange) / bufferRange, gradient);
|
||||
COLOR = vec4(color.x, color.y, color.z, ratio);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user