Bladeren bron

neercs: fixed scanline, added a new theme

master
rez Sam Hocevar <sam@hocevar.net> 12 jaren geleden
bovenliggende
commit
1f8f743e24
2 gewijzigde bestanden met toevoegingen van 76 en 17 verwijderingen
  1. +5
    -2
      neercs/video/postfx.lolfx
  2. +71
    -15
      neercs/video/render.cpp

+ 5
- 2
neercs/video/postfx.lolfx Bestand weergeven

@@ -92,8 +92,11 @@ void main(void)
if(k>r_p&&k<r_p+r_h) r=mix(c3,c4,(k-r_p)*(1/r_h));
if(k>=r_p+r_h) r=mix(c4,c5,k*((k-(r_p+r_h))/(r_p-r_h)));

c*=moire_h.x+moire_h.y*sin(z.y*float(angle.y*moire_h.z)/ratio_2d.y+PI); // moire h
c*=moire_v.x+moire_v.y*sin(z.x*float(angle.x*moire_v.z)/ratio_2d.x+PI); // moire v
//c*=moire_h.x+moire_h.y*sin(z.y*float(screen_size.y*moire_h.z)/ratio_2d.y)*sin(0.5+z.x*float(screen_size.x*moire_h.w)/ratio_2d.x); // moire h
//c*=moire_v.x+moire_v.y*sin(z.x*float(screen_size.x*moire_v.z)/ratio_2d.x)*sin(0.5+z.y*float(screen_size.y*moire_v.w)/ratio_2d.y); // moire v

c*=moire_h.x+moire_h.y*sin(z.y*float(angle.y*moire_h.z)/ratio_2d.y)*sin(PI+z.x*float(screen_size.x*moire_h.w)/ratio_2d.x); // moire h
c*=moire_v.x+moire_v.y*sin(z.x*float(angle.x*moire_v.z)/ratio_2d.x)*sin(PI+z.y*float(screen_size.y*moire_v.w)/ratio_2d.y); // moire v
c*=scanline_h.x+scanline_h.y*cos(z.y*float(angle.y*scanline_h.z+scanline_h.w)/ratio_2d.y); // scanline h
c*=scanline_v.x+scanline_v.y*cos(z.x*float(angle.x*scanline_v.z+scanline_v.w)/ratio_2d.x); // scanline v
c+=r*gradient.z; // gradient


+ 71
- 15
neercs/video/render.cpp Bestand weergeven

