Skip to content

Commit

Permalink
Merge pull request TheOfficialFloW#338 from rsn8887/master
Browse files Browse the repository at this point in the history
add “sharp bilinear without scanlines” filter
  • Loading branch information
TheOfficialFloW committed Oct 8, 2018
2 parents 3759ee1 + f7bcab6 commit 49eb41a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
14 changes: 14 additions & 0 deletions user/includes/sharp_bilinear_simple_f.h
@@ -0,0 +1,14 @@
/*
This file was autogenerated by raw2c.
Visit http://www.devkitpro.org
*/

//---------------------------------------------------------------------------------
#ifndef _sharp_bilinear_simple_f_h_
#define _sharp_bilinear_simple_f_h_
//---------------------------------------------------------------------------------
extern const unsigned char sharp_bilinear_simple_f[];
extern const int sharp_bilinear_simple_f_size;
//---------------------------------------------------------------------------------
#endif //_sharp_bilinear_simple_f_h_
//---------------------------------------------------------------------------------
14 changes: 14 additions & 0 deletions user/includes/sharp_bilinear_simple_v.h
@@ -0,0 +1,14 @@
/*
This file was autogenerated by raw2c.
Visit http://www.devkitpro.org
*/

//---------------------------------------------------------------------------------
#ifndef _sharp_bilinear_simple_v_h_
#define _sharp_bilinear_simple_v_h_
//---------------------------------------------------------------------------------
extern const unsigned char sharp_bilinear_simple_v[];
extern const int sharp_bilinear_simple_v_size;
//---------------------------------------------------------------------------------
#endif //_sharp_bilinear_simple_v_h_
//---------------------------------------------------------------------------------
7 changes: 6 additions & 1 deletion user/menu.c
Expand Up @@ -52,6 +52,8 @@
#include "includes/bicubic_f.h"
#include "includes/sharp_bilinear_f.h"
#include "includes/sharp_bilinear_v.h"
#include "includes/sharp_bilinear_simple_f.h"
#include "includes/sharp_bilinear_simple_v.h"
#include "includes/advanced_aa_v.h"
#include "includes/advanced_aa_f.h"
#include "includes/vflux_f.h"
Expand Down Expand Up @@ -79,7 +81,7 @@ static float flux_colors[] = {
0.0f, 0.0f, 0.0f, 0.0f // Black
};

static char *graphics_options[] = { "Original", "Bilinear", "Sharp bilinear", "Advanced AA", "LCD3x" };
static char *graphics_options[] = { "Original", "Bilinear", "Sharp bilinear", "Advanced AA", "LCD3x", "Sharp bilinear without scanlines" };
static char *flux_mode_options[] = { "None", "Yellow", "Blue", "Black" };
static char *no_yes_options[] = { "No", "Yes" };
static char *yes_no_options[] = { "Yes", "No" };
Expand Down Expand Up @@ -403,6 +405,7 @@ int AdrenalineDraw(SceSize args, void *argp) {
vita2d_shader *sharp_shader = vita2d_create_shader((SceGxmProgram *)sharp_bilinear_v, (SceGxmProgram *)sharp_bilinear_f);
vita2d_shader *advanced_aa_shader = vita2d_create_shader((SceGxmProgram *)advanced_aa_v, (SceGxmProgram *)advanced_aa_f);
vita2d_shader *lcd3x_shader = vita2d_create_shader((SceGxmProgram *)lcd3x_v, (SceGxmProgram *)lcd3x_f);
vita2d_shader *sharp_simple_shader = vita2d_create_shader((SceGxmProgram *)sharp_bilinear_simple_v, (SceGxmProgram *)sharp_bilinear_simple_f);

// f.lux shader
vita2d_shader *flux_shader = vita2d_create_shader_untextured((SceGxmProgram *)gxm_program_vflux_v, (SceGxmProgram *)gxm_program_vflux_f);
Expand Down Expand Up @@ -539,6 +542,8 @@ int AdrenalineDraw(SceSize args, void *argp) {
shader = advanced_aa_shader;
else if (config.graphics_filtering == 4)
shader = lcd3x_shader;
else if (config.graphics_filtering == 5)
shader = sharp_simple_shader;
else
shader = opaque_shader;

Expand Down

0 comments on commit 49eb41a

Please sign in to comment.