2 #define SRC(...) #__VA_ARGS__ 6 float4x4 modelViewProj;
12 float4 VSMain(float4 position : POSITION, float2 texcoord : TEXCOORD0) : SV_POSITION
14 return mul(
global.modelViewProj, position);
17 float4 PSMain(float4 position : SV_POSITION) : SV_TARGET
19 float speed =
global.time * 4.0;
20 float2 uv = -1.0 + 2.0 * position.xy /
global.OutputSize;
22 float3
color = float3(0.0, 0.0, 0.0);
24 for(
int i=0; i < 8; i++ )
26 float pha =
sin(
float(i) * 546.13 + 1.0) * 0.5 + 0.5;
27 float siz =
pow(
sin(
float(i) * 651.74 + 5.0) * 0.5 + 0.5, 4.0);
28 float pox =
sin(
float(i) * 321.55 + 4.1) *
global.OutputSize.x /
global.OutputSize.y;
29 float rad = 0.1 + 0.5 * siz +
sin(pha + siz) / 4.0;
30 float2 pos = float2(pox +
sin(speed / 15. + pha + siz), - 1.0 - rad + (2.0 + 2.0 * rad) * frac(pha + 0.3 * (speed / 7.) * (0.2 + 0.8 * siz)));
31 float dis =
length(uv - pos);
34 float3
col = lerp(float3(0.194 *
sin(speed / 6.0) + 0.3, 0.2, 0.3 * pha), float3(1.1 *
sin(speed / 9.0) + 0.3, 0.2 * pha, 0.4), 0.5 + 0.5 *
sin(
float(i)));
35 color +=
col.zyx * (1.0 - smoothstep(rad * 0.15, rad, dis));
#define sqrt(x)
Definition: math.h:26
#define SRC(...)
Definition: bokeh_sm4.hlsl.h:2
time_t time(time_t *timer)
#define sin(x)
Definition: math.h:23
#define pow(x, y)
Definition: math.h:22
u32 col
Definition: gx_regdef.h:5093
GLuint color
Definition: glext.h:6883
Definition: retroarch.h:240
GLenum GLuint GLenum GLsizei length
Definition: glext.h:6233