@@ -129,7 +129,7 @@ vec4 mirror; // mirror [width,height,strength,ratio]
vec4 radial; // radial [distance,fade ratio,iteration,strength]
/* theme variable */
int theme_i = 0; // current theme
const int theme_n = 4; // theme number
const int theme_n = 5; // theme number
int theme_var_key = 0; // theme array key
/* setup variable */
bool setup_switch = false; // switch [option/item]
@@ -528,8 +528,8 @@ float theme_var[]={
8.0f,0.25f,0.75f,0.2f, // postfx_glass
0,0,0,0,
0,
0.75f,0.0f,0.0f,0.0f, // postfx_moire_h
0.75f,-0.25f,0.25f,0.5f, // postfx_moire_v
1.0f,0.0f,0.0f,0.0f, // postfx_moire_h
0.75f,-0.25f,0.25f,0.25f, // postfx_moire_v
0,
1.0f,0.0f,0.0f,0.0f, // postfx_scanline_h
0.75f,-0.25f,0.5f,0.0f, // postfx_scanline_v
@@ -566,8 +566,8 @@ float theme_var[]={
4.0f,4.0f,4.0f, // copper_mask_color
0,
0,
1.0f,0.75f,0.0f, // color_filter
1.0f,1.25f,0.2f,1.0f, // color_color
1.0f,0.7f,0.0f, // color_filter
1.0f,1.25f,0.1f,1.0f, // color_color
1.5f, // postfx_aberration
0,
1.0f,0.0f, // noise_offset
@@ -578,8 +578,8 @@ float theme_var[]={
1.0f,0.0f,0.0f,-0.25f, // postfx_ghost1
1.5f,0.0f,0.0f,0.25f, // postfx_ghost2
0,
0.5f,0.15f,0.05f, // postfx_gradient
0.8f,0.8f,0.8f, // postfx_gradient_color
0.0f,0.25f,0.1f, // postfx_gradient
0.25f,0.5f,0.5f, // postfx_gradient_color
0,0,
0,
8.0f,0.0f,0.0f,0.0f, // postfx_glass
@@ -602,8 +602,8 @@ float theme_var[]={
1,1, // border
0,0,0,0,
0,
0.4f,0.6f, // buffer
0.4f,0.6f, // remanence
0.7f,0.3f, // buffer
0.5f,0.5f, // remanence
0,0,0,0,
0,
0.5f,0.5f, // glow_mix
@@ -624,8 +624,8 @@ float theme_var[]={
0,
0,
1.0f,1.0f,0.9f, // color_filter
1.0f,1.15f,0.1f,0.25f, // color_color
2.0f, // postfx_aberration
1.15f,1.25f,-0.1f,0.25f, // color_color
3.0f, // postfx_aberration
0,
0.0f,0.0f, // noise_offset
0.15f, // noise_noise
@@ -635,8 +635,8 @@ float theme_var[]={
0.0f,0.0f,0.0f,0.0f, // postfx_ghost1
0.0f,0.0f,0.0f,0.0f, // postfx_ghost2
0,
0.5f,0.0f,0.0f , // postfx_gradient
0.0f,0.0f,0.0f, // postfx_gradient_color
0.25f,0.5f,0.1f , // postfx_gradient
0.7f,0.9f,1.0f, // postfx_gradient_color
0,0,
0,
8.0f,0.0f,0.0f,0.0f, // postfx_glass
@@ -645,8 +645,8 @@ float theme_var[]={
1.0f,0.0f,0.0f,0.0f, // postfx_moire_h
1.0f,0.0f,0.0f,0.0f, // postfx_moire_v
0,
0.80f,0.2f,0.75f,0.0f, // postfx_scanline_h
0.80f,0.2f,0.75f,0.0f, // postfx_scanline_v
0.75f,0.25f,0.7f,0.0f, // postfx_scanline_h
0.75f,0.25f,0.7f,0.0f, // postfx_scanline_v
0,
0.0f,0.0f,0.0f,1.0f, // mirror
0,0,0,0,
@@ -654,6 +654,62 @@ float theme_var[]={
4.0f,0.9f,1,0.0f, // radial
0,0,0,0,
/* granpa tv */
0,
2,2, // ratio_2d
2,2, // border
0,0,0,0,
0,
0.2f,0.8f, // buffer
0.6f,0.4f, // remanence
0,0,0,0,
0,
0.7f,0.3f, // glow_mix
3.0f,0.0f, // glow_large
1.5f,0.0f, // glow_small
0,0,
0,
0.5f,0.5f, // blur
0,0,0,0,0,0,
0,
1.0f,0.5f, // postfx_deform
0.1f,0.7f,0.84f, // postfx_corner
0.5f, // postfx_vignetting
0,0,
0,
0.75f,0.25f,0.42f,4.0f, // copper_copper
4.0f,4.0f,4.0f, // copper_mask_color
0,
0,
0.8f,0.85f,0.75f, // color_filter
1.0f,1.1f,1.0f,0.0f, // color_color
4.0f, // postfx_aberration
0,
1.0f,1.0f, // noise_offset
0.15f, // noise_noise
1.0f,1.0f,0.5f, // noise_retrace
0,0,
0,
1.0f,0.0f,0.0f,-0.25f, // postfx_ghost1
1.5f,0.0f,0.0f,0.25f, // postfx_ghost2
0,
0.5f,0.25f,0.05f, // postfx_gradient
0.9f,0.8f,0.5f, // postfx_gradient_color
0,0,
0,
8.0f,0.25f,0.75f,0.2f, // postfx_glass
0,0,0,0,
0,
1.0f,0.0f,0.0f,0.0f, // postfx_moire_h
0.75f,-0.25f,0.25f,0.25f, // postfx_moire_v
0,
1.0f,0.0f,0.0f,0.0f, // postfx_scanline_h
0.75f,-0.25f,0.5f,0.0f, // postfx_scanline_v
0,
0.95f,0.9f,0.5f,4.0f, // mirror
0,0,0,0,
0,
4.0f,0.9f,16,0.25f, // radial
0,0,0,0,
/* intex system 4000 */
0};



Laden…
Annuleren
Opslaan