This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // GLSL source | |
| #version 450 | |
| layout(location = 0) uniform mat4 uMVP; | |
| layout(location = 0) in vec4 aPosition; | |
| void main() | |
| { | |
| gl_Position = uMVP * aPosition; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Original source | |
| #version 310 es | |
| layout(local_size_x = 1) in; | |
| layout(std430, binding = 0) writeonly buffer SSBO | |
| { | |
| vec4 data[]; | |
| } outdata; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Compile: gcc -o dark.so -shared dark.c -std=c99 -O3 -Wall -pedantic -fPIC | |
| #include "softfilter.h" | |
| #include <stdlib.h> | |
| static unsigned impl_input_fmts(void) | |
| { | |
| return SOFTFILTER_FMT_XRGB8888; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Compile: g++ -o dark.so -shared dark.c -std=c99 -O3 -Wall -pedantic -fPIC | |
| #include "softfilter.h" | |
| #include <stdlib.h> | |
| static unsigned impl_input_fmts(void) | |
| { | |
| return SOFTFILTER_FMT_XRGB8888; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #if __SSE2__ | |
| #include <emmintrin.h> | |
| // There's no equivalent in libc, you'd think so ... std::mismatch exists, but it's not optimized at all. :( | |
| static unsigned find_mismatch(const uint32_t *a, const uint32_t *b, unsigned samples) | |
| { | |
| unsigned i; | |
| unsigned sse_samples = samples & ~3; | |
| for (i = 0; i < sse_samples; i += 4) | |
| { | |
| __m128i v0 = _mm_loadu_si128((const __m128i*)(a + i)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #if defined(VERTEX) | |
| #if __VERSION__ >= 130 | |
| #define COMPAT_varying out | |
| #define COMPAT_attribute in | |
| #else | |
| #define COMPAT_varying varying | |
| #define COMPAT_attribute attribute | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit 63d946c69f3a09fcdaa19ff4d16c73ce1a4245b9 | |
| Author: Themaister <[email protected]> | |
| Date: Sun Mar 10 19:14:28 2013 +0100 | |
| Add set_rgui_texture interface to video_poke. | |
| diff --git a/driver.h b/driver.h | |
| index 33d7157..b8bab0f 100644 | |
| --- a/driver.h | |
| +++ b/driver.h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <stdbool.h> | |
| #include <string.h> | |
| #include <limits.h> | |
| #include <assert.h> | |
| struct bitstream | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- XML/GLSL shader autogenerated by cg2xml.py --> | |
| <shader language="GLSL" style="GLES2"> | |
| <vertex><![CDATA[ | |
| varying vec2 pixel_no; | |
| varying vec2 c11; | |
| varying vec4 c12_22; | |
| varying vec4 c21_02; | |
| varying vec4 c20_01; | |
| varying vec4 c00_10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """Python 3 script which converts simple RetroArch Cg shaders to modern XML/GLSL format.""" | |
| import sys | |
| import os | |
| def remove_comments(source_lines): | |
| ret = [] | |
| killed_comments = [line.split('//')[0] for line in source_lines] |