Direct3D11: Fix clouds not being offset

This commit is contained in:
UnknownShadow200 2021-09-24 22:44:13 +10:00
parent fb00a8a78a
commit 07be70c571
2 changed files with 235 additions and 157 deletions

View File

@ -24,11 +24,13 @@ static IDXGIDevice1* dxgi_device;
static IDXGIAdapter* dxgi_adapter;
static IDXGIFactory1* dxgi_factory;
static IDXGISwapChain* swapchain;
struct ShaderDesc { const void* data; int len; };
// TODO RS_Init / RS_Free funcs
static void IA_Init(void);
static void IA_UpdateLayout(void);
static void VS_Init(void);
static void VS_UpdateShader(void);
static void RS_Init(void);
static void PS_Init(void);
static void OM_Init(void);
@ -258,6 +260,7 @@ void Gfx_SetVertexFormat(VertexFormat fmt) {
render = fmt == VERTEX_FORMAT_TEXTURED;
IA_UpdateLayout();
VS_UpdateShader();
}
void Gfx_DrawVb_Lines(int verticesCount) {
@ -317,12 +320,6 @@ void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
/*########################################################################################################################*
*---------------------------------------------------------Matrices--------------------------------------------------------*
*#########################################################################################################################*/
void Gfx_EnableTextureOffset(float x, float y) {
}
void Gfx_DisableTextureOffset(void) {
}
void Gfx_CalcOrthoMatrix(float width, float height, struct Matrix* matrix) {
Matrix_Orthographic(matrix, 0.0f, width, 0.0f, height, ORTHO_NEAR, ORTHO_FAR);
matrix->row3.Z = 1.0f / (ORTHO_NEAR - ORTHO_FAR);
@ -373,7 +370,8 @@ static void IA_CreateLayouts(void) {
{ "COLOR" , 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 16, D3D11_INPUT_PER_VERTEX_DATA, 0 },
};
HRESULT hr = ID3D11Device_CreateInputLayout(device, T_layout, Array_Elems(T_layout), vs_shader, sizeof(vs_shader), &input);
HRESULT hr = ID3D11Device_CreateInputLayout(device, T_layout, Array_Elems(T_layout),
vs_shader_textured, sizeof(vs_shader_textured), &input);
input_textured = input;
}
@ -391,16 +389,24 @@ static void IA_Init(void) {
//--------------------------------------------------------Vertex shader---------------------------------------------------
//########################################################################################################################
// https://docs.microsoft.com/en-us/windows/win32/direct3d11/vertex-shader-stage
static ID3D11VertexShader* vs;
static ID3D11VertexShader* vs_shaders[3];
static ID3D11Buffer* vs_cBuffer;
static _declspec(align(64)) struct VSConstants
{
static _declspec(align(64)) struct VSConstants {
struct Matrix mvp;
float texX, texY;
} vs_constants;
static const struct ShaderDesc vs_descs[3] = {
{ vs_shader_colored, sizeof(vs_shader_colored) },
{ vs_shader_textured, sizeof(vs_shader_textured) },
{ vs_shader_textured_offset, sizeof(vs_shader_textured_offset) },
};
static void VS_CreateShaders(void) {
HRESULT hr = ID3D11Device_CreateVertexShader(device, vs_shader, sizeof(vs_shader), NULL, &vs);
ID3D11DeviceContext_VSSetShader(context, vs, NULL, 0);
for (int i = 0; i < 3; i++) {
HRESULT hr = ID3D11Device_CreateVertexShader(device, vs_descs[i].data, vs_descs[i].len, NULL, &vs_shaders[i]);
if (hr) Logger_Abort2(hr, "Failed to compile vertex shader");
}
}
static void VS_CreateConstants(void) {
@ -424,6 +430,18 @@ static void VS_CreateConstants(void) {
ID3D11DeviceContext_VSSetConstantBuffers(context, 0, 1, &vs_cBuffer);
}
static int VS_CalcShaderIndex(void) {
if (gfx_format == VERTEX_FORMAT_COLOURED) return 0;
cc_bool has_offset = vs_constants.texX != 0 || vs_constants.texY != 0;
return has_offset ? 2 : 1;
}
static void VS_UpdateShader(void) {
int idx = VS_CalcShaderIndex();
ID3D11DeviceContext_VSSetShader(context, vs_shaders[idx], NULL, 0);
}
static void VS_UpdateConstants(void) {
ID3D11DeviceContext_UpdateSubresource(context, vs_cBuffer, 0, NULL, &vs_constants, 0, 0);
}
@ -431,6 +449,7 @@ static void VS_UpdateConstants(void) {
static void VS_Init(void) {
VS_CreateShaders();
VS_CreateConstants();
VS_UpdateShader();
}
static struct Matrix _view, _proj;
@ -446,6 +465,19 @@ void Gfx_LoadIdentityMatrix(MatrixType type) {
Gfx_LoadMatrix(type, &Matrix_Identity);
}
void Gfx_EnableTextureOffset(float x, float y) {
vs_constants.texX = x;
vs_constants.texY = y;
VS_UpdateShader();
VS_UpdateConstants();
}
void Gfx_DisableTextureOffset(void) {
vs_constants.texX = 0;
vs_constants.texY = 0;
VS_UpdateShader();
}
//########################################################################################################################
//---------------------------------------------------------Rasteriser-----------------------------------------------------
@ -717,6 +749,7 @@ void Gfx_EndFrame(void) {
if (hr) Logger_Abort2(hr, "Failed to swap buffers");
}
// you were expecting a BitmapCol*, but it was me, D3D11_MAPPED_SUBRESOURCE*!
cc_bool Gfx_WarnIfNecessary(void) { return false; }
void Gfx_GetApiInfo(cc_string* info) {

View File

@ -1,169 +1,214 @@
/* Pixel shader source:
Texture2D texValue;
SamplerState texState;
struct INPUT_VERTEX {
float2 coords : TEXCOORD0;
float4 color : COLOR0;
};
//float4 main(float2 coords : TEXCOORD0, float4 color : COLOR0) : SV_TARGET {
float4 main(INPUT_VERTEX input) : SV_TARGET {
float4 texColor = texValue.Sample(texState, input.coords);
return texColor * input.color;
}
*/
/* Vertex shader source:
float4x4 mvpMatrix;
#ifdef VS_TEXTURE_OFFSET
float2 texOffset;
#endif
struct INPUT_VERTEX {
float3 position : POSITION;
float2 coords : TEXCOORD0;
float4 color : COLOR0;
#ifndef VS_COLOR_ONLY
float2 coords : TEXCOORD0;
#endif
};
struct OUTPUT_VERTEX {
#ifndef VS_COLOR_ONLY
float2 coords : TEXCOORD0;
#endif
float4 color : COLOR0;
float4 position : SV_POSITION;
};
OUTPUT_VERTEX main(INPUT_VERTEX input) {
OUTPUT_VERTEX output;
output.position = mul(float4(input.position, 1.0f), mvpMatrix);
output.position = mul(mvpMatrix, float4(input.position, 1.0f));
#ifndef VS_COLOR_ONLY
output.coords = input.coords;
#endif
#ifdef VS_TEXTURE_OFFSET
output.coords += texOffset;
#endif
output.color = input.color;
return output;
}
*/
static unsigned char vs_shader[1208] = {
0x44,0x58,0x42,0x43,0x5a,0x0b,0x25,0x93,0x3a,0xad,0x92,0x6a,0x2b,0x03,0x4d,0xf8,
0xd4,0xf0,0xb6,0x8a,0x01,0x00,0x00,0x00,0xb8,0x04,0x00,0x00,0x06,0x00,0x00,0x00,
0x38,0x00,0x00,0x00,0x44,0x01,0x00,0x00,0x8c,0x02,0x00,0x00,0x08,0x03,0x00,0x00,
0xd4,0x03,0x00,0x00,0x44,0x04,0x00,0x00,0x41,0x6f,0x6e,0x39,0x04,0x01,0x00,0x00,
0x04,0x01,0x00,0x00,0x00,0x02,0xfe,0xff,0xd0,0x00,0x00,0x00,0x34,0x00,0x00,0x00,
0x01,0x00,0x24,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x24,0x00,
0x01,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x02,0xfe,0xff,0x51,0x00,0x00,0x05,0x05,0x00,0x0f,0xa0,
0x00,0x00,0x80,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x1f,0x00,0x00,0x02,0x05,0x00,0x00,0x80,0x00,0x00,0x0f,0x90,0x1f,0x00,0x00,0x02,
0x05,0x00,0x01,0x80,0x01,0x00,0x0f,0x90,0x1f,0x00,0x00,0x02,0x05,0x00,0x02,0x80,
0x02,0x00,0x0f,0x90,0x04,0x00,0x00,0x04,0x00,0x00,0x0f,0x80,0x00,0x00,0x24,0x90,
0x05,0x00,0x40,0xa0,0x05,0x00,0x15,0xa0,0x09,0x00,0x00,0x03,0x00,0x00,0x04,0xc0,
0x00,0x00,0xe4,0x80,0x03,0x00,0xe4,0xa0,0x09,0x00,0x00,0x03,0x01,0x00,0x01,0x80,
0x00,0x00,0xe4,0x80,0x01,0x00,0xe4,0xa0,0x09,0x00,0x00,0x03,0x01,0x00,0x02,0x80,
0x00,0x00,0xe4,0x80,0x02,0x00,0xe4,0xa0,0x09,0x00,0x00,0x03,0x00,0x00,0x01,0x80,
0x00,0x00,0xe4,0x80,0x04,0x00,0xe4,0xa0,0x04,0x00,0x00,0x04,0x00,0x00,0x03,0xc0,
0x00,0x00,0x00,0x80,0x00,0x00,0xe4,0xa0,0x01,0x00,0xe4,0x80,0x01,0x00,0x00,0x02,
0x00,0x00,0x08,0xc0,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x02,0x00,0x00,0x03,0xe0,
0x01,0x00,0xe4,0x90,0x01,0x00,0x00,0x02,0x01,0x00,0x0f,0xe0,0x02,0x00,0xe4,0x90,
0xff,0xff,0x00,0x00,0x53,0x48,0x44,0x52,0x40,0x01,0x00,0x00,0x40,0x00,0x01,0x00,
0x50,0x00,0x00,0x00,0x59,0x00,0x00,0x04,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,
0x04,0x00,0x00,0x00,0x5f,0x00,0x00,0x03,0x72,0x10,0x10,0x00,0x00,0x00,0x00,0x00,
0x5f,0x00,0x00,0x03,0x32,0x10,0x10,0x00,0x01,0x00,0x00,0x00,0x5f,0x00,0x00,0x03,
0xf2,0x10,0x10,0x00,0x02,0x00,0x00,0x00,0x65,0x00,0x00,0x03,0x32,0x20,0x10,0x00,
0x00,0x00,0x00,0x00,0x65,0x00,0x00,0x03,0xf2,0x20,0x10,0x00,0x01,0x00,0x00,0x00,
0x67,0x00,0x00,0x04,0xf2,0x20,0x10,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
0x68,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x36,0x00,0x00,0x05,0x32,0x20,0x10,0x00,
0x00,0x00,0x00,0x00,0x46,0x10,0x10,0x00,0x01,0x00,0x00,0x00,0x36,0x00,0x00,0x05,
0xf2,0x20,0x10,0x00,0x01,0x00,0x00,0x00,0x46,0x1e,0x10,0x00,0x02,0x00,0x00,0x00,
0x36,0x00,0x00,0x05,0x72,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x12,0x10,0x00,
0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x05,0x82,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
0x01,0x40,0x00,0x00,0x00,0x00,0x80,0x3f,0x11,0x00,0x00,0x08,0x12,0x20,0x10,0x00,
0x02,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x08,0x22,0x20,0x10,0x00,
0x02,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x11,0x00,0x00,0x08,0x42,0x20,0x10,0x00,
0x02,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,
0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x11,0x00,0x00,0x08,0x82,0x20,0x10,0x00,
0x02,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,
0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x3e,0x00,0x00,0x01,0x53,0x54,0x41,0x54,
0x74,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,
0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x44,0x45,0x46,0xc4,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,
0x00,0x04,0xfe,0xff,0x00,0x09,0x00,0x00,0x94,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x47,0x6c,0x6f,
0x62,0x61,0x6c,0x73,0x00,0xab,0xab,0xab,0x3c,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x76,0x70,0x4d,0x61,0x74,0x72,0x69,
0x78,0x00,0xab,0xab,0x03,0x00,0x03,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x4d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x20,0x28,0x52,
0x29,0x20,0x48,0x4c,0x53,0x4c,0x20,0x53,0x68,0x61,0x64,0x65,0x72,0x20,0x43,0x6f,
0x6d,0x70,0x69,0x6c,0x65,0x72,0x20,0x31,0x30,0x2e,0x30,0x2e,0x31,0x30,0x30,0x31,
0x31,0x2e,0x30,0x00,0x49,0x53,0x47,0x4e,0x68,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
0x08,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x59,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
0x03,0x03,0x00,0x00,0x62,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x0f,0x0f,0x00,0x00,0x50,0x4f,0x53,0x49,
0x54,0x49,0x4f,0x4e,0x00,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x00,0x43,0x4f,
0x4c,0x4f,0x52,0x00,0x4f,0x53,0x47,0x4e,0x6c,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
0x08,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0c,0x00,0x00,0x59,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
0x0f,0x00,0x00,0x00,0x5f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x54,0x45,0x58,0x43,
0x4f,0x4f,0x52,0x44,0x00,0x43,0x4f,0x4c,0x4f,0x52,0x00,0x53,0x56,0x5f,0x50,0x4f,
0x53,0x49,0x54,0x49,0x4f,0x4e,0x00,0xab,
static unsigned char vs_shader_colored[1016] = {
0x44,0x58,0x42,0x43,0xc4,0x27,0x51,0x43,0xec,0x48,0x20,0x10,0xd1,0x48,0x07,0x9e,0x86,0xe7,0x2f,0x63,0x01,0x00,0x00,0x00,0xf8,0x03,0x00,0x00,0x06,0x00,0x00,0x00,
0x38,0x00,0x00,0x00,0x08,0x01,0x00,0x00,0x0c,0x02,0x00,0x00,0x88,0x02,0x00,0x00,0x54,0x03,0x00,0x00,0xa4,0x03,0x00,0x00,0x41,0x6f,0x6e,0x39,0xc8,0x00,0x00,0x00,
0xc8,0x00,0x00,0x00,0x00,0x02,0xfe,0xff,0x94,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x01,0x00,0x24,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x24,0x00,
0x01,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xfe,0xff,0x1f,0x00,0x00,0x02,0x05,0x00,0x00,0x80,
0x00,0x00,0x0f,0x90,0x1f,0x00,0x00,0x02,0x05,0x00,0x01,0x80,0x01,0x00,0x0f,0x90,0x05,0x00,0x00,0x03,0x00,0x00,0x0f,0x80,0x00,0x00,0x55,0x90,0x02,0x00,0xe4,0xa0,
0x04,0x00,0x00,0x04,0x00,0x00,0x0f,0x80,0x01,0x00,0xe4,0xa0,0x00,0x00,0x00,0x90,0x00,0x00,0xe4,0x80,0x04,0x00,0x00,0x04,0x00,0x00,0x0f,0x80,0x03,0x00,0xe4,0xa0,
0x00,0x00,0xaa,0x90,0x00,0x00,0xe4,0x80,0x02,0x00,0x00,0x03,0x00,0x00,0x0f,0x80,0x00,0x00,0xe4,0x80,0x04,0x00,0xe4,0xa0,0x04,0x00,0x00,0x04,0x00,0x00,0x03,0xc0,
0x00,0x00,0xff,0x80,0x00,0x00,0xe4,0xa0,0x00,0x00,0xe4,0x80,0x01,0x00,0x00,0x02,0x00,0x00,0x0c,0xc0,0x00,0x00,0xe4,0x80,0x01,0x00,0x00,0x02,0x00,0x00,0x0f,0xe0,
0x01,0x00,0xe4,0x90,0xff,0xff,0x00,0x00,0x53,0x48,0x44,0x52,0xfc,0x00,0x00,0x00,0x40,0x00,0x01,0x00,0x3f,0x00,0x00,0x00,0x59,0x00,0x00,0x04,0x46,0x8e,0x20,0x00,
0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x5f,0x00,0x00,0x03,0x72,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x5f,0x00,0x00,0x03,0xf2,0x10,0x10,0x00,0x01,0x00,0x00,0x00,
0x65,0x00,0x00,0x03,0xf2,0x20,0x10,0x00,0x00,0x00,0x00,0x00,0x67,0x00,0x00,0x04,0xf2,0x20,0x10,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x68,0x00,0x00,0x02,
0x01,0x00,0x00,0x00,0x36,0x00,0x00,0x05,0xf2,0x20,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x1e,0x10,0x00,0x01,0x00,0x00,0x00,0x38,0x00,0x00,0x08,0xf2,0x00,0x10,0x00,
0x00,0x00,0x00,0x00,0x56,0x15,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x32,0x00,0x00,0x0a,0xf2,0x00,0x10,0x00,
0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,
0x32,0x00,0x00,0x0a,0xf2,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xa6,0x1a,0x10,0x00,0x00,0x00,0x00,0x00,
0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xf2,0x20,0x10,0x00,0x01,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,
0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x3e,0x00,0x00,0x01,0x53,0x54,0x41,0x54,0x74,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,
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,0x52,0x44,0x45,0x46,0xc4,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,
0x00,0x04,0xfe,0xff,0x00,0x09,0x00,0x00,0x94,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x00,0xab,0xab,0xab,0x3c,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
0x60,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x76,0x70,0x4d,0x61,0x74,0x72,0x69,0x78,0x00,0xab,0xab,0x03,0x00,0x03,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x4d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x20,0x28,0x52,0x29,0x20,0x48,0x4c,0x53,0x4c,0x20,0x53,0x68,0x61,0x64,0x65,0x72,0x20,0x43,0x6f,
0x6d,0x70,0x69,0x6c,0x65,0x72,0x20,0x31,0x30,0x2e,0x30,0x2e,0x31,0x30,0x30,0x31,0x31,0x2e,0x30,0x00,0x49,0x53,0x47,0x4e,0x48,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
0x08,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,0x41,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0f,0x0f,0x00,0x00,0x50,0x4f,0x53,0x49,0x54,0x49,0x4f,0x4e,0x00,0x43,0x4f,0x4c,
0x4f,0x52,0x00,0xab,0x4f,0x53,0x47,0x4e,0x4c,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
0x0f,0x00,0x00,0x00,0x43,0x4f,0x4c,0x4f,0x52,0x00,0x53,0x56,0x5f,0x50,0x4f,0x53,0x49,0x54,0x49,0x4f,0x4e,0x00,0xab,0xab,
};
static unsigned char vs_shader_textured[1148] = {
0x44,0x58,0x42,0x43,0xf2,0x26,0xad,0xc5,0x2d,0x7d,0x76,0x30,0x88,0xa5,0x94,0xee,0x5f,0xb3,0xbc,0x0a,0x01,0x00,0x00,0x00,0x7c,0x04,0x00,0x00,0x06,0x00,0x00,0x00,
0x38,0x00,0x00,0x00,0x20,0x01,0x00,0x00,0x50,0x02,0x00,0x00,0xcc,0x02,0x00,0x00,0x98,0x03,0x00,0x00,0x08,0x04,0x00,0x00,0x41,0x6f,0x6e,0x39,0xe0,0x00,0x00,0x00,
0xe0,0x00,0x00,0x00,0x00,0x02,0xfe,0xff,0xac,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x01,0x00,0x24,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x24,0x00,
0x01,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xfe,0xff,0x1f,0x00,0x00,0x02,0x05,0x00,0x00,0x80,
0x00,0x00,0x0f,0x90,0x1f,0x00,0x00,0x02,0x05,0x00,0x01,0x80,0x01,0x00,0x0f,0x90,0x1f,0x00,0x00,0x02,0x05,0x00,0x02,0x80,0x02,0x00,0x0f,0x90,0x05,0x00,0x00,0x03,
0x00,0x00,0x0f,0x80,0x00,0x00,0x55,0x90,0x02,0x00,0xe4,0xa0,0x04,0x00,0x00,0x04,0x00,0x00,0x0f,0x80,0x01,0x00,0xe4,0xa0,0x00,0x00,0x00,0x90,0x00,0x00,0xe4,0x80,
0x04,0x00,0x00,0x04,0x00,0x00,0x0f,0x80,0x03,0x00,0xe4,0xa0,0x00,0x00,0xaa,0x90,0x00,0x00,0xe4,0x80,0x02,0x00,0x00,0x03,0x00,0x00,0x0f,0x80,0x00,0x00,0xe4,0x80,
0x04,0x00,0xe4,0xa0,0x04,0x00,0x00,0x04,0x00,0x00,0x03,0xc0,0x00,0x00,0xff,0x80,0x00,0x00,0xe4,0xa0,0x00,0x00,0xe4,0x80,0x01,0x00,0x00,0x02,0x00,0x00,0x0c,0xc0,
0x00,0x00,0xe4,0x80,0x01,0x00,0x00,0x02,0x00,0x00,0x03,0xe0,0x02,0x00,0xe4,0x90,0x01,0x00,0x00,0x02,0x01,0x00,0x0f,0xe0,0x01,0x00,0xe4,0x90,0xff,0xff,0x00,0x00,
0x53,0x48,0x44,0x52,0x28,0x01,0x00,0x00,0x40,0x00,0x01,0x00,0x4a,0x00,0x00,0x00,0x59,0x00,0x00,0x04,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
0x5f,0x00,0x00,0x03,0x72,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x5f,0x00,0x00,0x03,0xf2,0x10,0x10,0x00,0x01,0x00,0x00,0x00,0x5f,0x00,0x00,0x03,0x32,0x10,0x10,0x00,
0x02,0x00,0x00,0x00,0x65,0x00,0x00,0x03,0x32,0x20,0x10,0x00,0x00,0x00,0x00,0x00,0x65,0x00,0x00,0x03,0xf2,0x20,0x10,0x00,0x01,0x00,0x00,0x00,0x67,0x00,0x00,0x04,
0xf2,0x20,0x10,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x68,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x36,0x00,0x00,0x05,0x32,0x20,0x10,0x00,0x00,0x00,0x00,0x00,
0x46,0x10,0x10,0x00,0x02,0x00,0x00,0x00,0x36,0x00,0x00,0x05,0xf2,0x20,0x10,0x00,0x01,0x00,0x00,0x00,0x46,0x1e,0x10,0x00,0x01,0x00,0x00,0x00,0x38,0x00,0x00,0x08,
0xf2,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x56,0x15,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x32,0x00,0x00,0x0a,
0xf2,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,
0x00,0x00,0x00,0x00,0x32,0x00,0x00,0x0a,0xf2,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xa6,0x1a,0x10,0x00,
0x00,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xf2,0x20,0x10,0x00,0x02,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,
0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x3e,0x00,0x00,0x01,0x53,0x54,0x41,0x54,0x74,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x44,0x45,0x46,0xc4,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
0x1c,0x00,0x00,0x00,0x00,0x04,0xfe,0xff,0x00,0x09,0x00,0x00,0x94,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x00,0xab,0xab,0xab,0x3c,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x76,0x70,0x4d,0x61,0x74,0x72,0x69,0x78,0x00,0xab,0xab,0x03,0x00,0x03,0x00,0x04,0x00,0x04,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x20,0x28,0x52,0x29,0x20,0x48,0x4c,0x53,0x4c,0x20,0x53,0x68,0x61,0x64,0x65,
0x72,0x20,0x43,0x6f,0x6d,0x70,0x69,0x6c,0x65,0x72,0x20,0x31,0x30,0x2e,0x30,0x2e,0x31,0x30,0x30,0x31,0x31,0x2e,0x30,0x00,0x49,0x53,0x47,0x4e,0x68,0x00,0x00,0x00,
0x03,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x00,0x00,
0x59,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0f,0x0f,0x00,0x00,0x5f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x50,0x4f,0x53,0x49,0x54,0x49,0x4f,0x4e,0x00,0x43,0x4f,0x4c,0x4f,0x52,0x00,0x54,
0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x00,0x4f,0x53,0x47,0x4e,0x6c,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0c,0x00,0x00,0x59,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x5f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,
0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x00,0x43,0x4f,0x4c,0x4f,0x52,0x00,0x53,0x56,0x5f,0x50,0x4f,0x53,0x49,0x54,0x49,0x4f,0x4e,0x00,0xab
};
static unsigned char vs_shader_textured_offset[1216] = {
0x44,0x58,0x42,0x43,0x5a,0x0b,0xcd,0xe9,0x18,0x23,0x85,0xf9,0xdd,0x78,0x62,0xb0,0x7d,0x5b,0x4c,0x7d,0x01,0x00,0x00,0x00,0xc0,0x04,0x00,0x00,0x06,0x00,0x00,0x00,
0x38,0x00,0x00,0x00,0x24,0x01,0x00,0x00,0x60,0x02,0x00,0x00,0xdc,0x02,0x00,0x00,0xdc,0x03,0x00,0x00,0x4c,0x04,0x00,0x00,0x41,0x6f,0x6e,0x39,0xe4,0x00,0x00,0x00,
0xe4,0x00,0x00,0x00,0x00,0x02,0xfe,0xff,0xb0,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x01,0x00,0x24,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x24,0x00,
0x01,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xfe,0xff,0x1f,0x00,0x00,0x02,0x05,0x00,0x00,0x80,
0x00,0x00,0x0f,0x90,0x1f,0x00,0x00,0x02,0x05,0x00,0x01,0x80,0x01,0x00,0x0f,0x90,0x1f,0x00,0x00,0x02,0x05,0x00,0x02,0x80,0x02,0x00,0x0f,0x90,0x02,0x00,0x00,0x03,
0x00,0x00,0x03,0xe0,0x02,0x00,0xe4,0x90,0x05,0x00,0xe4,0xa0,0x05,0x00,0x00,0x03,0x00,0x00,0x0f,0x80,0x00,0x00,0x55,0x90,0x02,0x00,0xe4,0xa0,0x04,0x00,0x00,0x04,
0x00,0x00,0x0f,0x80,0x01,0x00,0xe4,0xa0,0x00,0x00,0x00,0x90,0x00,0x00,0xe4,0x80,0x04,0x00,0x00,0x04,0x00,0x00,0x0f,0x80,0x03,0x00,0xe4,0xa0,0x00,0x00,0xaa,0x90,
0x00,0x00,0xe4,0x80,0x02,0x00,0x00,0x03,0x00,0x00,0x0f,0x80,0x00,0x00,0xe4,0x80,0x04,0x00,0xe4,0xa0,0x04,0x00,0x00,0x04,0x00,0x00,0x03,0xc0,0x00,0x00,0xff,0x80,
0x00,0x00,0xe4,0xa0,0x00,0x00,0xe4,0x80,0x01,0x00,0x00,0x02,0x00,0x00,0x0c,0xc0,0x00,0x00,0xe4,0x80,0x01,0x00,0x00,0x02,0x01,0x00,0x0f,0xe0,0x01,0x00,0xe4,0x90,
0xff,0xff,0x00,0x00,0x53,0x48,0x44,0x52,0x34,0x01,0x00,0x00,0x40,0x00,0x01,0x00,0x4d,0x00,0x00,0x00,0x59,0x00,0x00,0x04,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,
0x05,0x00,0x00,0x00,0x5f,0x00,0x00,0x03,0x72,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x5f,0x00,0x00,0x03,0xf2,0x10,0x10,0x00,0x01,0x00,0x00,0x00,0x5f,0x00,0x00,0x03,
0x32,0x10,0x10,0x00,0x02,0x00,0x00,0x00,0x65,0x00,0x00,0x03,0x32,0x20,0x10,0x00,0x00,0x00,0x00,0x00,0x65,0x00,0x00,0x03,0xf2,0x20,0x10,0x00,0x01,0x00,0x00,0x00,
0x67,0x00,0x00,0x04,0xf2,0x20,0x10,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x68,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x32,0x20,0x10,0x00,
0x00,0x00,0x00,0x00,0x46,0x10,0x10,0x00,0x02,0x00,0x00,0x00,0x46,0x80,0x20,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x36,0x00,0x00,0x05,0xf2,0x20,0x10,0x00,
0x01,0x00,0x00,0x00,0x46,0x1e,0x10,0x00,0x01,0x00,0x00,0x00,0x38,0x00,0x00,0x08,0xf2,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x56,0x15,0x10,0x00,0x00,0x00,0x00,0x00,
0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x32,0x00,0x00,0x0a,0xf2,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x06,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,0x32,0x00,0x00,0x0a,0xf2,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xa6,0x1a,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
0xf2,0x20,0x10,0x00,0x02,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x8e,0x20,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x3e,0x00,0x00,0x01,
0x53,0x54,0x41,0x54,0x74,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,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,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,0x52,0x44,0x45,0x46,
0xf8,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x00,0x04,0xfe,0xff,0x00,0x09,0x00,0x00,0xc8,0x00,0x00,0x00,
0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x24,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x00,0xab,0xab,0xab,0x3c,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x9c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xac,0x00,0x00,0x00,
0x40,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xb8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6d,0x76,0x70,0x4d,0x61,0x74,0x72,0x69,0x78,0x00,0xab,0xab,
0x03,0x00,0x03,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x74,0x65,0x78,0x4f,0x66,0x66,0x73,0x65,0x74,0x00,0xab,0xab,0x01,0x00,0x03,0x00,
0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0x69,0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x20,0x28,0x52,0x29,0x20,0x48,0x4c,0x53,0x4c,0x20,0x53,
0x68,0x61,0x64,0x65,0x72,0x20,0x43,0x6f,0x6d,0x70,0x69,0x6c,0x65,0x72,0x20,0x31,0x30,0x2e,0x30,0x2e,0x31,0x30,0x30,0x31,0x31,0x2e,0x30,0x00,0x49,0x53,0x47,0x4e,
0x68,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x07,0x07,0x00,0x00,0x59,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0f,0x0f,0x00,0x00,0x5f,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x50,0x4f,0x53,0x49,0x54,0x49,0x4f,0x4e,0x00,0x43,0x4f,0x4c,
0x4f,0x52,0x00,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x00,0x4f,0x53,0x47,0x4e,0x6c,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0c,0x00,0x00,0x59,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x5f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
0x0f,0x00,0x00,0x00,0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x00,0x43,0x4f,0x4c,0x4f,0x52,0x00,0x53,0x56,0x5f,0x50,0x4f,0x53,0x49,0x54,0x49,0x4f,0x4e,0x00,0xab,
};
static unsigned char ps_shader[772] = {
0x44,0x58,0x42,0x43,0x4f,0xd6,0x95,0x7f,0x72,0x9d,0xf8,0x21,0xb4,0x91,0x75,0x55,
0x78,0x36,0xf0,0x26,0x01,0x00,0x00,0x00,0x04,0x03,0x00,0x00,0x06,0x00,0x00,0x00,
0x38,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x5c,0x01,0x00,0x00,0xd8,0x01,0x00,0x00,
0x80,0x02,0x00,0x00,0xd0,0x02,0x00,0x00,0x41,0x6f,0x6e,0x39,0x80,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x00,0x02,0xff,0xff,0x58,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x00,0x00,0x28,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x28,0x00,0x01,0x00,0x24,0x00,
0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xff,0xff,0x1f,0x00,0x00,0x02,
0x00,0x00,0x00,0x80,0x00,0x00,0x03,0xb0,0x1f,0x00,0x00,0x02,0x00,0x00,0x00,0x80,
0x01,0x00,0x0f,0xb0,0x1f,0x00,0x00,0x02,0x00,0x00,0x00,0x90,0x00,0x08,0x0f,0xa0,
0x42,0x00,0x00,0x03,0x00,0x00,0x0f,0x80,0x00,0x00,0xe4,0xb0,0x00,0x08,0xe4,0xa0,
0x05,0x00,0x00,0x03,0x00,0x00,0x0f,0x80,0x00,0x00,0xe4,0x80,0x01,0x00,0xe4,0xb0,
0x01,0x00,0x00,0x02,0x00,0x08,0x0f,0x80,0x00,0x00,0xe4,0x80,0xff,0xff,0x00,0x00,
0x53,0x48,0x44,0x52,0x94,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x5a,0x00,0x00,0x03,0x00,0x60,0x10,0x00,0x00,0x00,0x00,0x00,0x58,0x18,0x00,0x04,
0x00,0x70,0x10,0x00,0x00,0x00,0x00,0x00,0x55,0x55,0x00,0x00,0x62,0x10,0x00,0x03,
0x32,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x62,0x10,0x00,0x03,0xf2,0x10,0x10,0x00,
0x01,0x00,0x00,0x00,0x65,0x00,0x00,0x03,0xf2,0x20,0x10,0x00,0x00,0x00,0x00,0x00,
0x68,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x45,0x00,0x00,0x09,0xf2,0x00,0x10,0x00,
0x00,0x00,0x00,0x00,0x46,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x7e,0x10,0x00,
0x00,0x00,0x00,0x00,0x00,0x60,0x10,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x07,
0xf2,0x20,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,
0x46,0x1e,0x10,0x00,0x01,0x00,0x00,0x00,0x3e,0x00,0x00,0x01,0x53,0x54,0x41,0x54,
0x74,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,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,0x52,0x44,0x45,0x46,0xa0,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,
0x00,0x04,0xff,0xff,0x00,0x09,0x00,0x00,0x6e,0x00,0x00,0x00,0x5c,0x00,0x00,0x00,
0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x74,0x65,0x78,0x53,
0x74,0x61,0x74,0x65,0x00,0x74,0x65,0x78,0x56,0x61,0x6c,0x75,0x65,0x00,0x4d,0x69,
0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x20,0x28,0x52,0x29,0x20,0x48,0x4c,0x53,0x4c,
0x20,0x53,0x68,0x61,0x64,0x65,0x72,0x20,0x43,0x6f,0x6d,0x70,0x69,0x6c,0x65,0x72,
0x20,0x31,0x30,0x2e,0x30,0x2e,0x31,0x30,0x30,0x31,0x31,0x2e,0x30,0x00,0xab,0xab,
0x49,0x53,0x47,0x4e,0x48,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x41,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0f,0x0f,0x00,0x00,
0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x00,0x43,0x4f,0x4c,0x4f,0x52,0x00,0xab,
0x4f,0x53,0x47,0x4e,0x2c,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x53,0x56,0x5f,0x54,0x41,0x52,0x47,0x45,
0x54,0x00,0xab,0xab,
/* Pixel shader source:
Texture2D texValue;
SamplerState texState;
struct INPUT_VERTEX {
float2 coords : TEXCOORD0;
float4 color : COLOR0;
};
//float4 main(float2 coords : TEXCOORD0, float4 color : COLOR0) : SV_TARGET {
float4 main(INPUT_VERTEX input) : SV_TARGET {
float4 texColor = texValue.Sample(texState, input.coords);
return texColor * input.color;
}
*/
static unsigned char ps_shader[772] = {
0x44,0x58,0x42,0x43,0x4f,0xd6,0x95,0x7f,0x72,0x9d,0xf8,0x21,0xb4,0x91,0x75,0x55,
0x78,0x36,0xf0,0x26,0x01,0x00,0x00,0x00,0x04,0x03,0x00,0x00,0x06,0x00,0x00,0x00,
0x38,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x5c,0x01,0x00,0x00,0xd8,0x01,0x00,0x00,
0x80,0x02,0x00,0x00,0xd0,0x02,0x00,0x00,0x41,0x6f,0x6e,0x39,0x80,0x00,0x00,0x00,
0x80,0x00,0x00,0x00,0x00,0x02,0xff,0xff,0x58,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
0x00,0x00,0x28,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x28,0x00,0x01,0x00,0x24,0x00,
0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xff,0xff,0x1f,0x00,0x00,0x02,
0x00,0x00,0x00,0x80,0x00,0x00,0x03,0xb0,0x1f,0x00,0x00,0x02,0x00,0x00,0x00,0x80,
0x01,0x00,0x0f,0xb0,0x1f,0x00,0x00,0x02,0x00,0x00,0x00,0x90,0x00,0x08,0x0f,0xa0,
0x42,0x00,0x00,0x03,0x00,0x00,0x0f,0x80,0x00,0x00,0xe4,0xb0,0x00,0x08,0xe4,0xa0,
0x05,0x00,0x00,0x03,0x00,0x00,0x0f,0x80,0x00,0x00,0xe4,0x80,0x01,0x00,0xe4,0xb0,
0x01,0x00,0x00,0x02,0x00,0x08,0x0f,0x80,0x00,0x00,0xe4,0x80,0xff,0xff,0x00,0x00,
0x53,0x48,0x44,0x52,0x94,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x25,0x00,0x00,0x00,
0x5a,0x00,0x00,0x03,0x00,0x60,0x10,0x00,0x00,0x00,0x00,0x00,0x58,0x18,0x00,0x04,
0x00,0x70,0x10,0x00,0x00,0x00,0x00,0x00,0x55,0x55,0x00,0x00,0x62,0x10,0x00,0x03,
0x32,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x62,0x10,0x00,0x03,0xf2,0x10,0x10,0x00,
0x01,0x00,0x00,0x00,0x65,0x00,0x00,0x03,0xf2,0x20,0x10,0x00,0x00,0x00,0x00,0x00,
0x68,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x45,0x00,0x00,0x09,0xf2,0x00,0x10,0x00,
0x00,0x00,0x00,0x00,0x46,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x7e,0x10,0x00,
0x00,0x00,0x00,0x00,0x00,0x60,0x10,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x07,
0xf2,0x20,0x10,0x00,0x00,0x00,0x00,0x00,0x46,0x0e,0x10,0x00,0x00,0x00,0x00,0x00,
0x46,0x1e,0x10,0x00,0x01,0x00,0x00,0x00,0x3e,0x00,0x00,0x01,0x53,0x54,0x41,0x54,
0x74,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,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,0x52,0x44,0x45,0x46,0xa0,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,
0x00,0x04,0xff,0xff,0x00,0x09,0x00,0x00,0x6e,0x00,0x00,0x00,0x5c,0x00,0x00,0x00,
0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x74,0x65,0x78,0x53,
0x74,0x61,0x74,0x65,0x00,0x74,0x65,0x78,0x56,0x61,0x6c,0x75,0x65,0x00,0x4d,0x69,
0x63,0x72,0x6f,0x73,0x6f,0x66,0x74,0x20,0x28,0x52,0x29,0x20,0x48,0x4c,0x53,0x4c,
0x20,0x53,0x68,0x61,0x64,0x65,0x72,0x20,0x43,0x6f,0x6d,0x70,0x69,0x6c,0x65,0x72,
0x20,0x31,0x30,0x2e,0x30,0x2e,0x31,0x30,0x30,0x31,0x31,0x2e,0x30,0x00,0xab,0xab,
0x49,0x53,0x47,0x4e,0x48,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x41,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x0f,0x0f,0x00,0x00,
0x54,0x45,0x58,0x43,0x4f,0x4f,0x52,0x44,0x00,0x43,0x4f,0x4c,0x4f,0x52,0x00,0xab,
0x4f,0x53,0x47,0x4e,0x2c,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,
0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x53,0x56,0x5f,0x54,0x41,0x52,0x47,0x45,
0x54,0x00,0xab,0xab,
};