Files
tbd-station-14/Resources/Textures/Shaders/radial_blur.swsl
slarticodefast 577f30fb13 Add haloperidol, potassium iodide (#27454)
* add haloperidol, potassium iodide

* review fixes

* review and tuning

* shader review

* use timespan and AutoPausedField
2024-08-03 03:12:08 +10:00

15 lines
532 B
Plaintext

uniform sampler2D SCREEN_TEXTURE;
uniform highp float Strength;
const highp int SampleCount = 10; // a higher number makes the shader look better, but has a big performance impact
// a simple radial blur
void fragment() {
highp vec2 uv = FRAGCOORD.xy * SCREEN_PIXEL_SIZE.xy;
highp vec2 direction = vec2(0.5, 0.5) - uv;
for (int i=1; i <= SampleCount; i++)
{
COLOR += zTextureSpec(SCREEN_TEXTURE, uv + float(i) * Strength / float(SampleCount) * direction);
}
COLOR = COLOR / float(SampleCount);
}