add nanovg based osd
This commit is contained in:
@@ -18,7 +18,10 @@ if (MPV_SW_RENDER)
|
||||
endif ()
|
||||
|
||||
project(xplayer)
|
||||
set(MAIN_SRC "main.cpp")
|
||||
set(MAIN_SRC
|
||||
"main.cpp"
|
||||
"nanovg/nanovg.c"
|
||||
)
|
||||
|
||||
add_executable(xplayer ${MAIN_SRC})
|
||||
set_target_properties(xplayer PROPERTIES CXX_STANDARD 17)
|
||||
|
||||
3
Makefile
3
Makefile
@@ -1,6 +1,7 @@
|
||||
TARGET = xplayer
|
||||
|
||||
SRCS = main.cpp
|
||||
SRCS = main.cpp \
|
||||
nanovg/nanovg.c
|
||||
OBJS = $(SRCS:.cpp=.o)
|
||||
|
||||
INCLUDES := -I$(CURDIR)
|
||||
|
||||
BIN
Roboto-Regular.ttf
Normal file
BIN
Roboto-Regular.ttf
Normal file
Binary file not shown.
71
main.cpp
71
main.cpp
@@ -2,14 +2,17 @@
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <mpv/client.h>
|
||||
|
||||
#include "nanovg/nanovg.h"
|
||||
|
||||
#ifdef USE_D3D11
|
||||
#include <mpv/render_dxgi.h>
|
||||
#define GLFW_EXPOSE_NATIVE_WIN32
|
||||
#include <GLFW/glfw3native.h>
|
||||
#include <d3d11.h>
|
||||
#define NANOVG_D3D11_IMPLEMENTATION
|
||||
#include "nanovg/nanovg_d3d11.h"
|
||||
|
||||
static ID3D11Device* d3dDevice = nullptr;
|
||||
static ID3D11DeviceContext* d3dDeviceContext = nullptr;
|
||||
@@ -23,9 +26,14 @@ bool ResizeD3D(GLFWwindow* window, int width, int height);
|
||||
#else
|
||||
#include <mpv/render_gl.h>
|
||||
#include <glad/glad.h>
|
||||
#define NANOVG_GL3_IMPLEMENTATION
|
||||
#include "nanovg/nanovg_gl.h"
|
||||
#endif
|
||||
|
||||
#ifdef __SWITCH__
|
||||
#ifdef _WIN32
|
||||
#define GLFW_EXPOSE_NATIVE_WIN32
|
||||
#include <GLFW/glfw3native.h>
|
||||
#elif defined( __SWITCH__)
|
||||
#include <switch.h>
|
||||
|
||||
extern "C" void userAppInit() {
|
||||
@@ -60,6 +68,7 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
if (!glfwInit()) die("init glfw failed");
|
||||
|
||||
NVGcontext* vg = nullptr;
|
||||
mpv_render_context* mpv_context = nullptr;
|
||||
mpv_handle* mpv = mpv_create();
|
||||
mpv_set_option_string(mpv, "subs-fallback", "yes");
|
||||
@@ -67,6 +76,7 @@ int main(int argc, char* argv[]) {
|
||||
mpv_set_option_string(mpv, "vd-lavc-dr", "yes");
|
||||
mpv_set_option_string(mpv, "terminal", "yes");
|
||||
mpv_set_option_string(mpv, "hwdec", "auto");
|
||||
mpv_set_option_string(mpv, "vo", "gpu-next");
|
||||
#ifdef _DEBUG
|
||||
mpv_set_option_string(this->mpv, "msg-level", "ffmpeg=trace");
|
||||
mpv_set_option_string(this->mpv, "msg-level", "all=v");
|
||||
@@ -97,6 +107,10 @@ int main(int argc, char* argv[]) {
|
||||
printf("glfwKeyCallback key press %d\n", key);
|
||||
}
|
||||
});
|
||||
#ifdef _WIN32
|
||||
HWND wid = glfwGetWin32Window(window);
|
||||
mpv_set_option(mpv, "wid", MPV_FORMAT_INT64, &wid);
|
||||
#endif
|
||||
#ifdef USE_D3D11
|
||||
// Initialize Direct3D
|
||||
HWND hwnd = glfwGetWin32Window(window);
|
||||
@@ -104,6 +118,8 @@ int main(int argc, char* argv[]) {
|
||||
if (!InitD3D(hwnd)) die("init dx11 failed");
|
||||
glfwSetFramebufferSizeCallback(window, (GLFWframebuffersizefun)ResizeD3D);
|
||||
|
||||
vg = nvgCreateD3D11(d3dDevice, NVG_STENCIL_STROKES | NVG_ANTIALIAS);
|
||||
|
||||
mpv_dxgi_init_params init_params = {d3dDevice, d3dSwapChain};
|
||||
mpv_render_param params[] = {
|
||||
{MPV_RENDER_PARAM_API_TYPE, (void*)MPV_RENDER_API_TYPE_DXGI},
|
||||
@@ -117,6 +133,11 @@ int main(int argc, char* argv[]) {
|
||||
glfwSwapInterval(1);
|
||||
glfwSetTime(0);
|
||||
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
vg = nvgCreateGL3(NVG_STENCIL_STROKES | NVG_ANTIALIAS);
|
||||
|
||||
mpv_opengl_init_params gl_init_params{
|
||||
[](void* fn_ctx, const char* name) { return (void*)glfwGetProcAddress(name); }, nullptr};
|
||||
mpv_render_param params[] = {
|
||||
@@ -135,6 +156,17 @@ int main(int argc, char* argv[]) {
|
||||
},
|
||||
mpv_context);
|
||||
|
||||
#ifdef __SWITCH__
|
||||
PlFontData fd;
|
||||
if (R_SUCCEEDED(plGetSharedFontByType(&fd, PlSharedFontType_Standard))) {
|
||||
int font = nvgCreateFontMem(vg, "sans", (unsigned char*)fd.address, fd.size, 0);
|
||||
if (font < 0) die("load font failed");
|
||||
}
|
||||
#else
|
||||
int font = nvgCreateFont(vg, "sans", "Roboto-Regular.ttf");
|
||||
if (font < 0) die("load font failed");
|
||||
#endif
|
||||
|
||||
const char* args[] = {"loadfile", argv[1], nullptr};
|
||||
if (mpv_command(mpv, args) < 0) die("load file failed");
|
||||
|
||||
@@ -160,9 +192,37 @@ int main(int argc, char* argv[]) {
|
||||
mpv_render_context_report_swap(mpv_context);
|
||||
#ifdef USE_D3D11
|
||||
d3dDeviceContext->OMSetRenderTargets(1, &d3dRenderTargetView, nullptr);
|
||||
d3dSwapChain->Present(1, 0); // Present with vsync
|
||||
#else
|
||||
glViewport(0, 0, fbw, fbh);
|
||||
#endif
|
||||
if (osdShow) {
|
||||
// Draw OSD
|
||||
std::string profiles[4] = {
|
||||
"Video Codec: " + std::string(mpv_get_property_string(mpv, "video-codec")),
|
||||
"Pixel Format: " + std::string(mpv_get_property_string(mpv, "video-params/pixelformat")),
|
||||
"Hardware Decode: " + std::string(mpv_get_property_string(mpv, "hwdec-current")),
|
||||
"Video Bitrate: " + std::to_string(mpv_property_int(mpv, "video-bitrate") / 1024),
|
||||
};
|
||||
|
||||
nvgBeginFrame(vg, fbw, fbh, 1.0f);
|
||||
nvgBeginPath(vg);
|
||||
nvgRect(vg, 10, 10, 800, 400);
|
||||
nvgFillColor(vg, nvgRGBA(0, 0, 0, 128));
|
||||
nvgFill(vg);
|
||||
|
||||
nvgFontSize(vg, 20.0f);
|
||||
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_TOP);
|
||||
nvgFillColor(vg, nvgRGBA(240, 240, 240, 255));
|
||||
nvgFontFace(vg, "sans");
|
||||
|
||||
for (size_t i = 0; i < 4; i++) {
|
||||
nvgText(vg, 30, 30 * (i + 1), profiles[i].c_str(), nullptr);
|
||||
}
|
||||
nvgEndFrame(vg);
|
||||
}
|
||||
#ifdef USE_D3D11
|
||||
d3dSwapChain->Present(1, 0); // Present with vsync
|
||||
#else
|
||||
glfwSwapBuffers(window);
|
||||
#endif
|
||||
glfwWaitEvents();
|
||||
@@ -173,7 +233,10 @@ int main(int argc, char* argv[]) {
|
||||
mpv_terminate_destroy(mpv);
|
||||
|
||||
#ifdef USE_D3D11
|
||||
nvgDeleteD3D11(vg);
|
||||
CleanupD3D();
|
||||
#elif defined(NANOVG_GL3)
|
||||
nvgDeleteGL3(vg);
|
||||
#endif
|
||||
glfwDestroyWindow(window);
|
||||
glfwTerminate();
|
||||
|
||||
1802
nanovg/fontstash.h
Normal file
1802
nanovg/fontstash.h
Normal file
File diff suppressed because it is too large
Load Diff
2974
nanovg/nanovg.c
Normal file
2974
nanovg/nanovg.c
Normal file
File diff suppressed because it is too large
Load Diff
699
nanovg/nanovg.h
Normal file
699
nanovg/nanovg.h
Normal file
@@ -0,0 +1,699 @@
|
||||
//
|
||||
// Copyright (c) 2013 Mikko Mononen memon@inside.org
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would be
|
||||
// appreciated but is not required.
|
||||
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||
// misrepresented as being the original software.
|
||||
// 3. This notice may not be removed or altered from any source distribution.
|
||||
//
|
||||
|
||||
#ifndef NANOVG_H
|
||||
#define NANOVG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NVG_PI 3.14159265358979323846264338327f
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4201) // nonstandard extension used : nameless struct/union
|
||||
#endif
|
||||
|
||||
typedef struct NVGcontext NVGcontext;
|
||||
|
||||
struct NVGcolor {
|
||||
union {
|
||||
float rgba[4];
|
||||
struct {
|
||||
float r,g,b,a;
|
||||
};
|
||||
};
|
||||
};
|
||||
typedef struct NVGcolor NVGcolor;
|
||||
|
||||
struct NVGpaint {
|
||||
float xform[6];
|
||||
float extent[2];
|
||||
float radius;
|
||||
float feather;
|
||||
NVGcolor innerColor;
|
||||
NVGcolor outerColor;
|
||||
int image;
|
||||
};
|
||||
typedef struct NVGpaint NVGpaint;
|
||||
|
||||
enum NVGwinding {
|
||||
NVG_CCW = 1, // Winding for solid shapes
|
||||
NVG_CW = 2, // Winding for holes
|
||||
};
|
||||
|
||||
enum NVGsolidity {
|
||||
NVG_SOLID = 1, // CCW
|
||||
NVG_HOLE = 2, // CW
|
||||
};
|
||||
|
||||
enum NVGlineCap {
|
||||
NVG_BUTT,
|
||||
NVG_ROUND,
|
||||
NVG_SQUARE,
|
||||
NVG_BEVEL,
|
||||
NVG_MITER,
|
||||
};
|
||||
|
||||
enum NVGalign {
|
||||
// Horizontal align
|
||||
NVG_ALIGN_LEFT = 1<<0, // Default, align text horizontally to left.
|
||||
NVG_ALIGN_CENTER = 1<<1, // Align text horizontally to center.
|
||||
NVG_ALIGN_RIGHT = 1<<2, // Align text horizontally to right.
|
||||
// Vertical align
|
||||
NVG_ALIGN_TOP = 1<<3, // Align text vertically to top.
|
||||
NVG_ALIGN_MIDDLE = 1<<4, // Align text vertically to middle.
|
||||
NVG_ALIGN_BOTTOM = 1<<5, // Align text vertically to bottom.
|
||||
NVG_ALIGN_BASELINE = 1<<6, // Default, align text vertically to baseline.
|
||||
};
|
||||
|
||||
enum NVGblendFactor {
|
||||
NVG_ZERO = 1<<0,
|
||||
NVG_ONE = 1<<1,
|
||||
NVG_SRC_COLOR = 1<<2,
|
||||
NVG_ONE_MINUS_SRC_COLOR = 1<<3,
|
||||
NVG_DST_COLOR = 1<<4,
|
||||
NVG_ONE_MINUS_DST_COLOR = 1<<5,
|
||||
NVG_SRC_ALPHA = 1<<6,
|
||||
NVG_ONE_MINUS_SRC_ALPHA = 1<<7,
|
||||
NVG_DST_ALPHA = 1<<8,
|
||||
NVG_ONE_MINUS_DST_ALPHA = 1<<9,
|
||||
NVG_SRC_ALPHA_SATURATE = 1<<10,
|
||||
};
|
||||
|
||||
enum NVGcompositeOperation {
|
||||
NVG_SOURCE_OVER,
|
||||
NVG_SOURCE_IN,
|
||||
NVG_SOURCE_OUT,
|
||||
NVG_ATOP,
|
||||
NVG_DESTINATION_OVER,
|
||||
NVG_DESTINATION_IN,
|
||||
NVG_DESTINATION_OUT,
|
||||
NVG_DESTINATION_ATOP,
|
||||
NVG_LIGHTER,
|
||||
NVG_COPY,
|
||||
NVG_XOR,
|
||||
};
|
||||
|
||||
struct NVGcompositeOperationState {
|
||||
int srcRGB;
|
||||
int dstRGB;
|
||||
int srcAlpha;
|
||||
int dstAlpha;
|
||||
};
|
||||
typedef struct NVGcompositeOperationState NVGcompositeOperationState;
|
||||
|
||||
struct NVGglyphPosition {
|
||||
const char* str; // Position of the glyph in the input string.
|
||||
float x; // The x-coordinate of the logical glyph position.
|
||||
float minx, maxx; // The bounds of the glyph shape.
|
||||
};
|
||||
typedef struct NVGglyphPosition NVGglyphPosition;
|
||||
|
||||
struct NVGtextRow {
|
||||
const char* start; // Pointer to the input text where the row starts.
|
||||
const char* end; // Pointer to the input text where the row ends (one past the last character).
|
||||
const char* next; // Pointer to the beginning of the next row.
|
||||
float width; // Logical width of the row.
|
||||
float minx, maxx; // Actual bounds of the row. Logical with and bounds can differ because of kerning and some parts over extending.
|
||||
};
|
||||
typedef struct NVGtextRow NVGtextRow;
|
||||
|
||||
enum NVGimageFlags {
|
||||
NVG_IMAGE_GENERATE_MIPMAPS = 1<<0, // Generate mipmaps during creation of the image.
|
||||
NVG_IMAGE_REPEATX = 1<<1, // Repeat image in X direction.
|
||||
NVG_IMAGE_REPEATY = 1<<2, // Repeat image in Y direction.
|
||||
NVG_IMAGE_FLIPY = 1<<3, // Flips (inverses) image in Y direction when rendered.
|
||||
NVG_IMAGE_PREMULTIPLIED = 1<<4, // Image data has premultiplied alpha.
|
||||
NVG_IMAGE_NEAREST = 1<<5, // Image interpolation is Nearest instead Linear
|
||||
NVG_IMAGE_STREAMING = 1<<6, // Image d3d11 flags Usage = D3D11_USAGE_DYNAMIC,CPUAccessFlags = D3D11_CPU_ACCESS_WRITE.
|
||||
NVG_IMAGE_COPY_SWAP = 1<<7, // Image d3d11 flags UpdateTexture use swap texture.
|
||||
};
|
||||
|
||||
// Begin drawing a new frame
|
||||
// Calls to nanovg drawing API should be wrapped in nvgBeginFrame() & nvgEndFrame()
|
||||
// nvgBeginFrame() defines the size of the window to render to in relation currently
|
||||
// set viewport (i.e. glViewport on GL backends). Device pixel ration allows to
|
||||
// control the rendering on Hi-DPI devices.
|
||||
// For example, GLFW returns two dimension for an opened window: window size and
|
||||
// frame buffer size. In that case you would set windowWidth/Height to the window size
|
||||
// devicePixelRatio to: frameBufferWidth / windowWidth.
|
||||
void nvgBeginFrame(NVGcontext* ctx, float windowWidth, float windowHeight, float devicePixelRatio);
|
||||
|
||||
// Cancels drawing the current frame.
|
||||
void nvgCancelFrame(NVGcontext* ctx);
|
||||
|
||||
// Ends drawing flushing remaining render state.
|
||||
void nvgEndFrame(NVGcontext* ctx);
|
||||
|
||||
//
|
||||
// Composite operation
|
||||
//
|
||||
// The composite operations in NanoVG are modeled after HTML Canvas API, and
|
||||
// the blend func is based on OpenGL (see corresponding manuals for more info).
|
||||
// The colors in the blending state have premultiplied alpha.
|
||||
|
||||
// Sets the composite operation. The op parameter should be one of NVGcompositeOperation.
|
||||
void nvgGlobalCompositeOperation(NVGcontext* ctx, int op);
|
||||
|
||||
// Sets the composite operation with custom pixel arithmetic. The parameters should be one of NVGblendFactor.
|
||||
void nvgGlobalCompositeBlendFunc(NVGcontext* ctx, int sfactor, int dfactor);
|
||||
|
||||
// Sets the composite operation with custom pixel arithmetic for RGB and alpha components separately. The parameters should be one of NVGblendFactor.
|
||||
void nvgGlobalCompositeBlendFuncSeparate(NVGcontext* ctx, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha);
|
||||
|
||||
//
|
||||
// Color utils
|
||||
//
|
||||
// Colors in NanoVG are stored as unsigned ints in ABGR format.
|
||||
|
||||
// Returns a color value from red, green, blue values. Alpha will be set to 255 (1.0f).
|
||||
NVGcolor nvgRGB(unsigned char r, unsigned char g, unsigned char b);
|
||||
|
||||
// Returns a color value from red, green, blue values. Alpha will be set to 1.0f.
|
||||
NVGcolor nvgRGBf(float r, float g, float b);
|
||||
|
||||
|
||||
// Returns a color value from red, green, blue and alpha values.
|
||||
NVGcolor nvgRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
|
||||
|
||||
// Returns a color value from red, green, blue and alpha values.
|
||||
NVGcolor nvgRGBAf(float r, float g, float b, float a);
|
||||
|
||||
|
||||
// Linearly interpolates from color c0 to c1, and returns resulting color value.
|
||||
NVGcolor nvgLerpRGBA(NVGcolor c0, NVGcolor c1, float u);
|
||||
|
||||
// Sets transparency of a color value.
|
||||
NVGcolor nvgTransRGBA(NVGcolor c0, unsigned char a);
|
||||
|
||||
// Sets transparency of a color value.
|
||||
NVGcolor nvgTransRGBAf(NVGcolor c0, float a);
|
||||
|
||||
// Returns color value specified by hue, saturation and lightness.
|
||||
// HSL values are all in range [0..1], alpha will be set to 255.
|
||||
NVGcolor nvgHSL(float h, float s, float l);
|
||||
|
||||
// Returns color value specified by hue, saturation and lightness and alpha.
|
||||
// HSL values are all in range [0..1], alpha in range [0..255]
|
||||
NVGcolor nvgHSLA(float h, float s, float l, unsigned char a);
|
||||
|
||||
//
|
||||
// State Handling
|
||||
//
|
||||
// NanoVG contains state which represents how paths will be rendered.
|
||||
// The state contains transform, fill and stroke styles, text and font styles,
|
||||
// and scissor clipping.
|
||||
|
||||
// Pushes and saves the current render state into a state stack.
|
||||
// A matching nvgRestore() must be used to restore the state.
|
||||
void nvgSave(NVGcontext* ctx);
|
||||
|
||||
// Pops and restores current render state.
|
||||
void nvgRestore(NVGcontext* ctx);
|
||||
|
||||
// Resets current render state to default values. Does not affect the render state stack.
|
||||
void nvgReset(NVGcontext* ctx);
|
||||
|
||||
//
|
||||
// Render styles
|
||||
//
|
||||
// Fill and stroke render style can be either a solid color or a paint which is a gradient or a pattern.
|
||||
// Solid color is simply defined as a color value, different kinds of paints can be created
|
||||
// using nvgLinearGradient(), nvgBoxGradient(), nvgRadialGradient() and nvgImagePattern().
|
||||
//
|
||||
// Current render style can be saved and restored using nvgSave() and nvgRestore().
|
||||
|
||||
// Sets whether to draw antialias for nvgStroke() and nvgFill(). It's enabled by default.
|
||||
void nvgShapeAntiAlias(NVGcontext* ctx, int enabled);
|
||||
|
||||
// Sets current stroke style to a solid color.
|
||||
void nvgStrokeColor(NVGcontext* ctx, NVGcolor color);
|
||||
|
||||
// Sets current stroke style to a paint, which can be a one of the gradients or a pattern.
|
||||
void nvgStrokePaint(NVGcontext* ctx, NVGpaint paint);
|
||||
|
||||
// Sets current fill style to a solid color.
|
||||
void nvgFillColor(NVGcontext* ctx, NVGcolor color);
|
||||
|
||||
// Sets current fill style to a paint, which can be a one of the gradients or a pattern.
|
||||
void nvgFillPaint(NVGcontext* ctx, NVGpaint paint);
|
||||
|
||||
// Sets the miter limit of the stroke style.
|
||||
// Miter limit controls when a sharp corner is beveled.
|
||||
void nvgMiterLimit(NVGcontext* ctx, float limit);
|
||||
|
||||
// Sets the stroke width of the stroke style.
|
||||
void nvgStrokeWidth(NVGcontext* ctx, float size);
|
||||
|
||||
// Sets how the end of the line (cap) is drawn,
|
||||
// Can be one of: NVG_BUTT (default), NVG_ROUND, NVG_SQUARE.
|
||||
void nvgLineCap(NVGcontext* ctx, int cap);
|
||||
|
||||
// Sets how sharp path corners are drawn.
|
||||
// Can be one of NVG_MITER (default), NVG_ROUND, NVG_BEVEL.
|
||||
void nvgLineJoin(NVGcontext* ctx, int join);
|
||||
|
||||
// Sets the transparency applied to all rendered shapes.
|
||||
// Already transparent paths will get proportionally more transparent as well.
|
||||
void nvgGlobalAlpha(NVGcontext* ctx, float alpha);
|
||||
|
||||
//
|
||||
// Transforms
|
||||
//
|
||||
// The paths, gradients, patterns and scissor region are transformed by an transformation
|
||||
// matrix at the time when they are passed to the API.
|
||||
// The current transformation matrix is a affine matrix:
|
||||
// [sx kx tx]
|
||||
// [ky sy ty]
|
||||
// [ 0 0 1]
|
||||
// Where: sx,sy define scaling, kx,ky skewing, and tx,ty translation.
|
||||
// The last row is assumed to be 0,0,1 and is not stored.
|
||||
//
|
||||
// Apart from nvgResetTransform(), each transformation function first creates
|
||||
// specific transformation matrix and pre-multiplies the current transformation by it.
|
||||
//
|
||||
// Current coordinate system (transformation) can be saved and restored using nvgSave() and nvgRestore().
|
||||
|
||||
// Resets current transform to a identity matrix.
|
||||
void nvgResetTransform(NVGcontext* ctx);
|
||||
|
||||
// Premultiplies current coordinate system by specified matrix.
|
||||
// The parameters are interpreted as matrix as follows:
|
||||
// [a c e]
|
||||
// [b d f]
|
||||
// [0 0 1]
|
||||
void nvgTransform(NVGcontext* ctx, float a, float b, float c, float d, float e, float f);
|
||||
|
||||
// Translates current coordinate system.
|
||||
void nvgTranslate(NVGcontext* ctx, float x, float y);
|
||||
|
||||
// Rotates current coordinate system. Angle is specified in radians.
|
||||
void nvgRotate(NVGcontext* ctx, float angle);
|
||||
|
||||
// Skews the current coordinate system along X axis. Angle is specified in radians.
|
||||
void nvgSkewX(NVGcontext* ctx, float angle);
|
||||
|
||||
// Skews the current coordinate system along Y axis. Angle is specified in radians.
|
||||
void nvgSkewY(NVGcontext* ctx, float angle);
|
||||
|
||||
// Scales the current coordinate system.
|
||||
void nvgScale(NVGcontext* ctx, float x, float y);
|
||||
|
||||
// Stores the top part (a-f) of the current transformation matrix in to the specified buffer.
|
||||
// [a c e]
|
||||
// [b d f]
|
||||
// [0 0 1]
|
||||
// There should be space for 6 floats in the return buffer for the values a-f.
|
||||
void nvgCurrentTransform(NVGcontext* ctx, float* xform);
|
||||
|
||||
|
||||
// The following functions can be used to make calculations on 2x3 transformation matrices.
|
||||
// A 2x3 matrix is represented as float[6].
|
||||
|
||||
// Sets the transform to identity matrix.
|
||||
void nvgTransformIdentity(float* dst);
|
||||
|
||||
// Sets the transform to translation matrix matrix.
|
||||
void nvgTransformTranslate(float* dst, float tx, float ty);
|
||||
|
||||
// Sets the transform to scale matrix.
|
||||
void nvgTransformScale(float* dst, float sx, float sy);
|
||||
|
||||
// Sets the transform to rotate matrix. Angle is specified in radians.
|
||||
void nvgTransformRotate(float* dst, float a);
|
||||
|
||||
// Sets the transform to skew-x matrix. Angle is specified in radians.
|
||||
void nvgTransformSkewX(float* dst, float a);
|
||||
|
||||
// Sets the transform to skew-y matrix. Angle is specified in radians.
|
||||
void nvgTransformSkewY(float* dst, float a);
|
||||
|
||||
// Sets the transform to the result of multiplication of two transforms, of A = A*B.
|
||||
void nvgTransformMultiply(float* dst, const float* src);
|
||||
|
||||
// Sets the transform to the result of multiplication of two transforms, of A = B*A.
|
||||
void nvgTransformPremultiply(float* dst, const float* src);
|
||||
|
||||
// Sets the destination to inverse of specified transform.
|
||||
// Returns 1 if the inverse could be calculated, else 0.
|
||||
int nvgTransformInverse(float* dst, const float* src);
|
||||
|
||||
// Transform a point by given transform.
|
||||
void nvgTransformPoint(float* dstx, float* dsty, const float* xform, float srcx, float srcy);
|
||||
|
||||
// Converts degrees to radians and vice versa.
|
||||
float nvgDegToRad(float deg);
|
||||
float nvgRadToDeg(float rad);
|
||||
|
||||
//
|
||||
// Images
|
||||
//
|
||||
// NanoVG allows you to load jpg, png, psd, tga, pic and gif files to be used for rendering.
|
||||
// In addition you can upload your own image. The image loading is provided by stb_image.
|
||||
// The parameter imageFlags is combination of flags defined in NVGimageFlags.
|
||||
|
||||
// Creates image by loading it from the disk from specified file name.
|
||||
// Returns handle to the image.
|
||||
int nvgCreateImage(NVGcontext* ctx, const char* filename, int imageFlags);
|
||||
|
||||
// Creates image by loading it from the specified chunk of memory.
|
||||
// Returns handle to the image.
|
||||
int nvgCreateImageMem(NVGcontext* ctx, int imageFlags, unsigned char* data, int ndata);
|
||||
|
||||
// Creates image from specified image data.
|
||||
// Returns handle to the image.
|
||||
int nvgCreateImageRGBA(NVGcontext* ctx, int w, int h, int imageFlags, const unsigned char* data);
|
||||
|
||||
// Updates image data specified by image handle.
|
||||
void nvgUpdateImage(NVGcontext* ctx, int image, const unsigned char* data);
|
||||
|
||||
// Returns the dimensions of a created image.
|
||||
void nvgImageSize(NVGcontext* ctx, int image, int* w, int* h);
|
||||
|
||||
// Deletes created image.
|
||||
void nvgDeleteImage(NVGcontext* ctx, int image);
|
||||
|
||||
//
|
||||
// Paints
|
||||
//
|
||||
// NanoVG supports four types of paints: linear gradient, box gradient, radial gradient and image pattern.
|
||||
// These can be used as paints for strokes and fills.
|
||||
|
||||
// Creates and returns a linear gradient. Parameters (sx,sy)-(ex,ey) specify the start and end coordinates
|
||||
// of the linear gradient, icol specifies the start color and ocol the end color.
|
||||
// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint().
|
||||
NVGpaint nvgLinearGradient(NVGcontext* ctx, float sx, float sy, float ex, float ey,
|
||||
NVGcolor icol, NVGcolor ocol);
|
||||
|
||||
// Creates and returns a box gradient. Box gradient is a feathered rounded rectangle, it is useful for rendering
|
||||
// drop shadows or highlights for boxes. Parameters (x,y) define the top-left corner of the rectangle,
|
||||
// (w,h) define the size of the rectangle, r defines the corner radius, and f feather. Feather defines how blurry
|
||||
// the border of the rectangle is. Parameter icol specifies the inner color and ocol the outer color of the gradient.
|
||||
// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint().
|
||||
NVGpaint nvgBoxGradient(NVGcontext* ctx, float x, float y, float w, float h,
|
||||
float r, float f, NVGcolor icol, NVGcolor ocol);
|
||||
|
||||
// Creates and returns a radial gradient. Parameters (cx,cy) specify the center, inr and outr specify
|
||||
// the inner and outer radius of the gradient, icol specifies the start color and ocol the end color.
|
||||
// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint().
|
||||
NVGpaint nvgRadialGradient(NVGcontext* ctx, float cx, float cy, float inr, float outr,
|
||||
NVGcolor icol, NVGcolor ocol);
|
||||
|
||||
// Creates and returns an image pattern. Parameters (ox,oy) specify the left-top location of the image pattern,
|
||||
// (ex,ey) the size of one image, angle rotation around the top-left corner, image is handle to the image to render.
|
||||
// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint().
|
||||
NVGpaint nvgImagePattern(NVGcontext* ctx, float ox, float oy, float ex, float ey,
|
||||
float angle, int image, float alpha);
|
||||
|
||||
//
|
||||
// Scissoring
|
||||
//
|
||||
// Scissoring allows you to clip the rendering into a rectangle. This is useful for various
|
||||
// user interface cases like rendering a text edit or a timeline.
|
||||
|
||||
// Sets the current scissor rectangle.
|
||||
// The scissor rectangle is transformed by the current transform.
|
||||
void nvgScissor(NVGcontext* ctx, float x, float y, float w, float h);
|
||||
|
||||
// Intersects current scissor rectangle with the specified rectangle.
|
||||
// The scissor rectangle is transformed by the current transform.
|
||||
// Note: in case the rotation of previous scissor rect differs from
|
||||
// the current one, the intersection will be done between the specified
|
||||
// rectangle and the previous scissor rectangle transformed in the current
|
||||
// transform space. The resulting shape is always rectangle.
|
||||
void nvgIntersectScissor(NVGcontext* ctx, float x, float y, float w, float h);
|
||||
|
||||
// Reset and disables scissoring.
|
||||
void nvgResetScissor(NVGcontext* ctx);
|
||||
|
||||
//
|
||||
// Paths
|
||||
//
|
||||
// Drawing a new shape starts with nvgBeginPath(), it clears all the currently defined paths.
|
||||
// Then you define one or more paths and sub-paths which describe the shape. The are functions
|
||||
// to draw common shapes like rectangles and circles, and lower level step-by-step functions,
|
||||
// which allow to define a path curve by curve.
|
||||
//
|
||||
// NanoVG uses even-odd fill rule to draw the shapes. Solid shapes should have counter clockwise
|
||||
// winding and holes should have counter clockwise order. To specify winding of a path you can
|
||||
// call nvgPathWinding(). This is useful especially for the common shapes, which are drawn CCW.
|
||||
//
|
||||
// Finally you can fill the path using current fill style by calling nvgFill(), and stroke it
|
||||
// with current stroke style by calling nvgStroke().
|
||||
//
|
||||
// The curve segments and sub-paths are transformed by the current transform.
|
||||
|
||||
// Clears the current path and sub-paths.
|
||||
void nvgBeginPath(NVGcontext* ctx);
|
||||
|
||||
// Starts new sub-path with specified point as first point.
|
||||
void nvgMoveTo(NVGcontext* ctx, float x, float y);
|
||||
|
||||
// Adds line segment from the last point in the path to the specified point.
|
||||
void nvgLineTo(NVGcontext* ctx, float x, float y);
|
||||
|
||||
// Adds cubic bezier segment from last point in the path via two control points to the specified point.
|
||||
void nvgBezierTo(NVGcontext* ctx, float c1x, float c1y, float c2x, float c2y, float x, float y);
|
||||
|
||||
// Adds quadratic bezier segment from last point in the path via a control point to the specified point.
|
||||
void nvgQuadTo(NVGcontext* ctx, float cx, float cy, float x, float y);
|
||||
|
||||
// Adds an arc segment at the corner defined by the last path point, and two specified points.
|
||||
void nvgArcTo(NVGcontext* ctx, float x1, float y1, float x2, float y2, float radius);
|
||||
|
||||
// Closes current sub-path with a line segment.
|
||||
void nvgClosePath(NVGcontext* ctx);
|
||||
|
||||
// Sets the current sub-path winding, see NVGwinding and NVGsolidity.
|
||||
void nvgPathWinding(NVGcontext* ctx, int dir);
|
||||
|
||||
// Creates new circle arc shaped sub-path. The arc center is at cx,cy, the arc radius is r,
|
||||
// and the arc is drawn from angle a0 to a1, and swept in direction dir (NVG_CCW, or NVG_CW).
|
||||
// Angles are specified in radians.
|
||||
void nvgArc(NVGcontext* ctx, float cx, float cy, float r, float a0, float a1, int dir);
|
||||
|
||||
// Creates new rectangle shaped sub-path.
|
||||
void nvgRect(NVGcontext* ctx, float x, float y, float w, float h);
|
||||
|
||||
// Creates new rounded rectangle shaped sub-path.
|
||||
void nvgRoundedRect(NVGcontext* ctx, float x, float y, float w, float h, float r);
|
||||
|
||||
// Creates new rounded rectangle shaped sub-path with varying radii for each corner.
|
||||
void nvgRoundedRectVarying(NVGcontext* ctx, float x, float y, float w, float h, float radTopLeft, float radTopRight, float radBottomRight, float radBottomLeft);
|
||||
|
||||
// Creates new ellipse shaped sub-path.
|
||||
void nvgEllipse(NVGcontext* ctx, float cx, float cy, float rx, float ry);
|
||||
|
||||
// Creates new circle shaped sub-path.
|
||||
void nvgCircle(NVGcontext* ctx, float cx, float cy, float r);
|
||||
|
||||
// Fills the current path with current fill style.
|
||||
void nvgFill(NVGcontext* ctx);
|
||||
|
||||
// Fills the current path with current stroke style.
|
||||
void nvgStroke(NVGcontext* ctx);
|
||||
|
||||
|
||||
//
|
||||
// Text
|
||||
//
|
||||
// NanoVG allows you to load .ttf files and use the font to render text.
|
||||
//
|
||||
// The appearance of the text can be defined by setting the current text style
|
||||
// and by specifying the fill color. Common text and font settings such as
|
||||
// font size, letter spacing and text align are supported. Font blur allows you
|
||||
// to create simple text effects such as drop shadows.
|
||||
//
|
||||
// At render time the font face can be set based on the font handles or name.
|
||||
//
|
||||
// Font measure functions return values in local space, the calculations are
|
||||
// carried in the same resolution as the final rendering. This is done because
|
||||
// the text glyph positions are snapped to the nearest pixels sharp rendering.
|
||||
//
|
||||
// The local space means that values are not rotated or scale as per the current
|
||||
// transformation. For example if you set font size to 12, which would mean that
|
||||
// line height is 16, then regardless of the current scaling and rotation, the
|
||||
// returned line height is always 16. Some measures may vary because of the scaling
|
||||
// since aforementioned pixel snapping.
|
||||
//
|
||||
// While this may sound a little odd, the setup allows you to always render the
|
||||
// same way regardless of scaling. I.e. following works regardless of scaling:
|
||||
//
|
||||
// const char* txt = "Text me up.";
|
||||
// nvgTextBounds(vg, x,y, txt, NULL, bounds);
|
||||
// nvgBeginPath(vg);
|
||||
// nvgRoundedRect(vg, bounds[0],bounds[1], bounds[2]-bounds[0], bounds[3]-bounds[1]);
|
||||
// nvgFill(vg);
|
||||
//
|
||||
// Note: currently only solid color fill is supported for text.
|
||||
|
||||
// Creates font by loading it from the disk from specified file name.
|
||||
// Returns handle to the font.
|
||||
int nvgCreateFont(NVGcontext* ctx, const char* name, const char* filename);
|
||||
|
||||
// fontIndex specifies which font face to load from a .ttf/.ttc file.
|
||||
int nvgCreateFontAtIndex(NVGcontext* ctx, const char* name, const char* filename, const int fontIndex);
|
||||
|
||||
// Creates font by loading it from the specified memory chunk.
|
||||
// Returns handle to the font.
|
||||
int nvgCreateFontMem(NVGcontext* ctx, const char* name, unsigned char* data, int ndata, int freeData);
|
||||
|
||||
// fontIndex specifies which font face to load from a .ttf/.ttc file.
|
||||
int nvgCreateFontMemAtIndex(NVGcontext* ctx, const char* name, unsigned char* data, int ndata, int freeData, const int fontIndex);
|
||||
|
||||
// Finds a loaded font of specified name, and returns handle to it, or -1 if the font is not found.
|
||||
int nvgFindFont(NVGcontext* ctx, const char* name);
|
||||
|
||||
// Adds a fallback font by handle.
|
||||
int nvgAddFallbackFontId(NVGcontext* ctx, int baseFont, int fallbackFont);
|
||||
|
||||
// Adds a fallback font by name.
|
||||
int nvgAddFallbackFont(NVGcontext* ctx, const char* baseFont, const char* fallbackFont);
|
||||
|
||||
// Resets fallback fonts by handle.
|
||||
void nvgResetFallbackFontsId(NVGcontext* ctx, int baseFont);
|
||||
|
||||
// Resets fallback fonts by name.
|
||||
void nvgResetFallbackFonts(NVGcontext* ctx, const char* baseFont);
|
||||
|
||||
// Sets the font size of current text style.
|
||||
void nvgFontSize(NVGcontext* ctx, float size);
|
||||
|
||||
// Sets the blur of current text style.
|
||||
void nvgFontBlur(NVGcontext* ctx, float blur);
|
||||
|
||||
// Sets the letter spacing of current text style.
|
||||
void nvgTextLetterSpacing(NVGcontext* ctx, float spacing);
|
||||
|
||||
// Sets the proportional line height of current text style. The line height is specified as multiple of font size.
|
||||
void nvgTextLineHeight(NVGcontext* ctx, float lineHeight);
|
||||
|
||||
// Sets the text align of current text style, see NVGalign for options.
|
||||
void nvgTextAlign(NVGcontext* ctx, int align);
|
||||
|
||||
// Sets the font face based on specified id of current text style.
|
||||
void nvgFontFaceId(NVGcontext* ctx, int font);
|
||||
|
||||
// Sets the font face based on specified name of current text style.
|
||||
void nvgFontFace(NVGcontext* ctx, const char* font);
|
||||
|
||||
// Draws text string at specified location. If end is specified only the sub-string up to the end is drawn.
|
||||
float nvgText(NVGcontext* ctx, float x, float y, const char* string, const char* end);
|
||||
|
||||
// Draws multi-line text string at specified location wrapped at the specified width. If end is specified only the sub-string up to the end is drawn.
|
||||
// The text is split at word boundaries or when new-line characters are encountered.
|
||||
// Words longer than the max width are slit at nearest character (i.e. no hyphenation).
|
||||
void nvgTextBox(NVGcontext* ctx, float x, float y, float breakRowWidth, const char* string, const char* end);
|
||||
|
||||
// Measures the specified text string. Parameter bounds should be a pointer to float[4],
|
||||
// if the bounding box of the text should be returned. The bounds value are [xmin,ymin, xmax,ymax]
|
||||
// Returns the horizontal advance of the measured text (i.e. where the next character should drawn).
|
||||
// Measured values are returned in local coordinate space.
|
||||
float nvgTextBounds(NVGcontext* ctx, float x, float y, const char* string, const char* end, float* bounds);
|
||||
|
||||
// Measures the specified multi-text string. Parameter bounds should be a pointer to float[4],
|
||||
// if the bounding box of the text should be returned. The bounds value are [xmin,ymin, xmax,ymax]
|
||||
// Measured values are returned in local coordinate space.
|
||||
void nvgTextBoxBounds(NVGcontext* ctx, float x, float y, float breakRowWidth, const char* string, const char* end, float* bounds);
|
||||
|
||||
// Calculates the glyph x positions of the specified text. If end is specified only the sub-string will be used.
|
||||
// Measured values are returned in local coordinate space.
|
||||
int nvgTextGlyphPositions(NVGcontext* ctx, float x, float y, const char* string, const char* end, NVGglyphPosition* positions, int maxPositions);
|
||||
|
||||
// Returns the vertical metrics based on the current text style.
|
||||
// Measured values are returned in local coordinate space.
|
||||
void nvgTextMetrics(NVGcontext* ctx, float* ascender, float* descender, float* lineh);
|
||||
|
||||
// Breaks the specified text into lines. If end is specified only the sub-string will be used.
|
||||
// The text is split at word boundaries or when new-line characters are encountered.
|
||||
// Words longer than the max width are slit at nearest character (i.e. no hyphenation).
|
||||
int nvgTextBreakLines(NVGcontext* ctx, const char* string, const char* end, float breakRowWidth, NVGtextRow* rows, int maxRows);
|
||||
|
||||
//
|
||||
// Internal Render API
|
||||
//
|
||||
enum NVGtexture {
|
||||
NVG_TEXTURE_ALPHA = 0x01,
|
||||
NVG_TEXTURE_RGBA = 0x02,
|
||||
};
|
||||
|
||||
struct NVGscissor {
|
||||
float xform[6];
|
||||
float extent[2];
|
||||
};
|
||||
typedef struct NVGscissor NVGscissor;
|
||||
|
||||
struct NVGvertex {
|
||||
float x,y,u,v;
|
||||
};
|
||||
typedef struct NVGvertex NVGvertex;
|
||||
|
||||
struct NVGpath {
|
||||
int first;
|
||||
int count;
|
||||
unsigned char closed;
|
||||
int nbevel;
|
||||
NVGvertex* fill;
|
||||
int nfill;
|
||||
NVGvertex* stroke;
|
||||
int nstroke;
|
||||
int winding;
|
||||
int convex;
|
||||
};
|
||||
typedef struct NVGpath NVGpath;
|
||||
|
||||
struct NVGparams {
|
||||
void* userPtr;
|
||||
int edgeAntiAlias;
|
||||
int (*renderCreate)(void* uptr);
|
||||
int (*renderCreateTexture)(void* uptr, int type, int w, int h, int imageFlags, const unsigned char* data);
|
||||
int (*renderDeleteTexture)(void* uptr, int image);
|
||||
int (*renderUpdateTexture)(void* uptr, int image, int x, int y, int w, int h, const unsigned char* data);
|
||||
int (*renderGetTextureSize)(void* uptr, int image, int* w, int* h);
|
||||
void (*renderViewport)(void* uptr, float width, float height, float devicePixelRatio);
|
||||
void (*renderCancel)(void* uptr);
|
||||
void (*renderFlush)(void* uptr);
|
||||
void (*renderFill)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, const float* bounds, const NVGpath* paths, int npaths);
|
||||
void (*renderStroke)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, float strokeWidth, const NVGpath* paths, int npaths);
|
||||
void (*renderTriangles)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, const NVGvertex* verts, int nverts, float fringe);
|
||||
void (*renderDelete)(void* uptr);
|
||||
};
|
||||
typedef struct NVGparams NVGparams;
|
||||
|
||||
// Constructor and destructor, called by the render back-end.
|
||||
NVGcontext* nvgCreateInternal(NVGparams* params);
|
||||
void nvgDeleteInternal(NVGcontext* ctx);
|
||||
|
||||
NVGparams* nvgInternalParams(NVGcontext* ctx);
|
||||
|
||||
// Debug function to dump cached path data.
|
||||
void nvgDebugDumpPathCache(NVGcontext* ctx);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#define NVG_NOTUSED(v) for (;;) { (void)(1 ? (void)0 : ( (void)(v) ) ); break; }
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // NANOVG_H
|
||||
1566
nanovg/nanovg_d3d11.h
Normal file
1566
nanovg/nanovg_d3d11.h
Normal file
File diff suppressed because it is too large
Load Diff
1665
nanovg/nanovg_gl.h
Normal file
1665
nanovg/nanovg_gl.h
Normal file
File diff suppressed because it is too large
Load Diff
630
nanovg/nvg_shader/D3D11PixelShader.h
Normal file
630
nanovg/nvg_shader/D3D11PixelShader.h
Normal file
@@ -0,0 +1,630 @@
|
||||
#if 0
|
||||
//
|
||||
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
|
||||
//
|
||||
//
|
||||
// Buffer Definitions:
|
||||
//
|
||||
// cbuffer PS_CONSTANTS
|
||||
// {
|
||||
//
|
||||
// float4x4 scissorMat; // Offset: 0 Size: 64
|
||||
// float4 scissorExt; // Offset: 64 Size: 16
|
||||
// float4 scissorScale; // Offset: 80 Size: 16
|
||||
// float4x4 paintMat; // Offset: 96 Size: 64
|
||||
// float4 extent; // Offset: 160 Size: 16
|
||||
// float4 radius; // Offset: 176 Size: 16
|
||||
// float4 feather; // Offset: 192 Size: 16
|
||||
// float4 innerCol; // Offset: 208 Size: 16
|
||||
// float4 outerCol; // Offset: 224 Size: 16
|
||||
// float4 strokeMult; // Offset: 240 Size: 16 [unused]
|
||||
// int texType; // Offset: 256 Size: 4
|
||||
// int type; // Offset: 260 Size: 4
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// Resource Bindings:
|
||||
//
|
||||
// Name Type Format Dim HLSL Bind Count
|
||||
// ------------------------------ ---------- ------- ----------- -------------- ------
|
||||
// g_sampler sampler NA NA s0 1
|
||||
// g_texture texture float4 2d t0 1
|
||||
// PS_CONSTANTS cbuffer NA NA cb0 1
|
||||
//
|
||||
//
|
||||
//
|
||||
// Input signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// SV_Position 0 xyzw 0 POS float
|
||||
// TEXCOORD 0 xy 1 NONE float xy
|
||||
// TEXCOORD 1 zw 1 NONE float zw
|
||||
//
|
||||
//
|
||||
// Output signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// SV_TARGET 0 xyzw 0 TARGET float xyzw
|
||||
//
|
||||
ps_5_0
|
||||
dcl_globalFlags refactoringAllowed
|
||||
dcl_constantbuffer CB0[17], immediateIndexed
|
||||
dcl_sampler s0, mode_default
|
||||
dcl_resource_texture2d (float,float,float,float) t0
|
||||
dcl_input_ps linear v1.xy
|
||||
dcl_input_ps linear v1.zw
|
||||
dcl_output o0.xyzw
|
||||
dcl_temps 3
|
||||
mul r0.xy, v1.wwww, cb0[1].xyxx
|
||||
mad r0.xy, cb0[0].xyxx, v1.zzzz, r0.xyxx
|
||||
add r0.xy, r0.xyxx, cb0[2].xyxx
|
||||
add r0.xy, |r0.xyxx|, -cb0[4].xyxx
|
||||
mad_sat r0.xy, -r0.xyxx, cb0[5].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
|
||||
mul r0.x, r0.y, r0.x
|
||||
if_z cb0[16].y
|
||||
mul r0.yz, v1.wwww, cb0[7].xxyx
|
||||
mad r0.yz, cb0[6].xxyx, v1.zzzz, r0.yyzy
|
||||
add r0.yz, r0.yyzy, cb0[8].xxyx
|
||||
add r1.xy, cb0[10].xyxx, -cb0[11].xxxx
|
||||
add r0.yz, |r0.yyzy|, -r1.xxyx
|
||||
max r0.w, r0.z, r0.y
|
||||
min r0.w, r0.w, l(0.000000)
|
||||
max r0.yz, r0.yyzy, l(0.000000, 0.000000, 0.000000, 0.000000)
|
||||
dp2 r0.y, r0.yzyy, r0.yzyy
|
||||
sqrt r0.y, r0.y
|
||||
add r0.y, r0.y, r0.w
|
||||
add r0.y, r0.y, -cb0[11].x
|
||||
mad r0.y, cb0[12].x, l(0.500000), r0.y
|
||||
div_sat r0.y, r0.y, cb0[12].x
|
||||
add r1.xyzw, -cb0[13].xyzw, cb0[14].xyzw
|
||||
mad r1.xyzw, r0.yyyy, r1.xyzw, cb0[13].xyzw
|
||||
mul o0.xyzw, r0.xxxx, r1.xyzw
|
||||
else
|
||||
ieq r0.y, cb0[16].y, l(1)
|
||||
if_nz r0.y
|
||||
mul r0.yz, v1.wwww, cb0[7].xxyx
|
||||
mad r0.yz, cb0[6].xxyx, v1.zzzz, r0.yyzy
|
||||
add r0.yz, r0.yyzy, cb0[8].xxyx
|
||||
div r0.yz, r0.yyzy, cb0[10].xxyx
|
||||
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, r0.yzyy, t0.xyzw, s0
|
||||
ieq r0.yz, cb0[16].xxxx, l(0, 1, 2, 0)
|
||||
mul r2.xyz, r1.wwww, r1.xyzx
|
||||
movc r1.xyz, r0.yyyy, r2.xyzx, r1.xyzx
|
||||
movc r1.yzw, r0.zzzz, r1.xxxx, r1.yyzw
|
||||
mul r1.xyzw, r1.xyzw, cb0[13].xyzw
|
||||
mul o0.xyzw, r0.xxxx, r1.xyzw
|
||||
else
|
||||
ieq r0.y, cb0[16].y, l(2)
|
||||
if_nz r0.y
|
||||
mov o0.xyzw, l(1.000000,1.000000,1.000000,1.000000)
|
||||
else
|
||||
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v1.xyxx, t0.xyzw, s0
|
||||
ieq r0.yz, cb0[16].xxxx, l(0, 1, 2, 0)
|
||||
mul r2.xyz, r1.wwww, r1.xyzx
|
||||
movc r1.xyz, r0.yyyy, r2.xyzx, r1.xyzx
|
||||
movc r1.yzw, r0.zzzz, r1.xxxx, r1.yyzw
|
||||
mul r0.xyzw, r0.xxxx, r1.xyzw
|
||||
mul o0.xyzw, r0.xyzw, cb0[13].xyzw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ret
|
||||
// Approximately 54 instruction slots used
|
||||
#endif
|
||||
|
||||
const BYTE g_D3D11PixelShader_Main[] =
|
||||
{
|
||||
68, 88, 66, 67, 78, 73,
|
||||
165, 189, 231, 111, 49, 210,
|
||||
111, 23, 174, 9, 214, 35,
|
||||
203, 76, 1, 0, 0, 0,
|
||||
244, 11, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
16, 4, 0, 0, 128, 4,
|
||||
0, 0, 180, 4, 0, 0,
|
||||
88, 11, 0, 0, 82, 68,
|
||||
69, 70, 212, 3, 0, 0,
|
||||
1, 0, 0, 0, 192, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
60, 0, 0, 0, 0, 5,
|
||||
255, 255, 0, 1, 0, 0,
|
||||
169, 3, 0, 0, 82, 68,
|
||||
49, 49, 60, 0, 0, 0,
|
||||
24, 0, 0, 0, 32, 0,
|
||||
0, 0, 40, 0, 0, 0,
|
||||
36, 0, 0, 0, 12, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
156, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 1, 0,
|
||||
0, 0, 166, 0, 0, 0,
|
||||
2, 0, 0, 0, 5, 0,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
13, 0, 0, 0, 176, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
103, 95, 115, 97, 109, 112,
|
||||
108, 101, 114, 0, 103, 95,
|
||||
116, 101, 120, 116, 117, 114,
|
||||
101, 0, 80, 83, 95, 67,
|
||||
79, 78, 83, 84, 65, 78,
|
||||
84, 83, 0, 171, 171, 171,
|
||||
176, 0, 0, 0, 12, 0,
|
||||
0, 0, 216, 0, 0, 0,
|
||||
16, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
184, 2, 0, 0, 0, 0,
|
||||
0, 0, 64, 0, 0, 0,
|
||||
2, 0, 0, 0, 204, 2,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 240, 2,
|
||||
0, 0, 64, 0, 0, 0,
|
||||
16, 0, 0, 0, 2, 0,
|
||||
0, 0, 4, 3, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 40, 3, 0, 0,
|
||||
80, 0, 0, 0, 16, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
4, 3, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
53, 3, 0, 0, 96, 0,
|
||||
0, 0, 64, 0, 0, 0,
|
||||
2, 0, 0, 0, 204, 2,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 62, 3,
|
||||
0, 0, 160, 0, 0, 0,
|
||||
16, 0, 0, 0, 2, 0,
|
||||
0, 0, 4, 3, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 69, 3, 0, 0,
|
||||
176, 0, 0, 0, 16, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
4, 3, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
76, 3, 0, 0, 192, 0,
|
||||
0, 0, 16, 0, 0, 0,
|
||||
2, 0, 0, 0, 4, 3,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 84, 3,
|
||||
0, 0, 208, 0, 0, 0,
|
||||
16, 0, 0, 0, 2, 0,
|
||||
0, 0, 4, 3, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 93, 3, 0, 0,
|
||||
224, 0, 0, 0, 16, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
4, 3, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
102, 3, 0, 0, 240, 0,
|
||||
0, 0, 16, 0, 0, 0,
|
||||
0, 0, 0, 0, 4, 3,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 113, 3,
|
||||
0, 0, 0, 1, 0, 0,
|
||||
4, 0, 0, 0, 2, 0,
|
||||
0, 0, 128, 3, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 164, 3, 0, 0,
|
||||
4, 1, 0, 0, 4, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
128, 3, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
115, 99, 105, 115, 115, 111,
|
||||
114, 77, 97, 116, 0, 102,
|
||||
108, 111, 97, 116, 52, 120,
|
||||
52, 0, 3, 0, 3, 0,
|
||||
4, 0, 4, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 195, 2,
|
||||
0, 0, 115, 99, 105, 115,
|
||||
115, 111, 114, 69, 120, 116,
|
||||
0, 102, 108, 111, 97, 116,
|
||||
52, 0, 171, 171, 1, 0,
|
||||
3, 0, 1, 0, 4, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
251, 2, 0, 0, 115, 99,
|
||||
105, 115, 115, 111, 114, 83,
|
||||
99, 97, 108, 101, 0, 112,
|
||||
97, 105, 110, 116, 77, 97,
|
||||
116, 0, 101, 120, 116, 101,
|
||||
110, 116, 0, 114, 97, 100,
|
||||
105, 117, 115, 0, 102, 101,
|
||||
97, 116, 104, 101, 114, 0,
|
||||
105, 110, 110, 101, 114, 67,
|
||||
111, 108, 0, 111, 117, 116,
|
||||
101, 114, 67, 111, 108, 0,
|
||||
115, 116, 114, 111, 107, 101,
|
||||
77, 117, 108, 116, 0, 116,
|
||||
101, 120, 84, 121, 112, 101,
|
||||
0, 105, 110, 116, 0, 171,
|
||||
171, 171, 0, 0, 2, 0,
|
||||
1, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 121, 3,
|
||||
0, 0, 116, 121, 112, 101,
|
||||
0, 77, 105, 99, 114, 111,
|
||||
115, 111, 102, 116, 32, 40,
|
||||
82, 41, 32, 72, 76, 83,
|
||||
76, 32, 83, 104, 97, 100,
|
||||
101, 114, 32, 67, 111, 109,
|
||||
112, 105, 108, 101, 114, 32,
|
||||
49, 48, 46, 49, 0, 171,
|
||||
171, 171, 73, 83, 71, 78,
|
||||
104, 0, 0, 0, 3, 0,
|
||||
0, 0, 8, 0, 0, 0,
|
||||
80, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 15, 0, 0, 0,
|
||||
92, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 1, 0,
|
||||
0, 0, 3, 3, 0, 0,
|
||||
92, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 1, 0,
|
||||
0, 0, 12, 12, 0, 0,
|
||||
83, 86, 95, 80, 111, 115,
|
||||
105, 116, 105, 111, 110, 0,
|
||||
84, 69, 88, 67, 79, 79,
|
||||
82, 68, 0, 171, 171, 171,
|
||||
79, 83, 71, 78, 44, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
8, 0, 0, 0, 32, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
15, 0, 0, 0, 83, 86,
|
||||
95, 84, 65, 82, 71, 69,
|
||||
84, 0, 171, 171, 83, 72,
|
||||
69, 88, 156, 6, 0, 0,
|
||||
80, 0, 0, 0, 167, 1,
|
||||
0, 0, 106, 8, 0, 1,
|
||||
89, 0, 0, 4, 70, 142,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
17, 0, 0, 0, 90, 0,
|
||||
0, 3, 0, 96, 16, 0,
|
||||
0, 0, 0, 0, 88, 24,
|
||||
0, 4, 0, 112, 16, 0,
|
||||
0, 0, 0, 0, 85, 85,
|
||||
0, 0, 98, 16, 0, 3,
|
||||
50, 16, 16, 0, 1, 0,
|
||||
0, 0, 98, 16, 0, 3,
|
||||
194, 16, 16, 0, 1, 0,
|
||||
0, 0, 101, 0, 0, 3,
|
||||
242, 32, 16, 0, 0, 0,
|
||||
0, 0, 104, 0, 0, 2,
|
||||
3, 0, 0, 0, 56, 0,
|
||||
0, 8, 50, 0, 16, 0,
|
||||
0, 0, 0, 0, 246, 31,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
70, 128, 32, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
50, 0, 0, 10, 50, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 128, 32, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
166, 26, 16, 0, 1, 0,
|
||||
0, 0, 70, 0, 16, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 8, 50, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 128, 32, 0, 0, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
0, 0, 0, 10, 50, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 0, 16, 128, 129, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
70, 128, 32, 128, 65, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
4, 0, 0, 0, 50, 32,
|
||||
0, 14, 50, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 0,
|
||||
16, 128, 65, 0, 0, 0,
|
||||
0, 0, 0, 0, 70, 128,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
5, 0, 0, 0, 2, 64,
|
||||
0, 0, 0, 0, 0, 63,
|
||||
0, 0, 0, 63, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
56, 0, 0, 7, 18, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
26, 0, 16, 0, 0, 0,
|
||||
0, 0, 10, 0, 16, 0,
|
||||
0, 0, 0, 0, 31, 0,
|
||||
0, 4, 26, 128, 32, 0,
|
||||
0, 0, 0, 0, 16, 0,
|
||||
0, 0, 56, 0, 0, 8,
|
||||
98, 0, 16, 0, 0, 0,
|
||||
0, 0, 246, 31, 16, 0,
|
||||
1, 0, 0, 0, 6, 129,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
7, 0, 0, 0, 50, 0,
|
||||
0, 10, 98, 0, 16, 0,
|
||||
0, 0, 0, 0, 6, 129,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
6, 0, 0, 0, 166, 26,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
86, 6, 16, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 8,
|
||||
98, 0, 16, 0, 0, 0,
|
||||
0, 0, 86, 6, 16, 0,
|
||||
0, 0, 0, 0, 6, 129,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
8, 0, 0, 0, 0, 0,
|
||||
0, 10, 50, 0, 16, 0,
|
||||
1, 0, 0, 0, 70, 128,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
10, 0, 0, 0, 6, 128,
|
||||
32, 128, 65, 0, 0, 0,
|
||||
0, 0, 0, 0, 11, 0,
|
||||
0, 0, 0, 0, 0, 9,
|
||||
98, 0, 16, 0, 0, 0,
|
||||
0, 0, 86, 6, 16, 128,
|
||||
129, 0, 0, 0, 0, 0,
|
||||
0, 0, 6, 1, 16, 128,
|
||||
65, 0, 0, 0, 1, 0,
|
||||
0, 0, 52, 0, 0, 7,
|
||||
130, 0, 16, 0, 0, 0,
|
||||
0, 0, 42, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
51, 0, 0, 7, 130, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
58, 0, 16, 0, 0, 0,
|
||||
0, 0, 1, 64, 0, 0,
|
||||
0, 0, 0, 0, 52, 0,
|
||||
0, 10, 98, 0, 16, 0,
|
||||
0, 0, 0, 0, 86, 6,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
2, 64, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 15, 0, 0, 7,
|
||||
34, 0, 16, 0, 0, 0,
|
||||
0, 0, 150, 5, 16, 0,
|
||||
0, 0, 0, 0, 150, 5,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
75, 0, 0, 5, 34, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
26, 0, 16, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 7,
|
||||
34, 0, 16, 0, 0, 0,
|
||||
0, 0, 26, 0, 16, 0,
|
||||
0, 0, 0, 0, 58, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 9, 34, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
26, 0, 16, 0, 0, 0,
|
||||
0, 0, 10, 128, 32, 128,
|
||||
65, 0, 0, 0, 0, 0,
|
||||
0, 0, 11, 0, 0, 0,
|
||||
50, 0, 0, 10, 34, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
10, 128, 32, 0, 0, 0,
|
||||
0, 0, 12, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
0, 63, 26, 0, 16, 0,
|
||||
0, 0, 0, 0, 14, 32,
|
||||
0, 8, 34, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
10, 128, 32, 0, 0, 0,
|
||||
0, 0, 12, 0, 0, 0,
|
||||
0, 0, 0, 10, 242, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
70, 142, 32, 128, 65, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
13, 0, 0, 0, 70, 142,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
14, 0, 0, 0, 50, 0,
|
||||
0, 10, 242, 0, 16, 0,
|
||||
1, 0, 0, 0, 86, 5,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 14, 16, 0, 1, 0,
|
||||
0, 0, 70, 142, 32, 0,
|
||||
0, 0, 0, 0, 13, 0,
|
||||
0, 0, 56, 0, 0, 7,
|
||||
242, 32, 16, 0, 0, 0,
|
||||
0, 0, 6, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 14,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
18, 0, 0, 1, 32, 0,
|
||||
0, 8, 34, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 128,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
16, 0, 0, 0, 1, 64,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
31, 0, 4, 3, 26, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
56, 0, 0, 8, 98, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
246, 31, 16, 0, 1, 0,
|
||||
0, 0, 6, 129, 32, 0,
|
||||
0, 0, 0, 0, 7, 0,
|
||||
0, 0, 50, 0, 0, 10,
|
||||
98, 0, 16, 0, 0, 0,
|
||||
0, 0, 6, 129, 32, 0,
|
||||
0, 0, 0, 0, 6, 0,
|
||||
0, 0, 166, 26, 16, 0,
|
||||
1, 0, 0, 0, 86, 6,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 8, 98, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
86, 6, 16, 0, 0, 0,
|
||||
0, 0, 6, 129, 32, 0,
|
||||
0, 0, 0, 0, 8, 0,
|
||||
0, 0, 14, 0, 0, 8,
|
||||
98, 0, 16, 0, 0, 0,
|
||||
0, 0, 86, 6, 16, 0,
|
||||
0, 0, 0, 0, 6, 129,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
10, 0, 0, 0, 69, 0,
|
||||
0, 139, 194, 0, 0, 128,
|
||||
67, 85, 21, 0, 242, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
150, 5, 16, 0, 0, 0,
|
||||
0, 0, 70, 126, 16, 0,
|
||||
0, 0, 0, 0, 0, 96,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
32, 0, 0, 11, 98, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
6, 128, 32, 0, 0, 0,
|
||||
0, 0, 16, 0, 0, 0,
|
||||
2, 64, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
2, 0, 0, 0, 0, 0,
|
||||
0, 0, 56, 0, 0, 7,
|
||||
114, 0, 16, 0, 2, 0,
|
||||
0, 0, 246, 15, 16, 0,
|
||||
1, 0, 0, 0, 70, 2,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
55, 0, 0, 9, 114, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
86, 5, 16, 0, 0, 0,
|
||||
0, 0, 70, 2, 16, 0,
|
||||
2, 0, 0, 0, 70, 2,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
55, 0, 0, 9, 226, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
166, 10, 16, 0, 0, 0,
|
||||
0, 0, 6, 0, 16, 0,
|
||||
1, 0, 0, 0, 86, 14,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
56, 0, 0, 8, 242, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
70, 14, 16, 0, 1, 0,
|
||||
0, 0, 70, 142, 32, 0,
|
||||
0, 0, 0, 0, 13, 0,
|
||||
0, 0, 56, 0, 0, 7,
|
||||
242, 32, 16, 0, 0, 0,
|
||||
0, 0, 6, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 14,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
18, 0, 0, 1, 32, 0,
|
||||
0, 8, 34, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 128,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
16, 0, 0, 0, 1, 64,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
31, 0, 4, 3, 26, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
54, 0, 0, 8, 242, 32,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
2, 64, 0, 0, 0, 0,
|
||||
128, 63, 0, 0, 128, 63,
|
||||
0, 0, 128, 63, 0, 0,
|
||||
128, 63, 18, 0, 0, 1,
|
||||
69, 0, 0, 139, 194, 0,
|
||||
0, 128, 67, 85, 21, 0,
|
||||
242, 0, 16, 0, 1, 0,
|
||||
0, 0, 70, 16, 16, 0,
|
||||
1, 0, 0, 0, 70, 126,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
0, 96, 16, 0, 0, 0,
|
||||
0, 0, 32, 0, 0, 11,
|
||||
98, 0, 16, 0, 0, 0,
|
||||
0, 0, 6, 128, 32, 0,
|
||||
0, 0, 0, 0, 16, 0,
|
||||
0, 0, 2, 64, 0, 0,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
0, 0, 0, 0, 56, 0,
|
||||
0, 7, 114, 0, 16, 0,
|
||||
2, 0, 0, 0, 246, 15,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
70, 2, 16, 0, 1, 0,
|
||||
0, 0, 55, 0, 0, 9,
|
||||
114, 0, 16, 0, 1, 0,
|
||||
0, 0, 86, 5, 16, 0,
|
||||
0, 0, 0, 0, 70, 2,
|
||||
16, 0, 2, 0, 0, 0,
|
||||
70, 2, 16, 0, 1, 0,
|
||||
0, 0, 55, 0, 0, 9,
|
||||
226, 0, 16, 0, 1, 0,
|
||||
0, 0, 166, 10, 16, 0,
|
||||
0, 0, 0, 0, 6, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
86, 14, 16, 0, 1, 0,
|
||||
0, 0, 56, 0, 0, 7,
|
||||
242, 0, 16, 0, 0, 0,
|
||||
0, 0, 6, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 14,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
56, 0, 0, 8, 242, 32,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 14, 16, 0, 0, 0,
|
||||
0, 0, 70, 142, 32, 0,
|
||||
0, 0, 0, 0, 13, 0,
|
||||
0, 0, 21, 0, 0, 1,
|
||||
21, 0, 0, 1, 21, 0,
|
||||
0, 1, 62, 0, 0, 1,
|
||||
83, 84, 65, 84, 148, 0,
|
||||
0, 0, 54, 0, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
33, 0, 0, 0, 4, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
5, 0, 0, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 4, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0
|
||||
};
|
||||
107
nanovg/nvg_shader/D3D11PixelShader.hlsl
Normal file
107
nanovg/nvg_shader/D3D11PixelShader.hlsl
Normal file
@@ -0,0 +1,107 @@
|
||||
Texture2D g_texture : register(t0);
|
||||
SamplerState g_sampler : register(s0);
|
||||
|
||||
struct PS_INPUT
|
||||
{
|
||||
float4 position : SV_Position; // vertex position
|
||||
float2 ftcoord : TEXCOORD0; // float 2 tex coord
|
||||
float2 fpos : TEXCOORD1; // float 2 position
|
||||
};
|
||||
|
||||
cbuffer PS_CONSTANTS
|
||||
{
|
||||
float4x4 scissorMat;
|
||||
float4 scissorExt;
|
||||
float4 scissorScale;
|
||||
float4x4 paintMat;
|
||||
float4 extent;
|
||||
float4 radius;
|
||||
float4 feather;
|
||||
float4 innerCol;
|
||||
float4 outerCol;
|
||||
float4 strokeMult;
|
||||
int texType;
|
||||
int type;
|
||||
};
|
||||
|
||||
|
||||
float sdroundrect(float2 pt, float2 ext, float rad)
|
||||
{
|
||||
float2 ext2 = ext - float2(rad,rad);
|
||||
float2 d = abs(pt) - ext2;
|
||||
return min(max(d.x,d.y),0.0) + length(max(d,0.0)) - rad;
|
||||
}
|
||||
|
||||
// Scissoring
|
||||
float scissorMask(float2 p)
|
||||
{
|
||||
float2 sc = (abs((mul((float3x3)scissorMat, float3(p.x, p.y, 1.0))).xy) - scissorExt.xy);
|
||||
sc = float2(0.5,0.5) - sc * scissorScale.xy;
|
||||
return clamp(sc.x,0.0,1.0) * clamp(sc.y,0.0,1.0);
|
||||
}
|
||||
|
||||
#ifdef EDGE_AA
|
||||
// Stroke - from [0..1] to clipped pyramid, where the slope is 1px.
|
||||
float strokeMask(float2 ftcoord)
|
||||
{
|
||||
return min(1.0, (1.0 - abs(ftcoord.x*2.0 - 1.0))*strokeMult.x) * min(1.0f, ftcoord.y);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef EDGE_AA
|
||||
float4 D3D11PixelShaderAA_Main(PS_INPUT input) : SV_TARGET
|
||||
#else
|
||||
float4 D3D11PixelShader_Main(PS_INPUT input) : SV_TARGET
|
||||
#endif
|
||||
{
|
||||
float4 result;
|
||||
float scissor = scissorMask(input.fpos);
|
||||
#ifdef EDGE_AA
|
||||
float strokeAlpha = strokeMask(input.ftcoord);
|
||||
if (strokeAlpha < strokeMult.y)
|
||||
discard;
|
||||
#else
|
||||
float strokeAlpha = 1.0f;
|
||||
#endif
|
||||
if (type == 0)
|
||||
{
|
||||
// Calculate gradient color using box gradient
|
||||
float2 pt = (mul((float3x3)paintMat, float3(input.fpos,1.0))).xy;
|
||||
float d = clamp((sdroundrect(pt, extent.xy, radius.x) + feather.x*0.5) / feather.x, 0.0, 1.0);
|
||||
float4 color = lerp(innerCol, outerCol, d);
|
||||
|
||||
// Combine alpha
|
||||
color *= strokeAlpha * scissor;
|
||||
result = color;
|
||||
}
|
||||
else if (type == 1)
|
||||
{
|
||||
// Calculate color fron texture
|
||||
float2 pt = (mul((float3x3)paintMat, float3(input.fpos,1.0))).xy / extent.xy;
|
||||
float4 color = g_texture.Sample(g_sampler, pt);
|
||||
if (texType == 1) color = float4(color.xyz*color.w,color.w);
|
||||
if (texType == 2) color = float4(color.x, color.x, color.x, color.x);
|
||||
|
||||
// Apply color tint and alpha.
|
||||
color *= innerCol;
|
||||
// Combine alpha
|
||||
color *= strokeAlpha * scissor;
|
||||
result = color;
|
||||
}
|
||||
else if (type == 2)
|
||||
{
|
||||
// Stencil fill
|
||||
result = float4(1,1,1,1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Textured tris
|
||||
float4 color = g_texture.Sample(g_sampler, input.ftcoord);
|
||||
if (texType == 1) color = float4(color.xyz*color.w,color.w);
|
||||
if (texType == 2) color = float4(color.x, color.x, color.x, color.x);
|
||||
color *= scissor;
|
||||
result = (color * innerCol);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
688
nanovg/nvg_shader/D3D11PixelShaderAA.h
Normal file
688
nanovg/nvg_shader/D3D11PixelShaderAA.h
Normal file
@@ -0,0 +1,688 @@
|
||||
#if 0
|
||||
//
|
||||
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
|
||||
//
|
||||
//
|
||||
// Buffer Definitions:
|
||||
//
|
||||
// cbuffer PS_CONSTANTS
|
||||
// {
|
||||
//
|
||||
// float4x4 scissorMat; // Offset: 0 Size: 64
|
||||
// float4 scissorExt; // Offset: 64 Size: 16
|
||||
// float4 scissorScale; // Offset: 80 Size: 16
|
||||
// float4x4 paintMat; // Offset: 96 Size: 64
|
||||
// float4 extent; // Offset: 160 Size: 16
|
||||
// float4 radius; // Offset: 176 Size: 16
|
||||
// float4 feather; // Offset: 192 Size: 16
|
||||
// float4 innerCol; // Offset: 208 Size: 16
|
||||
// float4 outerCol; // Offset: 224 Size: 16
|
||||
// float4 strokeMult; // Offset: 240 Size: 16
|
||||
// int texType; // Offset: 256 Size: 4
|
||||
// int type; // Offset: 260 Size: 4
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// Resource Bindings:
|
||||
//
|
||||
// Name Type Format Dim HLSL Bind Count
|
||||
// ------------------------------ ---------- ------- ----------- -------------- ------
|
||||
// g_sampler sampler NA NA s0 1
|
||||
// g_texture texture float4 2d t0 1
|
||||
// PS_CONSTANTS cbuffer NA NA cb0 1
|
||||
//
|
||||
//
|
||||
//
|
||||
// Input signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// SV_Position 0 xyzw 0 POS float
|
||||
// TEXCOORD 0 xy 1 NONE float xy
|
||||
// TEXCOORD 1 zw 1 NONE float zw
|
||||
//
|
||||
//
|
||||
// Output signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// SV_TARGET 0 xyzw 0 TARGET float xyzw
|
||||
//
|
||||
ps_5_0
|
||||
dcl_globalFlags refactoringAllowed
|
||||
dcl_constantbuffer CB0[17], immediateIndexed
|
||||
dcl_sampler s0, mode_default
|
||||
dcl_resource_texture2d (float,float,float,float) t0
|
||||
dcl_input_ps linear v1.xy
|
||||
dcl_input_ps linear v1.zw
|
||||
dcl_output o0.xyzw
|
||||
dcl_temps 3
|
||||
mad r0.x, v1.x, l(2.000000), l(-1.000000)
|
||||
add r0.x, -|r0.x|, l(1.000000)
|
||||
mul r0.x, r0.x, cb0[15].x
|
||||
min r0.x, r0.x, l(1.000000)
|
||||
min r0.y, v1.y, l(1.000000)
|
||||
mul r0.x, r0.y, r0.x
|
||||
lt r0.y, r0.x, cb0[15].y
|
||||
discard_nz r0.y
|
||||
mul r0.yz, v1.wwww, cb0[1].xxyx
|
||||
mad r0.yz, cb0[0].xxyx, v1.zzzz, r0.yyzy
|
||||
add r0.yz, r0.yyzy, cb0[2].xxyx
|
||||
add r0.yz, |r0.yyzy|, -cb0[4].xxyx
|
||||
mad_sat r0.yz, -r0.yyzy, cb0[5].xxyx, l(0.000000, 0.500000, 0.500000, 0.000000)
|
||||
mul r0.y, r0.z, r0.y
|
||||
if_z cb0[16].y
|
||||
mul r0.zw, v1.wwww, cb0[7].xxxy
|
||||
mad r0.zw, cb0[6].xxxy, v1.zzzz, r0.zzzw
|
||||
add r0.zw, r0.zzzw, cb0[8].xxxy
|
||||
add r1.xy, cb0[10].xyxx, -cb0[11].xxxx
|
||||
add r0.zw, |r0.zzzw|, -r1.xxxy
|
||||
max r1.x, r0.w, r0.z
|
||||
min r1.x, r1.x, l(0.000000)
|
||||
max r0.zw, r0.zzzw, l(0.000000, 0.000000, 0.000000, 0.000000)
|
||||
dp2 r0.z, r0.zwzz, r0.zwzz
|
||||
sqrt r0.z, r0.z
|
||||
add r0.z, r0.z, r1.x
|
||||
add r0.z, r0.z, -cb0[11].x
|
||||
mad r0.z, cb0[12].x, l(0.500000), r0.z
|
||||
div_sat r0.z, r0.z, cb0[12].x
|
||||
add r1.xyzw, -cb0[13].xyzw, cb0[14].xyzw
|
||||
mad r1.xyzw, r0.zzzz, r1.xyzw, cb0[13].xyzw
|
||||
mul r0.z, r0.y, r0.x
|
||||
mul o0.xyzw, r0.zzzz, r1.xyzw
|
||||
else
|
||||
ieq r0.z, cb0[16].y, l(1)
|
||||
if_nz r0.z
|
||||
mul r0.zw, v1.wwww, cb0[7].xxxy
|
||||
mad r0.zw, cb0[6].xxxy, v1.zzzz, r0.zzzw
|
||||
add r0.zw, r0.zzzw, cb0[8].xxxy
|
||||
div r0.zw, r0.zzzw, cb0[10].xxxy
|
||||
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, r0.zwzz, t0.xyzw, s0
|
||||
ieq r0.zw, cb0[16].xxxx, l(0, 0, 1, 2)
|
||||
mul r2.xyz, r1.wwww, r1.xyzx
|
||||
movc r1.xyz, r0.zzzz, r2.xyzx, r1.xyzx
|
||||
movc r1.yzw, r0.wwww, r1.xxxx, r1.yyzw
|
||||
mul r1.xyzw, r1.xyzw, cb0[13].xyzw
|
||||
mul r0.x, r0.y, r0.x
|
||||
mul o0.xyzw, r0.xxxx, r1.xyzw
|
||||
else
|
||||
ieq r0.x, cb0[16].y, l(2)
|
||||
if_nz r0.x
|
||||
mov o0.xyzw, l(1.000000,1.000000,1.000000,1.000000)
|
||||
else
|
||||
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v1.xyxx, t0.xyzw, s0
|
||||
ieq r0.xz, cb0[16].xxxx, l(1, 0, 2, 0)
|
||||
mul r2.xyz, r1.wwww, r1.xyzx
|
||||
movc r1.xyz, r0.xxxx, r2.xyzx, r1.xyzx
|
||||
movc r1.yzw, r0.zzzz, r1.xxxx, r1.yyzw
|
||||
mul r0.xyzw, r0.yyyy, r1.xyzw
|
||||
mul o0.xyzw, r0.xyzw, cb0[13].xyzw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ret
|
||||
// Approximately 64 instruction slots used
|
||||
#endif
|
||||
|
||||
const BYTE g_D3D11PixelShaderAA_Main[] =
|
||||
{
|
||||
68, 88, 66, 67, 190, 118,
|
||||
30, 129, 8, 247, 238, 164,
|
||||
36, 95, 163, 170, 26, 79,
|
||||
159, 154, 1, 0, 0, 0,
|
||||
16, 13, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
16, 4, 0, 0, 128, 4,
|
||||
0, 0, 180, 4, 0, 0,
|
||||
116, 12, 0, 0, 82, 68,
|
||||
69, 70, 212, 3, 0, 0,
|
||||
1, 0, 0, 0, 192, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
60, 0, 0, 0, 0, 5,
|
||||
255, 255, 0, 1, 0, 0,
|
||||
169, 3, 0, 0, 82, 68,
|
||||
49, 49, 60, 0, 0, 0,
|
||||
24, 0, 0, 0, 32, 0,
|
||||
0, 0, 40, 0, 0, 0,
|
||||
36, 0, 0, 0, 12, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
156, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 1, 0,
|
||||
0, 0, 166, 0, 0, 0,
|
||||
2, 0, 0, 0, 5, 0,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
13, 0, 0, 0, 176, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
103, 95, 115, 97, 109, 112,
|
||||
108, 101, 114, 0, 103, 95,
|
||||
116, 101, 120, 116, 117, 114,
|
||||
101, 0, 80, 83, 95, 67,
|
||||
79, 78, 83, 84, 65, 78,
|
||||
84, 83, 0, 171, 171, 171,
|
||||
176, 0, 0, 0, 12, 0,
|
||||
0, 0, 216, 0, 0, 0,
|
||||
16, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
184, 2, 0, 0, 0, 0,
|
||||
0, 0, 64, 0, 0, 0,
|
||||
2, 0, 0, 0, 204, 2,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 240, 2,
|
||||
0, 0, 64, 0, 0, 0,
|
||||
16, 0, 0, 0, 2, 0,
|
||||
0, 0, 4, 3, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 40, 3, 0, 0,
|
||||
80, 0, 0, 0, 16, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
4, 3, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
53, 3, 0, 0, 96, 0,
|
||||
0, 0, 64, 0, 0, 0,
|
||||
2, 0, 0, 0, 204, 2,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 62, 3,
|
||||
0, 0, 160, 0, 0, 0,
|
||||
16, 0, 0, 0, 2, 0,
|
||||
0, 0, 4, 3, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 69, 3, 0, 0,
|
||||
176, 0, 0, 0, 16, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
4, 3, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
76, 3, 0, 0, 192, 0,
|
||||
0, 0, 16, 0, 0, 0,
|
||||
2, 0, 0, 0, 4, 3,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 84, 3,
|
||||
0, 0, 208, 0, 0, 0,
|
||||
16, 0, 0, 0, 2, 0,
|
||||
0, 0, 4, 3, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 93, 3, 0, 0,
|
||||
224, 0, 0, 0, 16, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
4, 3, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
102, 3, 0, 0, 240, 0,
|
||||
0, 0, 16, 0, 0, 0,
|
||||
2, 0, 0, 0, 4, 3,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 113, 3,
|
||||
0, 0, 0, 1, 0, 0,
|
||||
4, 0, 0, 0, 2, 0,
|
||||
0, 0, 128, 3, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 164, 3, 0, 0,
|
||||
4, 1, 0, 0, 4, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
128, 3, 0, 0, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
115, 99, 105, 115, 115, 111,
|
||||
114, 77, 97, 116, 0, 102,
|
||||
108, 111, 97, 116, 52, 120,
|
||||
52, 0, 3, 0, 3, 0,
|
||||
4, 0, 4, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 195, 2,
|
||||
0, 0, 115, 99, 105, 115,
|
||||
115, 111, 114, 69, 120, 116,
|
||||
0, 102, 108, 111, 97, 116,
|
||||
52, 0, 171, 171, 1, 0,
|
||||
3, 0, 1, 0, 4, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
251, 2, 0, 0, 115, 99,
|
||||
105, 115, 115, 111, 114, 83,
|
||||
99, 97, 108, 101, 0, 112,
|
||||
97, 105, 110, 116, 77, 97,
|
||||
116, 0, 101, 120, 116, 101,
|
||||
110, 116, 0, 114, 97, 100,
|
||||
105, 117, 115, 0, 102, 101,
|
||||
97, 116, 104, 101, 114, 0,
|
||||
105, 110, 110, 101, 114, 67,
|
||||
111, 108, 0, 111, 117, 116,
|
||||
101, 114, 67, 111, 108, 0,
|
||||
115, 116, 114, 111, 107, 101,
|
||||
77, 117, 108, 116, 0, 116,
|
||||
101, 120, 84, 121, 112, 101,
|
||||
0, 105, 110, 116, 0, 171,
|
||||
171, 171, 0, 0, 2, 0,
|
||||
1, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 121, 3,
|
||||
0, 0, 116, 121, 112, 101,
|
||||
0, 77, 105, 99, 114, 111,
|
||||
115, 111, 102, 116, 32, 40,
|
||||
82, 41, 32, 72, 76, 83,
|
||||
76, 32, 83, 104, 97, 100,
|
||||
101, 114, 32, 67, 111, 109,
|
||||
112, 105, 108, 101, 114, 32,
|
||||
49, 48, 46, 49, 0, 171,
|
||||
171, 171, 73, 83, 71, 78,
|
||||
104, 0, 0, 0, 3, 0,
|
||||
0, 0, 8, 0, 0, 0,
|
||||
80, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 15, 0, 0, 0,
|
||||
92, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 1, 0,
|
||||
0, 0, 3, 3, 0, 0,
|
||||
92, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 1, 0,
|
||||
0, 0, 12, 12, 0, 0,
|
||||
83, 86, 95, 80, 111, 115,
|
||||
105, 116, 105, 111, 110, 0,
|
||||
84, 69, 88, 67, 79, 79,
|
||||
82, 68, 0, 171, 171, 171,
|
||||
79, 83, 71, 78, 44, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
8, 0, 0, 0, 32, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
15, 0, 0, 0, 83, 86,
|
||||
95, 84, 65, 82, 71, 69,
|
||||
84, 0, 171, 171, 83, 72,
|
||||
69, 88, 184, 7, 0, 0,
|
||||
80, 0, 0, 0, 238, 1,
|
||||
0, 0, 106, 8, 0, 1,
|
||||
89, 0, 0, 4, 70, 142,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
17, 0, 0, 0, 90, 0,
|
||||
0, 3, 0, 96, 16, 0,
|
||||
0, 0, 0, 0, 88, 24,
|
||||
0, 4, 0, 112, 16, 0,
|
||||
0, 0, 0, 0, 85, 85,
|
||||
0, 0, 98, 16, 0, 3,
|
||||
50, 16, 16, 0, 1, 0,
|
||||
0, 0, 98, 16, 0, 3,
|
||||
194, 16, 16, 0, 1, 0,
|
||||
0, 0, 101, 0, 0, 3,
|
||||
242, 32, 16, 0, 0, 0,
|
||||
0, 0, 104, 0, 0, 2,
|
||||
3, 0, 0, 0, 50, 0,
|
||||
0, 9, 18, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 16,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
0, 64, 1, 64, 0, 0,
|
||||
0, 0, 128, 191, 0, 0,
|
||||
0, 8, 18, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
16, 128, 193, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 64,
|
||||
0, 0, 0, 0, 128, 63,
|
||||
56, 0, 0, 8, 18, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 10, 128, 32, 0,
|
||||
0, 0, 0, 0, 15, 0,
|
||||
0, 0, 51, 0, 0, 7,
|
||||
18, 0, 16, 0, 0, 0,
|
||||
0, 0, 10, 0, 16, 0,
|
||||
0, 0, 0, 0, 1, 64,
|
||||
0, 0, 0, 0, 128, 63,
|
||||
51, 0, 0, 7, 34, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
26, 16, 16, 0, 1, 0,
|
||||
0, 0, 1, 64, 0, 0,
|
||||
0, 0, 128, 63, 56, 0,
|
||||
0, 7, 18, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 49, 0, 0, 8,
|
||||
34, 0, 16, 0, 0, 0,
|
||||
0, 0, 10, 0, 16, 0,
|
||||
0, 0, 0, 0, 26, 128,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
15, 0, 0, 0, 13, 0,
|
||||
4, 3, 26, 0, 16, 0,
|
||||
0, 0, 0, 0, 56, 0,
|
||||
0, 8, 98, 0, 16, 0,
|
||||
0, 0, 0, 0, 246, 31,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
6, 129, 32, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
50, 0, 0, 10, 98, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
6, 129, 32, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
166, 26, 16, 0, 1, 0,
|
||||
0, 0, 86, 6, 16, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 8, 98, 0, 16, 0,
|
||||
0, 0, 0, 0, 86, 6,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
6, 129, 32, 0, 0, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
0, 0, 0, 10, 98, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
86, 6, 16, 128, 129, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
6, 129, 32, 128, 65, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
4, 0, 0, 0, 50, 32,
|
||||
0, 14, 98, 0, 16, 0,
|
||||
0, 0, 0, 0, 86, 6,
|
||||
16, 128, 65, 0, 0, 0,
|
||||
0, 0, 0, 0, 6, 129,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
5, 0, 0, 0, 2, 64,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 63, 0, 0,
|
||||
0, 63, 0, 0, 0, 0,
|
||||
56, 0, 0, 7, 34, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
42, 0, 16, 0, 0, 0,
|
||||
0, 0, 26, 0, 16, 0,
|
||||
0, 0, 0, 0, 31, 0,
|
||||
0, 4, 26, 128, 32, 0,
|
||||
0, 0, 0, 0, 16, 0,
|
||||
0, 0, 56, 0, 0, 8,
|
||||
194, 0, 16, 0, 0, 0,
|
||||
0, 0, 246, 31, 16, 0,
|
||||
1, 0, 0, 0, 6, 132,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
7, 0, 0, 0, 50, 0,
|
||||
0, 10, 194, 0, 16, 0,
|
||||
0, 0, 0, 0, 6, 132,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
6, 0, 0, 0, 166, 26,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
166, 14, 16, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 8,
|
||||
194, 0, 16, 0, 0, 0,
|
||||
0, 0, 166, 14, 16, 0,
|
||||
0, 0, 0, 0, 6, 132,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
8, 0, 0, 0, 0, 0,
|
||||
0, 10, 50, 0, 16, 0,
|
||||
1, 0, 0, 0, 70, 128,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
10, 0, 0, 0, 6, 128,
|
||||
32, 128, 65, 0, 0, 0,
|
||||
0, 0, 0, 0, 11, 0,
|
||||
0, 0, 0, 0, 0, 9,
|
||||
194, 0, 16, 0, 0, 0,
|
||||
0, 0, 166, 14, 16, 128,
|
||||
129, 0, 0, 0, 0, 0,
|
||||
0, 0, 6, 4, 16, 128,
|
||||
65, 0, 0, 0, 1, 0,
|
||||
0, 0, 52, 0, 0, 7,
|
||||
18, 0, 16, 0, 1, 0,
|
||||
0, 0, 58, 0, 16, 0,
|
||||
0, 0, 0, 0, 42, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
51, 0, 0, 7, 18, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
10, 0, 16, 0, 1, 0,
|
||||
0, 0, 1, 64, 0, 0,
|
||||
0, 0, 0, 0, 52, 0,
|
||||
0, 10, 194, 0, 16, 0,
|
||||
0, 0, 0, 0, 166, 14,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
2, 64, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 15, 0, 0, 7,
|
||||
66, 0, 16, 0, 0, 0,
|
||||
0, 0, 230, 10, 16, 0,
|
||||
0, 0, 0, 0, 230, 10,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
75, 0, 0, 5, 66, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
42, 0, 16, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 7,
|
||||
66, 0, 16, 0, 0, 0,
|
||||
0, 0, 42, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 9, 66, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
42, 0, 16, 0, 0, 0,
|
||||
0, 0, 10, 128, 32, 128,
|
||||
65, 0, 0, 0, 0, 0,
|
||||
0, 0, 11, 0, 0, 0,
|
||||
50, 0, 0, 10, 66, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
10, 128, 32, 0, 0, 0,
|
||||
0, 0, 12, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
0, 63, 42, 0, 16, 0,
|
||||
0, 0, 0, 0, 14, 32,
|
||||
0, 8, 66, 0, 16, 0,
|
||||
0, 0, 0, 0, 42, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
10, 128, 32, 0, 0, 0,
|
||||
0, 0, 12, 0, 0, 0,
|
||||
0, 0, 0, 10, 242, 0,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
70, 142, 32, 128, 65, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
13, 0, 0, 0, 70, 142,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
14, 0, 0, 0, 50, 0,
|
||||
0, 10, 242, 0, 16, 0,
|
||||
1, 0, 0, 0, 166, 10,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 14, 16, 0, 1, 0,
|
||||
0, 0, 70, 142, 32, 0,
|
||||
0, 0, 0, 0, 13, 0,
|
||||
0, 0, 56, 0, 0, 7,
|
||||
66, 0, 16, 0, 0, 0,
|
||||
0, 0, 26, 0, 16, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
56, 0, 0, 7, 242, 32,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
166, 10, 16, 0, 0, 0,
|
||||
0, 0, 70, 14, 16, 0,
|
||||
1, 0, 0, 0, 18, 0,
|
||||
0, 1, 32, 0, 0, 8,
|
||||
66, 0, 16, 0, 0, 0,
|
||||
0, 0, 26, 128, 32, 0,
|
||||
0, 0, 0, 0, 16, 0,
|
||||
0, 0, 1, 64, 0, 0,
|
||||
1, 0, 0, 0, 31, 0,
|
||||
4, 3, 42, 0, 16, 0,
|
||||
0, 0, 0, 0, 56, 0,
|
||||
0, 8, 194, 0, 16, 0,
|
||||
0, 0, 0, 0, 246, 31,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
6, 132, 32, 0, 0, 0,
|
||||
0, 0, 7, 0, 0, 0,
|
||||
50, 0, 0, 10, 194, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
6, 132, 32, 0, 0, 0,
|
||||
0, 0, 6, 0, 0, 0,
|
||||
166, 26, 16, 0, 1, 0,
|
||||
0, 0, 166, 14, 16, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 8, 194, 0, 16, 0,
|
||||
0, 0, 0, 0, 166, 14,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
6, 132, 32, 0, 0, 0,
|
||||
0, 0, 8, 0, 0, 0,
|
||||
14, 0, 0, 8, 194, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
166, 14, 16, 0, 0, 0,
|
||||
0, 0, 6, 132, 32, 0,
|
||||
0, 0, 0, 0, 10, 0,
|
||||
0, 0, 69, 0, 0, 139,
|
||||
194, 0, 0, 128, 67, 85,
|
||||
21, 0, 242, 0, 16, 0,
|
||||
1, 0, 0, 0, 230, 10,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 126, 16, 0, 0, 0,
|
||||
0, 0, 0, 96, 16, 0,
|
||||
0, 0, 0, 0, 32, 0,
|
||||
0, 11, 194, 0, 16, 0,
|
||||
0, 0, 0, 0, 6, 128,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
16, 0, 0, 0, 2, 64,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
56, 0, 0, 7, 114, 0,
|
||||
16, 0, 2, 0, 0, 0,
|
||||
246, 15, 16, 0, 1, 0,
|
||||
0, 0, 70, 2, 16, 0,
|
||||
1, 0, 0, 0, 55, 0,
|
||||
0, 9, 114, 0, 16, 0,
|
||||
1, 0, 0, 0, 166, 10,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 2, 16, 0, 2, 0,
|
||||
0, 0, 70, 2, 16, 0,
|
||||
1, 0, 0, 0, 55, 0,
|
||||
0, 9, 226, 0, 16, 0,
|
||||
1, 0, 0, 0, 246, 15,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
6, 0, 16, 0, 1, 0,
|
||||
0, 0, 86, 14, 16, 0,
|
||||
1, 0, 0, 0, 56, 0,
|
||||
0, 8, 242, 0, 16, 0,
|
||||
1, 0, 0, 0, 70, 14,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
70, 142, 32, 0, 0, 0,
|
||||
0, 0, 13, 0, 0, 0,
|
||||
56, 0, 0, 7, 18, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
26, 0, 16, 0, 0, 0,
|
||||
0, 0, 10, 0, 16, 0,
|
||||
0, 0, 0, 0, 56, 0,
|
||||
0, 7, 242, 32, 16, 0,
|
||||
0, 0, 0, 0, 6, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 14, 16, 0, 1, 0,
|
||||
0, 0, 18, 0, 0, 1,
|
||||
32, 0, 0, 8, 18, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
26, 128, 32, 0, 0, 0,
|
||||
0, 0, 16, 0, 0, 0,
|
||||
1, 64, 0, 0, 2, 0,
|
||||
0, 0, 31, 0, 4, 3,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 54, 0, 0, 8,
|
||||
242, 32, 16, 0, 0, 0,
|
||||
0, 0, 2, 64, 0, 0,
|
||||
0, 0, 128, 63, 0, 0,
|
||||
128, 63, 0, 0, 128, 63,
|
||||
0, 0, 128, 63, 18, 0,
|
||||
0, 1, 69, 0, 0, 139,
|
||||
194, 0, 0, 128, 67, 85,
|
||||
21, 0, 242, 0, 16, 0,
|
||||
1, 0, 0, 0, 70, 16,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
70, 126, 16, 0, 0, 0,
|
||||
0, 0, 0, 96, 16, 0,
|
||||
0, 0, 0, 0, 32, 0,
|
||||
0, 11, 82, 0, 16, 0,
|
||||
0, 0, 0, 0, 6, 128,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
16, 0, 0, 0, 2, 64,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
56, 0, 0, 7, 114, 0,
|
||||
16, 0, 2, 0, 0, 0,
|
||||
246, 15, 16, 0, 1, 0,
|
||||
0, 0, 70, 2, 16, 0,
|
||||
1, 0, 0, 0, 55, 0,
|
||||
0, 9, 114, 0, 16, 0,
|
||||
1, 0, 0, 0, 6, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 2, 16, 0, 2, 0,
|
||||
0, 0, 70, 2, 16, 0,
|
||||
1, 0, 0, 0, 55, 0,
|
||||
0, 9, 226, 0, 16, 0,
|
||||
1, 0, 0, 0, 166, 10,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
6, 0, 16, 0, 1, 0,
|
||||
0, 0, 86, 14, 16, 0,
|
||||
1, 0, 0, 0, 56, 0,
|
||||
0, 7, 242, 0, 16, 0,
|
||||
0, 0, 0, 0, 86, 5,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 14, 16, 0, 1, 0,
|
||||
0, 0, 56, 0, 0, 8,
|
||||
242, 32, 16, 0, 0, 0,
|
||||
0, 0, 70, 14, 16, 0,
|
||||
0, 0, 0, 0, 70, 142,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
13, 0, 0, 0, 21, 0,
|
||||
0, 1, 21, 0, 0, 1,
|
||||
21, 0, 0, 1, 62, 0,
|
||||
0, 1, 83, 84, 65, 84,
|
||||
148, 0, 0, 0, 64, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
0, 0, 0, 0, 3, 0,
|
||||
0, 0, 42, 0, 0, 0,
|
||||
4, 0, 0, 0, 0, 0,
|
||||
0, 0, 5, 0, 0, 0,
|
||||
2, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
2, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
4, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0
|
||||
};
|
||||
2
nanovg/nvg_shader/D3D11PixelShaderAA.hlsl
Normal file
2
nanovg/nvg_shader/D3D11PixelShaderAA.hlsl
Normal file
@@ -0,0 +1,2 @@
|
||||
#define EDGE_AA
|
||||
#include "D3D11PixelShader.hlsl"
|
||||
2
nanovg/nvg_shader/D3D11PixelShaderNoAA.hlsl
Normal file
2
nanovg/nvg_shader/D3D11PixelShaderNoAA.hlsl
Normal file
@@ -0,0 +1,2 @@
|
||||
#undef EDGE_AA
|
||||
#include "D3D11PixelShader.hlsl"
|
||||
242
nanovg/nvg_shader/D3D11VertexShader.h
Normal file
242
nanovg/nvg_shader/D3D11VertexShader.h
Normal file
@@ -0,0 +1,242 @@
|
||||
#if 0
|
||||
//
|
||||
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
|
||||
//
|
||||
//
|
||||
// Buffer Definitions:
|
||||
//
|
||||
// cbuffer VS_CONSTANTS
|
||||
// {
|
||||
//
|
||||
// float4x4 dummy; // Offset: 0 Size: 64 [unused]
|
||||
// float2 viewSize; // Offset: 64 Size: 8
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// Resource Bindings:
|
||||
//
|
||||
// Name Type Format Dim HLSL Bind Count
|
||||
// ------------------------------ ---------- ------- ----------- -------------- ------
|
||||
// VS_CONSTANTS cbuffer NA NA cb0 1
|
||||
//
|
||||
//
|
||||
//
|
||||
// Input signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// POSITION 0 xy 0 NONE float xy
|
||||
// TEXCOORD 0 xy 1 NONE float xy
|
||||
//
|
||||
//
|
||||
// Output signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// SV_Position 0 xyzw 0 POS float xyzw
|
||||
// TEXCOORD 0 xy 1 NONE float xy
|
||||
// TEXCOORD 1 zw 1 NONE float zw
|
||||
//
|
||||
vs_5_0
|
||||
dcl_globalFlags refactoringAllowed
|
||||
dcl_constantbuffer CB0[5], immediateIndexed
|
||||
dcl_input v0.xy
|
||||
dcl_input v1.xy
|
||||
dcl_output_siv o0.xyzw, position
|
||||
dcl_output o1.xy
|
||||
dcl_output o1.zw
|
||||
dcl_temps 1
|
||||
add r0.xy, v0.xyxx, v0.xyxx
|
||||
div r0.xy, r0.xyxx, cb0[4].xyxx
|
||||
add o0.x, r0.x, l(-1.000000)
|
||||
add o0.y, -r0.y, l(1.000000)
|
||||
mov o0.zw, l(0,0,0,1.000000)
|
||||
mov o1.xy, v1.xyxx
|
||||
mov o1.zw, v0.xxxy
|
||||
ret
|
||||
// Approximately 8 instruction slots used
|
||||
#endif
|
||||
|
||||
const BYTE g_D3D11VertexShader_Main[] =
|
||||
{
|
||||
68, 88, 66, 67, 211, 247,
|
||||
103, 234, 42, 205, 238, 140,
|
||||
26, 164, 148, 212, 200, 130,
|
||||
46, 245, 1, 0, 0, 0,
|
||||
48, 4, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
160, 1, 0, 0, 244, 1,
|
||||
0, 0, 100, 2, 0, 0,
|
||||
148, 3, 0, 0, 82, 68,
|
||||
69, 70, 100, 1, 0, 0,
|
||||
1, 0, 0, 0, 108, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
60, 0, 0, 0, 0, 5,
|
||||
254, 255, 0, 1, 0, 0,
|
||||
60, 1, 0, 0, 82, 68,
|
||||
49, 49, 60, 0, 0, 0,
|
||||
24, 0, 0, 0, 32, 0,
|
||||
0, 0, 40, 0, 0, 0,
|
||||
36, 0, 0, 0, 12, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
92, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0,
|
||||
0, 0, 86, 83, 95, 67,
|
||||
79, 78, 83, 84, 65, 78,
|
||||
84, 83, 0, 171, 171, 171,
|
||||
92, 0, 0, 0, 2, 0,
|
||||
0, 0, 132, 0, 0, 0,
|
||||
80, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
212, 0, 0, 0, 0, 0,
|
||||
0, 0, 64, 0, 0, 0,
|
||||
0, 0, 0, 0, 228, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 8, 1,
|
||||
0, 0, 64, 0, 0, 0,
|
||||
8, 0, 0, 0, 2, 0,
|
||||
0, 0, 24, 1, 0, 0,
|
||||
0, 0, 0, 0, 255, 255,
|
||||
255, 255, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 100, 117, 109, 109,
|
||||
121, 0, 102, 108, 111, 97,
|
||||
116, 52, 120, 52, 0, 171,
|
||||
3, 0, 3, 0, 4, 0,
|
||||
4, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 218, 0, 0, 0,
|
||||
118, 105, 101, 119, 83, 105,
|
||||
122, 101, 0, 102, 108, 111,
|
||||
97, 116, 50, 0, 1, 0,
|
||||
3, 0, 1, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
17, 1, 0, 0, 77, 105,
|
||||
99, 114, 111, 115, 111, 102,
|
||||
116, 32, 40, 82, 41, 32,
|
||||
72, 76, 83, 76, 32, 83,
|
||||
104, 97, 100, 101, 114, 32,
|
||||
67, 111, 109, 112, 105, 108,
|
||||
101, 114, 32, 49, 48, 46,
|
||||
49, 0, 73, 83, 71, 78,
|
||||
76, 0, 0, 0, 2, 0,
|
||||
0, 0, 8, 0, 0, 0,
|
||||
56, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 3, 3, 0, 0,
|
||||
65, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 1, 0,
|
||||
0, 0, 3, 3, 0, 0,
|
||||
80, 79, 83, 73, 84, 73,
|
||||
79, 78, 0, 84, 69, 88,
|
||||
67, 79, 79, 82, 68, 0,
|
||||
171, 171, 79, 83, 71, 78,
|
||||
104, 0, 0, 0, 3, 0,
|
||||
0, 0, 8, 0, 0, 0,
|
||||
80, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 15, 0, 0, 0,
|
||||
92, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 1, 0,
|
||||
0, 0, 3, 12, 0, 0,
|
||||
92, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 1, 0,
|
||||
0, 0, 12, 3, 0, 0,
|
||||
83, 86, 95, 80, 111, 115,
|
||||
105, 116, 105, 111, 110, 0,
|
||||
84, 69, 88, 67, 79, 79,
|
||||
82, 68, 0, 171, 171, 171,
|
||||
83, 72, 69, 88, 40, 1,
|
||||
0, 0, 80, 0, 1, 0,
|
||||
74, 0, 0, 0, 106, 8,
|
||||
0, 1, 89, 0, 0, 4,
|
||||
70, 142, 32, 0, 0, 0,
|
||||
0, 0, 5, 0, 0, 0,
|
||||
95, 0, 0, 3, 50, 16,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
95, 0, 0, 3, 50, 16,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
103, 0, 0, 4, 242, 32,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 101, 0,
|
||||
0, 3, 50, 32, 16, 0,
|
||||
1, 0, 0, 0, 101, 0,
|
||||
0, 3, 194, 32, 16, 0,
|
||||
1, 0, 0, 0, 104, 0,
|
||||
0, 2, 1, 0, 0, 0,
|
||||
0, 0, 0, 7, 50, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 16, 16, 0, 0, 0,
|
||||
0, 0, 70, 16, 16, 0,
|
||||
0, 0, 0, 0, 14, 0,
|
||||
0, 8, 50, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 0,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 128, 32, 0, 0, 0,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
0, 0, 0, 7, 18, 32,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
10, 0, 16, 0, 0, 0,
|
||||
0, 0, 1, 64, 0, 0,
|
||||
0, 0, 128, 191, 0, 0,
|
||||
0, 8, 34, 32, 16, 0,
|
||||
0, 0, 0, 0, 26, 0,
|
||||
16, 128, 65, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 64,
|
||||
0, 0, 0, 0, 128, 63,
|
||||
54, 0, 0, 8, 194, 32,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
2, 64, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
128, 63, 54, 0, 0, 5,
|
||||
50, 32, 16, 0, 1, 0,
|
||||
0, 0, 70, 16, 16, 0,
|
||||
1, 0, 0, 0, 54, 0,
|
||||
0, 5, 194, 32, 16, 0,
|
||||
1, 0, 0, 0, 6, 20,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
62, 0, 0, 1, 83, 84,
|
||||
65, 84, 148, 0, 0, 0,
|
||||
8, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
5, 0, 0, 0, 4, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0
|
||||
};
|
||||
25
nanovg/nvg_shader/D3D11VertexShader.hlsl
Normal file
25
nanovg/nvg_shader/D3D11VertexShader.hlsl
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
cbuffer VS_CONSTANTS
|
||||
{
|
||||
float4x4 dummy;
|
||||
float2 viewSize;
|
||||
|
||||
};
|
||||
|
||||
struct VS_OUTPUT
|
||||
{
|
||||
float4 position : SV_Position; // vertex position
|
||||
float2 ftcoord : TEXCOORD0; // float 2 tex coord
|
||||
float2 fpos : TEXCOORD1; // float 2 position
|
||||
};
|
||||
|
||||
VS_OUTPUT D3D11VertexShader_Main(float2 pt : POSITION, float2 tex : TEXCOORD0)
|
||||
{
|
||||
VS_OUTPUT Output;
|
||||
Output.ftcoord = tex;
|
||||
Output.fpos = pt;
|
||||
Output.position = float4(2.0 * pt.x / viewSize.x - 1.0, 1.0 - 2.0 * pt.y / viewSize.y, 0, 1);
|
||||
|
||||
return Output;
|
||||
}
|
||||
|
||||
6
nanovg/nvg_shader/d3d_shaders.bat
Normal file
6
nanovg/nvg_shader/d3d_shaders.bat
Normal file
@@ -0,0 +1,6 @@
|
||||
rem Compiles D3D shaders to headers - only needed if you change the hlsl.
|
||||
rem The headers are checked in....
|
||||
|
||||
fxc.exe /Fh D3D11PixelShader.h /T ps_4_0_level_9_3 /E D3D11PixelShader_Main D3D11PixelShader.hlsl
|
||||
fxc.exe /Fh D3D11PixelShaderAA.h /T ps_4_0_level_9_3 /E D3D11PixelShaderAA_Main D3D11PixelShaderAA.hlsl
|
||||
fxc.exe /Fh D3D11VertexShader.h /T vs_4_0_level_9_3 /E D3D11VertexShader_Main D3D11VertexShader.hlsl
|
||||
11
nanovg/nvg_shader/d3d_shaders.ps1
Normal file
11
nanovg/nvg_shader/d3d_shaders.ps1
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
$files = "D3D11PixelShader", "D3D11PixelShaderAA", "D3D11VertexShader"
|
||||
$types = "ps_5_0", "ps_5_0", "vs_5_0"
|
||||
|
||||
for($i=0; $i -lt $files.Length; $i++)
|
||||
{
|
||||
$file = $files[$i]
|
||||
$type = $types[$i]
|
||||
echo "${file}.hlsl generate to ${file}.h"
|
||||
fxc /Fh "${file}.h" /T $type /E "${file}_Main" "${file}.hlsl"
|
||||
}
|
||||
7987
nanovg/stb_image.h
Normal file
7987
nanovg/stb_image.h
Normal file
File diff suppressed because it is too large
Load Diff
5077
nanovg/stb_truetype.h
Normal file
5077
nanovg/stb_truetype.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user