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);
18 static const float atime = (
global.time + 1.0) / 4.0;
22 return frac(
sin(
dot(co.xy, float2(12.9898, 78.233))) * 43758.5453);
25 float rand_float(
float x)
27 return rand(float2(
x, 1.0));
30 float snow(float3 pos, float2 uv,
float o)
32 float2 d = (pos.xy - uv);
33 float a = atan(d.y / d.x) +
sin(atime*1.0 + o) * 10.0;
35 float dist = d.x*d.x + d.y*d.y;
37 if(dist < pos.z/400.0)
40 if(
sin(
a * 8.0) < 0.0)
44 if(dist < pos.z/800.0)
57 for (
int i = 1; i < 15; i++)
59 float o = rand_float(
float(i) / 3.0) * 15.0;
60 float z = rand_float(
float(i) + 13.0);
61 float x = 1.8 - (3.6) * (rand_float(
floor((
global.time*((
z + 1.0) / 2.0) +o) / 2.0)) +
sin(
global.time * o /1000.0) / 10.0);
62 float y = 1.0 - fmod((
global.time * ((
z + 1.0)/2.0)) + o, 2.0);
70 float4 PSMain(float4 position : SV_POSITION) : SV_TARGET
72 float2 uv = position.xy /
global.OutputSize.xy;
79 return float4(
c,
c,
c,
c);
#define SRC(...)
Definition: snowflake_sm4.hlsl.h:2
#define floor(x)
Definition: math.h:25
GLdouble GLdouble z
Definition: glext.h:6514
const GLubyte * c
Definition: glext.h:9812
std::shared_ptr< Ope > dot()
Definition: peglib.h:1603
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
time_t time(time_t *timer)
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
GLfloat GLfloat p
Definition: glext.h:9809
#define sin(x)
Definition: math.h:23
u32 col
Definition: gx_regdef.h:5093
GLuint color
Definition: glext.h:6883
Definition: retroarch.h:240
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844