mirror of
https://github.com/libretro/RetroArch
synced 2025-03-20 10:20:51 +00:00
Add old shader versions of XMB ribbon
This commit is contained in:
parent
5fbcb50b5e
commit
d7b3e9cc8f
@ -1,4 +1,4 @@
|
||||
static const char *stock_xmb =
|
||||
static const char *stock_xmb_simple =
|
||||
"struct input\n"
|
||||
"{\n"
|
||||
" float time;\n"
|
@ -0,0 +1,9 @@
|
||||
static const char *stock_fragment_xmb_simple =
|
||||
"#ifdef GL_ES\n"
|
||||
"precision mediump float;\n"
|
||||
"#endif\n"
|
||||
"uniform float time;\n"
|
||||
"void main()\n"
|
||||
"{\n"
|
||||
" gl_FragColor = vec4(1.0, 1.0, 1.0, 0.05);\n"
|
||||
"}\n";
|
@ -0,0 +1,34 @@
|
||||
static const char *stock_vertex_xmb_simple =
|
||||
"#if __VERSION__ >= 130\n"
|
||||
"#define COMPAT_VARYING out\n"
|
||||
"#define COMPAT_ATTRIBUTE in\n"
|
||||
"#else\n"
|
||||
"#define COMPAT_VARYING varying\n"
|
||||
"#define COMPAT_ATTRIBUTE attribute\n"
|
||||
"#endif\n"
|
||||
"COMPAT_ATTRIBUTE vec3 VertexCoord;\n"
|
||||
"uniform float time;\n"
|
||||
"float iqhash( float n )\n"
|
||||
"{\n"
|
||||
" return fract(sin(n)*43758.5453);\n"
|
||||
"}\n"
|
||||
"float noise( vec3 x )\n"
|
||||
"{\n"
|
||||
" vec3 p = floor(x);\n"
|
||||
" vec3 f = fract(x);\n"
|
||||
" f = f*f*(3.0-2.0*f);\n"
|
||||
" float n = p.x + p.y*57.0 + 113.0*p.z;\n"
|
||||
" return mix(mix(mix( iqhash(n+0.0 ), iqhash(n+1.0 ),f.x),\n"
|
||||
" mix( iqhash(n+57.0 ), iqhash(n+58.0 ),f.x),f.y),\n"
|
||||
" mix(mix( iqhash(n+113.0), iqhash(n+114.0),f.x),\n"
|
||||
" mix( iqhash(n+170.0), iqhash(n+171.0),f.x),f.y),f.z);\n"
|
||||
"}\n"
|
||||
"void main()\n"
|
||||
"{\n"
|
||||
" vec3 v = vec3(VertexCoord.x, 0.0, VertexCoord.y);\n"
|
||||
" vec3 v2 = v;\n"
|
||||
" v2.x = v2.x + time/2.0;\n"
|
||||
" v2.z = v.z * 3.0;\n"
|
||||
" v.y = -cos((v.x+v.z/3.0+time)*2.0)/10.0 - noise(v2.xyz)/4.0;\n"
|
||||
" gl_Position = vec4(v, 1.0);\n"
|
||||
"}\n";
|
@ -43,7 +43,7 @@
|
||||
#include "../../rewind.h"
|
||||
#include "../video_state_tracker.h"
|
||||
|
||||
#include "../drivers/gl_shaders/pipeline_xmb_ribbon.cg.h"
|
||||
#include "../drivers/gl_shaders/pipeline_xmb_ribbon_simple.cg.h"
|
||||
|
||||
#define SEMANTIC_TEXCOORD 0x92ee91cdU
|
||||
#define SEMANTIC_TEXCOORD0 0xf0c0cb9dU
|
||||
@ -1160,7 +1160,7 @@ static void *gl_cg_init(void *data, const char *path)
|
||||
|
||||
gl_cg_set_shaders(cg_data->prg[1].fprg, cg_data->prg[1].vprg);
|
||||
|
||||
shader_prog_info.combined = stock_xmb;
|
||||
shader_prog_info.combined = stock_xmb_simple;
|
||||
shader_prog_info.is_file = false;
|
||||
|
||||
gl_cg_compile_program(
|
||||
|
@ -124,6 +124,8 @@ static const char *glsl_prefixes[] = {
|
||||
#include "../drivers/gl_shaders/core_alpha_blend.glsl.vert.h"
|
||||
#include "../drivers/gl_shaders/core_alpha_blend.glsl.frag.h"
|
||||
|
||||
#include "../drivers/gl_shaders/pipeline_xmb_ribbon_simple.glsl.vert.h"
|
||||
#include "../drivers/gl_shaders/pipeline_xmb_ribbon_simple.glsl.frag.h"
|
||||
#include "../drivers/gl_shaders/pipeline_xmb_ribbon.glsl.vert.h"
|
||||
#include "../drivers/gl_shaders/pipeline_xmb_ribbon.glsl.frag.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user