16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 08:09:19 +02:00

motion blur

This commit is contained in:
milek7
2018-07-23 01:22:36 +02:00
parent cfb066f678
commit d5ce1d57e7
32 changed files with 358 additions and 159 deletions

View File

@@ -2,6 +2,9 @@
#include <common>
in vec4 f_clip_pos;
in vec4 f_clip_future_pos;
void main()
{
float x = (gl_PointCoord.x - 0.5f) * 2.0f;
@@ -9,5 +12,11 @@ void main()
float dist2 = abs(x * x + y * y);
if (dist2 > 0.5f * 0.5f)
discard;
gl_FragColor = vec4(param[0].rgb * emission, 1.0f);
gl_FragData[0] = vec4(param[0].rgb * emission, 1.0f);
{
vec2 a = (f_clip_future_pos.xy / f_clip_future_pos.w) * 0.5 + 0.5;;
vec2 b = (f_clip_pos.xy / f_clip_pos.w) * 0.5 + 0.5;;
gl_FragData[1] = vec4(a - b, 0.0f, 0.0f);
}
}