Switch to GX2!! (thanks to exjam for his help and toolchain and aliaspider for his shader!)

This commit is contained in:
rw-r-r-0644 2018-09-15 23:43:02 +02:00 committed by Ash Logan
parent 560fd9cba6
commit abf33db515
3 changed files with 311 additions and 125 deletions

View File

@ -11,39 +11,96 @@
#include "../../events/SDL_mouse_c.h"
#include "../../events/SDL_keyboard_c.h"
#include <coreinit/memheap.h>
#include <coreinit/cache.h>
#include <coreinit/memfrmheap.h>
#include <coreinit/screen.h>
#include <gfd.h>
#include <gx2/draw.h>
#include <gx2/shaders.h>
#include <gx2/mem.h>
#include <gx2/registers.h>
#include <gx2r/draw.h>
#include <gx2r/buffer.h>
#include <whb/proc.h>
#include <whb/gfx.h>
#include <coreinit/memdefaultheap.h>
#include <string.h>
#define FRAME_HEAP_TAG (0x000DECAF)
#include "texture_shader.h"
#define WIIU_DATA "_SDL_WiiUData"
#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 720
typedef struct
{
SDL_Surface *surface;
GX2Texture texture;
} WIIU_WindowData;
static int WIIU_VideoInit(_THIS);
static int WIIU_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode);
static void WIIU_VideoQuit(_THIS);
static void WIIU_PumpEvents(_THIS);
static int WIIU_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch);
static int WIIU_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects);
static void WIIU_DestroyWindowFramebuffer(_THIS, SDL_Window *window);
static int WIIU_Available(void) {
static const float position_vb[] =
{
-1.0f, -1.0f,
1.0f, -1.0f,
1.0f, 1.0f,
-1.0f, 1.0f,
};
static GX2RBuffer position_buffer = {
GX2R_RESOURCE_BIND_VERTEX_BUFFER |
GX2R_RESOURCE_USAGE_CPU_READ |
GX2R_RESOURCE_USAGE_CPU_WRITE |
GX2R_RESOURCE_USAGE_GPU_READ,
2 * 4, 4, NULL
};
static const float tex_coord_vb[] =
{
0.0f, 1.0f,
1.0f, 1.0f,
1.0f, 0.0f,
0.0f, 0.0f,
};
static GX2RBuffer tex_coord_buffer = {
GX2R_RESOURCE_BIND_VERTEX_BUFFER |
GX2R_RESOURCE_USAGE_CPU_READ |
GX2R_RESOURCE_USAGE_CPU_WRITE |
GX2R_RESOURCE_USAGE_GPU_READ,
2 * 4, 4, NULL
};
static WHBGfxShaderGroup group = { 0 };
static GX2Sampler sampler = {0};
static int WIIU_Available(void)
{
return 1;
}
static void WIIU_DeleteDevice(SDL_VideoDevice *device) {
static void WIIU_DeleteDevice(SDL_VideoDevice *device)
{
SDL_free(device);
}
static SDL_VideoDevice *WIIU_CreateDevice(int devindex) {
static SDL_VideoDevice *WIIU_CreateDevice(int devindex)
{
SDL_VideoDevice *device;
device = (SDL_VideoDevice*) SDL_calloc(1, sizeof(SDL_VideoDevice));
if(!device) {
SDL_OutOfMemory();
if(device) {
SDL_free(device);
}
return NULL;
}
@ -65,163 +122,162 @@ VideoBootStrap WIIU_bootstrap = {
WIIU_Available, WIIU_CreateDevice
};
static int WIIU_VideoInit(_THIS) {
static int WIIU_VideoInit(_THIS)
{
SDL_DisplayMode mode;
void *buffer = NULL;
OSScreenInit();
WHBProcInit();
WHBGfxInit();
// setup shader
WHBGfxLoadGFDShaderGroup(&group, 0, texture_shader_gsh);
WHBGfxInitShaderAttribute(&group, "position", 0, 0, GX2_ATTRIB_FORMAT_FLOAT_32_32);
WHBGfxInitShaderAttribute(&group, "tex_coord_in", 1, 0, GX2_ATTRIB_FORMAT_FLOAT_32_32);
WHBGfxInitFetchShader(&group);
// setup vertex position attribute
GX2RCreateBuffer(&position_buffer);
buffer = GX2RLockBufferEx(&position_buffer, 0);
memcpy(buffer, position_vb, position_buffer.elemSize * position_buffer.elemCount);
GX2RUnlockBufferEx(&position_buffer, 0);
// setup vertex texture coordinates attribute
GX2RCreateBuffer(&tex_coord_buffer);
buffer = GX2RLockBufferEx(&tex_coord_buffer, 0);
memcpy(buffer, tex_coord_vb, tex_coord_buffer.elemSize * tex_coord_buffer.elemCount);
GX2RUnlockBufferEx(&tex_coord_buffer, 0);
// initialize a sampler
GX2InitSampler(&sampler, GX2_TEX_CLAMP_MODE_CLAMP, GX2_TEX_XY_FILTER_MODE_LINEAR);
// add default mode (1280x720)
mode.format = SDL_PIXELFORMAT_RGBA8888;
mode.w = 1280;
mode.h = 720;
mode.w = SCREEN_WIDTH;
mode.h = SCREEN_HEIGHT;
mode.refresh_rate = 60;
mode.driverdata = NULL;
if(SDL_AddBasicVideoDisplay(&mode) < 0) {
if (SDL_AddBasicVideoDisplay(&mode) < 0) {
return -1;
}
SDL_AddDisplayMode(&_this->displays[0], &mode);
return 0;
}
static void WIIU_VideoQuit(_THIS) {
OSScreenShutdown();
static void WIIU_VideoQuit(_THIS)
{
GX2RDestroyBufferEx(&position_buffer, 0);
GX2RDestroyBufferEx(&tex_coord_buffer, 0);
WHBGfxShutdown();
WHBProcShutdown();
}
static int WIIU_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) {
static int WIIU_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
{
return 0;
}
static void WIIU_PumpEvents(_THIS) {
// TODO
}
#define WIIU_DATA "_SDL_WiiUData"
typedef struct {
SDL_Surface *sdl_surface;
void *wiiu_surface;
int wiiu_work_fb;
} WIIU_WindowData;
static int WIIU_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch) {
SDL_Surface *surface;
const Uint32 surface_format = SDL_PIXELFORMAT_RGBA8888;
int w, h;
int bpp;
Uint32 Rmask, Gmask, Bmask, Amask;
SDL_PixelFormatEnumToMasks(surface_format, &bpp, &Rmask, &Gmask, &Bmask, &Amask);
SDL_GetWindowSize(window, &w, &h);
surface = SDL_CreateRGBSurface(0, w, h, bpp, Rmask, Gmask, Bmask, Amask);
if(!surface) {
return -1;
static void WIIU_PumpEvents(_THIS)
{
if (!WHBProcIsRunning()) {
SDL_Event ev;
ev.type = SDL_QUIT;
SDL_PushEvent(&ev);
return;
}
}
WIIU_WindowData *data = SDL_calloc(1, sizeof(WIIU_WindowData));
data->sdl_surface = surface;
static int WIIU_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch)
{
int bpp;
Uint32 r, g, b, a;
WIIU_WindowData *data;
// Allocate the framebuffers
MEMHeapHandle heap = MEMGetBaseHeapHandle(MEM_BASE_HEAP_MEM1);
MEMRecordStateForFrmHeap(heap, FRAME_HEAP_TAG);
// hold a pointer to our stuff
data = SDL_calloc(1, sizeof(WIIU_WindowData));
// Write "Look at the TV Screen" on the gamepad
void *sBufferDRC = MEMAllocFromFrmHeapEx(heap, OSScreenGetBufferSizeEx(SCREEN_DRC), 4);
OSScreenSetBufferEx(SCREEN_DRC, sBufferDRC);
OSScreenClearBufferEx(SCREEN_DRC, 0);
OSScreenPutFontEx(SCREEN_DRC, 0, 0, "Look at the TV Screen.");
DCFlushRange(sBufferDRC, OSScreenGetBufferSizeEx(SCREEN_DRC));
OSScreenFlipBuffersEx(SCREEN_DRC);
OSScreenEnableEx(SCREEN_DRC, 1);
// create a gx2 texture
data->texture.surface.width = window->w;
data->texture.surface.height = window->h;
data->texture.surface.depth = 1;
data->texture.surface.dim = GX2_SURFACE_DIM_TEXTURE_2D;
data->texture.surface.format = GX2_SURFACE_FORMAT_UNORM_R8_G8_B8_A8;
data->texture.surface.tileMode = GX2_TILE_MODE_LINEAR_ALIGNED;
data->texture.viewNumSlices = 1;
data->texture.compMap = 0x00010203;
GX2CalcSurfaceSizeAndAlignment(&data->texture.surface);
GX2InitTextureRegs(&data->texture);
// Allocate the framebuffer (TV will be used)
data->wiiu_work_fb = 1;
data->wiiu_surface = MEMAllocFromFrmHeapEx(heap, OSScreenGetBufferSizeEx(SCREEN_TV), 4);
OSScreenSetBufferEx(SCREEN_TV, data->wiiu_surface);
data->texture.surface.image = MEMAllocFromDefaultHeapEx(data->texture.surface.imageSize, data->texture.surface.alignment);
// Prepare the framebuffer
OSScreenClearBufferEx(SCREEN_TV, 0);
// create sdl surface framebuffer
data->surface = SDL_CreateRGBSurfaceWithFormatFrom(
data->texture.surface.image, // pixels
window->w, window->h, // width, height
bpp, window->w * 4, // depth, pitch
SDL_PIXELFORMAT_RGBA8888 // format
);
// Flush framebuffer
DCFlushRange(data->wiiu_surface, OSScreenGetBufferSizeEx(SCREEN_TV));
OSScreenFlipBuffersEx(SCREEN_TV);
data->wiiu_work_fb = !data->wiiu_work_fb;
*format = SDL_PIXELFORMAT_RGBA8888;
*pixels = data->surface->pixels;
*pitch = data->surface->pitch;
// Enable the framebuffer
OSScreenEnableEx(SCREEN_TV, 1);
// Set surface data
SDL_SetWindowData(window, WIIU_DATA, data);
*format = surface_format;
*pixels = surface->pixels;
*pitch = surface->pitch;
// *hack*: if the window is not in focus joystick events will be
// ignored, so set the focus for the keyboard (actually the wiiu
// just doesn't have windows, so the focus concept doesn't really
// apply)
// inform SDL we're ready to accept inputs
SDL_SetKeyboardFocus(window);
return 0;
}
static void WIIU_FBCopy(uint32_t *_dst, uint32_t *_src, uint32_t _w, uint32_t _h) {
register uint32_t *src = _src, *dst = _dst;
register uint32_t w = _w, h = _h;
register uint32_t a, b, c, d;
register uint32_t y, *xf;
static int WIIU_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects)
{
WIIU_WindowData *data = (WIIU_WindowData *) SDL_GetWindowData(window, WIIU_DATA);
for(y = 0; y < h; y++) {
xf = dst + w;
do {
a = src[0];
b = src[1];
c = src[2];
d = src[3];
dst[0] = a;
dst[1] = b;
dst[2] = c;
dst[3] = d;
src += 4;
dst += 4;
} while(dst != xf);
dst += 1280 - w;
}
}
GX2Invalidate(GX2_INVALIDATE_MODE_CPU_TEXTURE, data->texture.surface.image, data->texture.surface.imageSize);
static int WIIU_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects) {
WIIU_WindowData *data;
WHBGfxBeginRender();
data = (WIIU_WindowData*) SDL_GetWindowData(window, WIIU_DATA);
if(!data) {
return SDL_SetError("Couldn't find wiiu data for window");
}
WHBGfxBeginRenderTV();
WHBGfxClearColor(0.0f, 0.0f, 0.0f, 1.0f);
GX2SetFetchShader(&group.fetchShader);
GX2SetVertexShader(group.vertexShader);
GX2SetPixelShader(group.pixelShader);
GX2RSetAttributeBuffer(&position_buffer, 0, position_buffer.elemSize, 0);
GX2RSetAttributeBuffer(&tex_coord_buffer, 1, tex_coord_buffer.elemSize, 0);
SDL_Surface *sdl_surface = data->sdl_surface;
GX2SetPixelTexture(&data->texture, group.pixelShader->samplerVars[0].location);
GX2SetPixelSampler(&sampler, group.pixelShader->samplerVars[0].location);
// Get buffers
uint32_t *src_buffer = (uint32_t *)sdl_surface->pixels;
uint32_t *dst_buffer = (uint32_t *)(data->wiiu_surface + (data->wiiu_work_fb * 1280 * 720 * 4));
WIIU_FBCopy(dst_buffer, src_buffer, sdl_surface->w, sdl_surface->h);
GX2DrawEx(GX2_PRIMITIVE_MODE_QUADS, 4, 0, 1);
WHBGfxFinishRenderTV();
// Flush framebuffer
DCFlushRange(data->wiiu_surface, OSScreenGetBufferSizeEx(SCREEN_TV));
OSScreenFlipBuffersEx(SCREEN_TV);
data->wiiu_work_fb = !data->wiiu_work_fb;
WHBGfxBeginRenderDRC();
WHBGfxClearColor(0.0f, 0.0f, 0.0f, 1.0f);
GX2SetFetchShader(&group.fetchShader);
GX2SetVertexShader(group.vertexShader);
GX2SetPixelShader(group.pixelShader);
GX2RSetAttributeBuffer(&position_buffer, 0, position_buffer.elemSize, 0);
GX2RSetAttributeBuffer(&tex_coord_buffer, 1, tex_coord_buffer.elemSize, 0);
GX2SetPixelTexture(&data->texture, group.pixelShader->samplerVars[0].location);
GX2SetPixelSampler(&sampler, group.pixelShader->samplerVars[0].location);
GX2DrawEx(GX2_PRIMITIVE_MODE_QUADS, 4, 0, 1);
WHBGfxFinishRenderDRC();
WHBGfxFinishRender();
return 0;
}
static void WIIU_DestroyWindowFramebuffer(_THIS, SDL_Window *window) {
WIIU_WindowData *data;
data = (WIIU_WindowData*) SDL_GetWindowData(window, WIIU_DATA);
SDL_FreeSurface(data->sdl_surface);
static void WIIU_DestroyWindowFramebuffer(_THIS, SDL_Window *window)
{
WIIU_WindowData *data = (WIIU_WindowData*) SDL_GetWindowData(window, WIIU_DATA);
SDL_FreeSurface(data->surface);
MEMFreeToDefaultHeap(data->texture.surface.image);
SDL_free(data);
MEMHeapHandle heap = MEMGetBaseHeapHandle(MEM_BASE_HEAP_MEM1);
OSScreenEnableEx(SCREEN_DRC, 0);
OSScreenEnableEx(SCREEN_TV, 0);
MEMFreeByStateToFrmHeap(heap, FRAME_HEAP_TAG);
}
#endif /* SDL_VIDEO_DRIVER_WIIU */

View File

@ -0,0 +1,126 @@
unsigned char texture_shader_gsh[] = {
0x47, 0x66, 0x78, 0x32, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x07,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x4b, 0x7b,
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0xa4, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x20,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0xd0, 0x60, 0x01, 0x34, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xca, 0x70, 0x01, 0x54, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xca, 0x70, 0x01, 0x60, 0x00, 0x00, 0x00, 0x09,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x70, 0x6f, 0x73, 0x69,
0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x74, 0x65, 0x78, 0x5f,
0x63, 0x6f, 0x6f, 0x72, 0x64, 0x5f, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00,
0xd0, 0x60, 0x01, 0x08, 0xca, 0x70, 0x01, 0x34, 0xca, 0x70, 0x01, 0x44,
0x7d, 0x42, 0x4c, 0x4b, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x70, 0xd0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c,
0xd0, 0x60, 0x01, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0xd0, 0x60, 0x01, 0x70, 0x42, 0x4c, 0x4b, 0x7b, 0x00, 0x00, 0x00, 0x20,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x09, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0c, 0xa0, 0x3c, 0xa0, 0x00, 0x00, 0x88, 0x06, 0x00, 0x94,
0x00, 0x40, 0x01, 0x00, 0x88, 0x04, 0x20, 0x14, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x0c, 0x40, 0x00,
0x02, 0x04, 0x00, 0x00, 0x90, 0x0c, 0x40, 0x20, 0xf8, 0x08, 0x00, 0x00,
0x90, 0x0c, 0x20, 0x40, 0xf9, 0x00, 0x00, 0x80, 0x90, 0x0c, 0x20, 0x60,
0x42, 0x4c, 0x4b, 0x7b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x01, 0x28,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x02, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0xd0, 0x60, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xca, 0x70, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x73, 0x00, 0x00, 0x00, 0xd0, 0x60, 0x00, 0xd4, 0xca, 0x70, 0x00, 0xe8,
0x7d, 0x42, 0x4c, 0x4b, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf8, 0xd0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0xd0, 0x60, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0xd0, 0x60, 0x00, 0xf8, 0x42, 0x4c, 0x4b, 0x7b, 0x00, 0x00, 0x00, 0x20,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00,
0x88, 0x06, 0x20, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0d, 0xf0,
0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x4b, 0x7b,
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00
};
unsigned int texture_shader_gsh_len = 1468;

View File

@ -0,0 +1,4 @@
#pragma once
extern unsigned char texture_shader_gsh[];
extern unsigned int texture_shader_gsh_len;