mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Refactored uniform types.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
static const uint8_t fs_metaballs_glsl[398] =
|
static const uint8_t fs_metaballs_glsl[398] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0x7f, 0x01, 0x00, 0x00, 0x76, 0x61, // FSH..,.?......va
|
0x46, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0x7f, 0x01, 0x00, 0x00, 0x76, 0x61, // FSH..,.?......va
|
||||||
0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4
|
0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4
|
||||||
0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // v_color0;.varyi
|
0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // v_color0;.varyi
|
||||||
0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, // ng highp vec3 v_
|
0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, // ng highp vec3 v_
|
||||||
@@ -28,7 +28,7 @@ static const uint8_t fs_metaballs_glsl[398] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_metaballs_dx9[429] =
|
static const uint8_t fs_metaballs_dx9[429] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x03, 0xff, 0xff, // FSH..,.?........
|
0x46, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x03, 0xff, 0xff, // FSH..,.?........
|
||||||
0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#...
|
0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#...
|
||||||
0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
||||||
0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
|
0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
|
||||||
@@ -58,7 +58,7 @@ static const uint8_t fs_metaballs_dx9[429] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_metaballs_dx11[660] =
|
static const uint8_t fs_metaballs_dx11[660] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0x84, 0x02, 0x44, 0x58, 0x42, 0x43, // FSH..,.?....DXBC
|
0x46, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0x84, 0x02, 0x44, 0x58, 0x42, 0x43, // FSH..,.?....DXBC
|
||||||
0x71, 0x00, 0x85, 0x0b, 0x80, 0xfd, 0x1e, 0xdf, 0x09, 0x21, 0xdf, 0xe6, 0x3a, 0xef, 0x53, 0xf8, // q........!..:.S.
|
0x71, 0x00, 0x85, 0x0b, 0x80, 0xfd, 0x1e, 0xdf, 0x09, 0x21, 0xdf, 0xe6, 0x3a, 0xef, 0x53, 0xf8, // q........!..:.S.
|
||||||
0x01, 0x00, 0x00, 0x00, 0x84, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
0x01, 0x00, 0x00, 0x00, 0x84, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
||||||
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
static const uint8_t vs_metaballs_glsl[537] =
|
static const uint8_t vs_metaballs_glsl[537] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x03, 0x2c, 0xf5, 0x3f, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..,.?...u_mod
|
0x56, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..,.?...u_mod
|
||||||
0x65, 0x6c, 0x09, 0x20, 0x00, 0x00, 0x20, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // el. .. ..u_model
|
0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // el. .. ..u_model
|
||||||
0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x01, 0x00, 0xe6, 0x01, // ViewProj........
|
0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0xe6, 0x01, // ViewProj........
|
||||||
0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, // ..attribute high
|
0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, // ..attribute high
|
||||||
0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, // p vec4 a_color0;
|
0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, // p vec4 a_color0;
|
||||||
0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // .attribute highp
|
0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // .attribute highp
|
||||||
@@ -37,9 +37,9 @@ static const uint8_t vs_metaballs_glsl[537] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_metaballs_dx9[457] =
|
static const uint8_t vs_metaballs_dx9[457] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x03, 0x2c, 0xf5, 0x3f, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..,.?...u_mod
|
0x56, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..,.?...u_mod
|
||||||
0x65, 0x6c, 0x09, 0x20, 0x04, 0x00, 0x03, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // el. .....u_model
|
0x65, 0x6c, 0x04, 0x20, 0x04, 0x00, 0x03, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // el. .....u_model
|
||||||
0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x04, 0x00, 0x98, 0x01, // ViewProj........
|
0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x98, 0x01, // ViewProj........
|
||||||
0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, // ........CTAB....
|
0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, // ........CTAB....
|
||||||
0x83, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, // ................
|
0x83, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, // ................
|
||||||
0x00, 0x91, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, // ....|...D.......
|
0x00, 0x91, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, // ....|...D.......
|
||||||
@@ -69,9 +69,9 @@ static const uint8_t vs_metaballs_dx9[457] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_metaballs_dx11[726] =
|
static const uint8_t vs_metaballs_dx11[726] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x03, 0x2c, 0xf5, 0x3f, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..,.?...u_mod
|
0x56, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..,.?...u_mod
|
||||||
0x65, 0x6c, 0x09, 0x20, 0x00, 0x00, 0x80, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // el. .....u_model
|
0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x80, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // el. .....u_model
|
||||||
0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x08, 0x04, 0x00, 0x9c, 0x02, // ViewProj........
|
0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x08, 0x04, 0x00, 0x9c, 0x02, // ViewProj........
|
||||||
0x44, 0x58, 0x42, 0x43, 0xc6, 0x4d, 0x04, 0x38, 0x93, 0x20, 0x89, 0x1c, 0xbe, 0x68, 0xbc, 0xd4, // DXBC.M.8. ...h..
|
0x44, 0x58, 0x42, 0x43, 0xc6, 0x4d, 0x04, 0x38, 0x93, 0x20, 0x89, 0x1c, 0xbe, 0x68, 0xbc, 0xd4, // DXBC.M.8. ...h..
|
||||||
0xee, 0x2f, 0x8a, 0xe9, 0x01, 0x00, 0x00, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ./..............
|
0xee, 0x2f, 0x8a, 0xe9, 0x01, 0x00, 0x00, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ./..............
|
||||||
0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, // ,...........ISGN
|
0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, // ,...........ISGN
|
||||||
|
|||||||
@@ -15,9 +15,11 @@ $input v_color0, v_texcoord0
|
|||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
#include "iq_sdf.sh"
|
#include "iq_sdf.sh"
|
||||||
|
|
||||||
uniform float u_time;
|
|
||||||
uniform mat4 u_mtx;
|
uniform mat4 u_mtx;
|
||||||
uniform vec3 u_lightDir;
|
uniform vec4 u_lightDirTime;
|
||||||
|
|
||||||
|
#define u_lightDir u_lightDirTime.xyz
|
||||||
|
#define u_time u_lightDirTime.w
|
||||||
|
|
||||||
float sceneDist(vec3 _pos)
|
float sceneDist(vec3 _pos)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
, 0
|
, 0
|
||||||
);
|
);
|
||||||
|
|
||||||
// Setup root path for binary shaders. Shader binaries are different
|
// Setup root path for binary shaders. Shader binaries are different
|
||||||
// for each renderer.
|
// for each renderer.
|
||||||
switch (bgfx::getRendererType() )
|
switch (bgfx::getRendererType() )
|
||||||
{
|
{
|
||||||
@@ -140,9 +140,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
// Create vertex stream declaration.
|
// Create vertex stream declaration.
|
||||||
PosColorTexCoord0Vertex::init();
|
PosColorTexCoord0Vertex::init();
|
||||||
|
|
||||||
bgfx::UniformHandle u_time = bgfx::createUniform("u_time", bgfx::UniformType::Uniform1f);
|
bgfx::UniformHandle u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Mat4);
|
||||||
bgfx::UniformHandle u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Uniform4x4fv);
|
bgfx::UniformHandle u_lightDirTime = bgfx::createUniform("u_lightDirTime", bgfx::UniformType::Vec4);
|
||||||
bgfx::UniformHandle u_lightDir = bgfx::createUniform("u_lightDir", bgfx::UniformType::Uniform3fv);
|
|
||||||
|
|
||||||
// Create program from shaders.
|
// Create program from shaders.
|
||||||
bgfx::ProgramHandle raymarching = loadProgram("vs_raymarching", "fs_raymarching");
|
bgfx::ProgramHandle raymarching = loadProgram("vs_raymarching", "fs_raymarching");
|
||||||
@@ -176,7 +175,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
|
|
||||||
float at[3] = { 0.0f, 0.0f, 0.0f };
|
float at[3] = { 0.0f, 0.0f, 0.0f };
|
||||||
float eye[3] = { 0.0f, 0.0f, -15.0f };
|
float eye[3] = { 0.0f, 0.0f, -15.0f };
|
||||||
|
|
||||||
float view[16];
|
float view[16];
|
||||||
float proj[16];
|
float proj[16];
|
||||||
bx::mtxLookAt(view, eye, at);
|
bx::mtxLookAt(view, eye, at);
|
||||||
@@ -200,16 +199,17 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bx::mtxRotateXY(mtx
|
bx::mtxRotateXY(mtx
|
||||||
, time
|
, time
|
||||||
, time*0.37f
|
, time*0.37f
|
||||||
);
|
);
|
||||||
|
|
||||||
float mtxInv[16];
|
float mtxInv[16];
|
||||||
bx::mtxInverse(mtxInv, mtx);
|
bx::mtxInverse(mtxInv, mtx);
|
||||||
float lightDirModel[4] = { -0.4f, -0.5f, -1.0f, 0.0f };
|
float lightDirModel[4] = { -0.4f, -0.5f, -1.0f, 0.0f };
|
||||||
float lightDirModelN[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
float lightDirModelN[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||||
bx::vec3Norm(lightDirModelN, lightDirModel);
|
bx::vec3Norm(lightDirModelN, lightDirModel);
|
||||||
float lightDir[4];
|
float lightDirTime[4];
|
||||||
bx::vec4MulMtx(lightDir, lightDirModelN, mtxInv);
|
bx::vec4MulMtx(lightDirTime, lightDirModelN, mtxInv);
|
||||||
bgfx::setUniform(u_lightDir, lightDir);
|
lightDirTime[3] = time;
|
||||||
|
bgfx::setUniform(u_lightDirTime, lightDirTime);
|
||||||
|
|
||||||
float mvp[16];
|
float mvp[16];
|
||||||
bx::mtxMul(mvp, mtx, vp);
|
bx::mtxMul(mvp, mtx, vp);
|
||||||
@@ -218,11 +218,9 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bx::mtxInverse(invMvp, mvp);
|
bx::mtxInverse(invMvp, mvp);
|
||||||
bgfx::setUniform(u_mtx, invMvp);
|
bgfx::setUniform(u_mtx, invMvp);
|
||||||
|
|
||||||
bgfx::setUniform(u_time, &time);
|
|
||||||
|
|
||||||
renderScreenSpaceQuad(1, raymarching, 0.0f, 0.0f, 1280.0f, 720.0f);
|
renderScreenSpaceQuad(1, raymarching, 0.0f, 0.0f, 1280.0f, 720.0f);
|
||||||
|
|
||||||
// Advance to next frame. Rendering thread will be kicked to
|
// Advance to next frame. Rendering thread will be kicked to
|
||||||
// process submitted rendering primitives.
|
// process submitted rendering primitives.
|
||||||
bgfx::frame();
|
bgfx::frame();
|
||||||
}
|
}
|
||||||
@@ -230,9 +228,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
// Cleanup.
|
// Cleanup.
|
||||||
bgfx::destroyProgram(raymarching);
|
bgfx::destroyProgram(raymarching);
|
||||||
|
|
||||||
bgfx::destroyUniform(u_time);
|
|
||||||
bgfx::destroyUniform(u_mtx);
|
bgfx::destroyUniform(u_mtx);
|
||||||
bgfx::destroyUniform(u_lightDir);
|
bgfx::destroyUniform(u_lightDirTime);
|
||||||
|
|
||||||
// Shutdown bgfx.
|
// Shutdown bgfx.
|
||||||
bgfx::shutdown();
|
bgfx::shutdown();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ $input v_pos, v_view, v_normal, v_color0
|
|||||||
|
|
||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
|
|
||||||
uniform float u_time;
|
uniform vec4 u_time;
|
||||||
|
|
||||||
vec2 blinn(vec3 _lightDir, vec3 _normal, vec3 _viewDir)
|
vec2 blinn(vec3 _lightDir, vec3 _normal, vec3 _viewDir)
|
||||||
{
|
{
|
||||||
@@ -39,9 +39,9 @@ void main()
|
|||||||
vec4 lc = lit(bln.x, bln.y, 1.0);
|
vec4 lc = lit(bln.x, bln.y, 1.0);
|
||||||
float fres = fresnel(bln.x, 0.2, 5.0);
|
float fres = fresnel(bln.x, 0.2, 5.0);
|
||||||
|
|
||||||
float index = ( (sin(v_pos.x*3.0+u_time)*0.3+0.7)
|
float index = ( (sin(v_pos.x*3.0+u_time.x)*0.3+0.7)
|
||||||
+ ( cos(v_pos.y*3.0+u_time)*0.4+0.6)
|
+ ( cos(v_pos.y*3.0+u_time.x)*0.4+0.6)
|
||||||
+ ( cos(v_pos.z*3.0+u_time)*0.2+0.8)
|
+ ( cos(v_pos.z*3.0+u_time.x)*0.2+0.8)
|
||||||
)*M_PI;
|
)*M_PI;
|
||||||
|
|
||||||
vec3 color = vec3(sin(index*8.0)*0.4 + 0.6
|
vec3 color = vec3(sin(index*8.0)*0.4 + 0.6
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
, 0
|
, 0
|
||||||
);
|
);
|
||||||
|
|
||||||
bgfx::UniformHandle u_time = bgfx::createUniform("u_time", bgfx::UniformType::Uniform1f);
|
bgfx::UniformHandle u_time = bgfx::createUniform("u_time", bgfx::UniformType::Vec4);
|
||||||
|
|
||||||
// Create program from shaders.
|
// Create program from shaders.
|
||||||
bgfx::ProgramHandle program = loadProgram("vs_mesh", "fs_mesh");
|
bgfx::ProgramHandle program = loadProgram("vs_mesh", "fs_mesh");
|
||||||
@@ -98,11 +98,11 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bx::mtxRotateXY(mtx
|
bx::mtxRotateXY(mtx
|
||||||
, 0.0f
|
, 0.0f
|
||||||
, time*0.37f
|
, time*0.37f
|
||||||
);
|
);
|
||||||
|
|
||||||
meshSubmit(mesh, 0, program, mtx);
|
meshSubmit(mesh, 0, program, mtx);
|
||||||
|
|
||||||
// Advance to next frame. Rendering thread will be kicked to
|
// Advance to next frame. Rendering thread will be kicked to
|
||||||
// process submitted rendering primitives.
|
// process submitted rendering primitives.
|
||||||
bgfx::frame();
|
bgfx::frame();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ $output v_pos, v_view, v_normal, v_color0
|
|||||||
|
|
||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
|
|
||||||
uniform float u_time;
|
uniform vec4 u_time;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 pos = a_position;
|
vec3 pos = a_position;
|
||||||
|
|
||||||
float sx = sin(pos.x*32.0+u_time*4.0)*0.5+0.5;
|
float sx = sin(pos.x*32.0+u_time.x*4.0)*0.5+0.5;
|
||||||
float cy = cos(pos.y*32.0+u_time*4.0)*0.5+0.5;
|
float cy = cos(pos.y*32.0+u_time.x*4.0)*0.5+0.5;
|
||||||
vec3 displacement = vec3(sx, cy, sx*cy);
|
vec3 displacement = vec3(sx, cy, sx*cy);
|
||||||
vec3 normal = a_normal.xyz*2.0 - 1.0;
|
vec3 normal = a_normal.xyz*2.0 - 1.0;
|
||||||
|
|
||||||
|
|||||||
@@ -148,12 +148,12 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::IndexBufferHandle ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_cubeIndices, sizeof(s_cubeIndices) ) );
|
bgfx::IndexBufferHandle ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_cubeIndices, sizeof(s_cubeIndices) ) );
|
||||||
|
|
||||||
// Create texture sampler uniforms.
|
// Create texture sampler uniforms.
|
||||||
bgfx::UniformHandle u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle u_texNormal = bgfx::createUniform("u_texNormal", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle u_texNormal = bgfx::createUniform("u_texNormal", bgfx::UniformType::Int1);
|
||||||
|
|
||||||
uint16_t numLights = 4;
|
uint16_t numLights = 4;
|
||||||
bgfx::UniformHandle u_lightPosRadius = bgfx::createUniform("u_lightPosRadius", bgfx::UniformType::Uniform4fv, numLights);
|
bgfx::UniformHandle u_lightPosRadius = bgfx::createUniform("u_lightPosRadius", bgfx::UniformType::Vec4, numLights);
|
||||||
bgfx::UniformHandle u_lightRgbInnerR = bgfx::createUniform("u_lightRgbInnerR", bgfx::UniformType::Uniform4fv, numLights);
|
bgfx::UniformHandle u_lightRgbInnerR = bgfx::createUniform("u_lightRgbInnerR", bgfx::UniformType::Vec4, numLights);
|
||||||
|
|
||||||
// Create program from shaders.
|
// Create program from shaders.
|
||||||
bgfx::ProgramHandle program = loadProgram(instancingSupported ? "vs_bump_instanced" : "vs_bump", "fs_bump");
|
bgfx::ProgramHandle program = loadProgram(instancingSupported ? "vs_bump_instanced" : "vs_bump", "fs_bump");
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ $input v_texcoord0
|
|||||||
|
|
||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
|
|
||||||
SAMPLERCUBE(u_texCube, 0);
|
SAMPLERCUBE(s_texCube, 0);
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_FragColor = textureCube(u_texCube, v_texcoord0);
|
gl_FragColor = textureCube(s_texCube, v_texcoord0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ $input v_texcoord0
|
|||||||
|
|
||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
|
|
||||||
SAMPLER3D(u_texColor, 0);
|
SAMPLER3D(s_texColor, 0);
|
||||||
uniform float u_time;
|
uniform vec4 u_time;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 uvw = vec3(v_texcoord0.xy*0.5+0.5, sin(u_time)*0.5+0.5);
|
vec3 uvw = vec3(v_texcoord0.xy*0.5+0.5, sin(u_time.x)*0.5+0.5);
|
||||||
gl_FragColor = vec4_splat(texture3D(u_texColor, uvw).x);
|
gl_FragColor = vec4_splat(texture3D(s_texColor, uvw).x);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ $input v_texcoord0
|
|||||||
|
|
||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
|
|
||||||
SAMPLER2D(u_texColor, 0);
|
SAMPLER2D(s_texColor, 0);
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_FragColor = texture2D(u_texColor, v_texcoord0.xy*0.5+0.5);
|
gl_FragColor = texture2D(s_texColor, v_texcoord0.xy*0.5+0.5);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,10 +198,10 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::IndexBufferHandle ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_cubeIndices, sizeof(s_cubeIndices) ) );
|
bgfx::IndexBufferHandle ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_cubeIndices, sizeof(s_cubeIndices) ) );
|
||||||
|
|
||||||
// Create texture sampler uniforms.
|
// Create texture sampler uniforms.
|
||||||
bgfx::UniformHandle u_texCube = bgfx::createUniform("u_texCube", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle s_texCube = bgfx::createUniform("s_texCube", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
|
||||||
|
|
||||||
bgfx::UniformHandle u_time = bgfx::createUniform("u_time", bgfx::UniformType::Uniform1f);
|
bgfx::UniformHandle u_time = bgfx::createUniform("u_time", bgfx::UniformType::Vec4);
|
||||||
|
|
||||||
bgfx::ProgramHandle program = loadProgram("vs_update", "fs_update");
|
bgfx::ProgramHandle program = loadProgram("vs_update", "fs_update");
|
||||||
bgfx::ProgramHandle programCmp = loadProgram("vs_update", "fs_update_cmp");
|
bgfx::ProgramHandle programCmp = loadProgram("vs_update", "fs_update_cmp");
|
||||||
@@ -356,7 +356,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::setIndexBuffer(ibh);
|
bgfx::setIndexBuffer(ibh);
|
||||||
|
|
||||||
// Bind texture.
|
// Bind texture.
|
||||||
bgfx::setTexture(0, u_texCube, textureCube);
|
bgfx::setTexture(0, s_texCube, textureCube);
|
||||||
|
|
||||||
// Set render states.
|
// Set render states.
|
||||||
bgfx::setState(BGFX_STATE_DEFAULT);
|
bgfx::setState(BGFX_STATE_DEFAULT);
|
||||||
@@ -385,7 +385,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::setIndexBuffer(ibh);
|
bgfx::setIndexBuffer(ibh);
|
||||||
|
|
||||||
// Bind texture.
|
// Bind texture.
|
||||||
bgfx::setTexture(0, u_texColor, texture2d);
|
bgfx::setTexture(0, s_texColor, texture2d);
|
||||||
|
|
||||||
// Set render states.
|
// Set render states.
|
||||||
bgfx::setState(BGFX_STATE_DEFAULT);
|
bgfx::setState(BGFX_STATE_DEFAULT);
|
||||||
@@ -410,7 +410,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::setIndexBuffer(ibh, 0, 6);
|
bgfx::setIndexBuffer(ibh, 0, 6);
|
||||||
|
|
||||||
// Bind texture.
|
// Bind texture.
|
||||||
bgfx::setTexture(0, u_texColor, textures[ii]);
|
bgfx::setTexture(0, s_texColor, textures[ii]);
|
||||||
|
|
||||||
// Set render states.
|
// Set render states.
|
||||||
bgfx::setState(BGFX_STATE_DEFAULT);
|
bgfx::setState(BGFX_STATE_DEFAULT);
|
||||||
@@ -434,7 +434,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::setIndexBuffer(ibh, 0, 6);
|
bgfx::setIndexBuffer(ibh, 0, 6);
|
||||||
|
|
||||||
// Bind texture.
|
// Bind texture.
|
||||||
bgfx::setTexture(0, u_texColor, textures3d[ii]);
|
bgfx::setTexture(0, s_texColor, textures3d[ii]);
|
||||||
|
|
||||||
// Set render states.
|
// Set render states.
|
||||||
bgfx::setState(BGFX_STATE_DEFAULT);
|
bgfx::setState(BGFX_STATE_DEFAULT);
|
||||||
@@ -458,7 +458,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::setIndexBuffer(ibh, 0, 6);
|
bgfx::setIndexBuffer(ibh, 0, 6);
|
||||||
|
|
||||||
// Bind texture.
|
// Bind texture.
|
||||||
bgfx::setTexture(0, u_texColor, textures[ii]);
|
bgfx::setTexture(0, s_texColor, textures[ii]);
|
||||||
|
|
||||||
// Set render states.
|
// Set render states.
|
||||||
bgfx::setState(BGFX_STATE_DEFAULT);
|
bgfx::setState(BGFX_STATE_DEFAULT);
|
||||||
@@ -501,8 +501,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::destroyProgram(programCmp);
|
bgfx::destroyProgram(programCmp);
|
||||||
bgfx::destroyProgram(program);
|
bgfx::destroyProgram(program);
|
||||||
bgfx::destroyUniform(u_time);
|
bgfx::destroyUniform(u_time);
|
||||||
bgfx::destroyUniform(u_texColor);
|
bgfx::destroyUniform(s_texColor);
|
||||||
bgfx::destroyUniform(u_texCube);
|
bgfx::destroyUniform(s_texCube);
|
||||||
|
|
||||||
// Shutdown bgfx.
|
// Shutdown bgfx.
|
||||||
bgfx::shutdown();
|
bgfx::shutdown();
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
uniform vec4 u_offset[16];
|
uniform vec4 u_offset[16];
|
||||||
uniform vec4 u_tonemap;
|
uniform vec4 u_tonemap;
|
||||||
|
#define u_time u_tonemap.w
|
||||||
|
|
||||||
float reinhard(float _x)
|
float reinhard(float _x)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ $input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4
|
|||||||
|
|
||||||
#include "common.sh"
|
#include "common.sh"
|
||||||
|
|
||||||
SAMPLER2D(u_texColor, 0);
|
SAMPLER2D(s_texColor, 0);
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_FragColor = blur9(u_texColor, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4);
|
gl_FragColor = blur9(s_texColor, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,23 +7,23 @@ $input v_texcoord0
|
|||||||
|
|
||||||
#include "common.sh"
|
#include "common.sh"
|
||||||
|
|
||||||
SAMPLER2D(u_texColor, 0);
|
SAMPLER2D(s_texColor, 0);
|
||||||
SAMPLER2D(u_texLum, 1);
|
SAMPLER2D(s_texLum, 1);
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
float lum = clamp(decodeRE8(texture2D(u_texLum, v_texcoord0) ), 0.1, 0.7);
|
float lum = clamp(decodeRE8(texture2D(s_texLum, v_texcoord0) ), 0.1, 0.7);
|
||||||
|
|
||||||
vec3 rgb = vec3(0.0, 0.0, 0.0);
|
vec3 rgb = vec3(0.0, 0.0, 0.0);
|
||||||
rgb += decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[0].xy) );
|
rgb += decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[0].xy) );
|
||||||
rgb += decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[1].xy) );
|
rgb += decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[1].xy) );
|
||||||
rgb += decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[2].xy) );
|
rgb += decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[2].xy) );
|
||||||
rgb += decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[3].xy) );
|
rgb += decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[3].xy) );
|
||||||
rgb += decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[4].xy) );
|
rgb += decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[4].xy) );
|
||||||
rgb += decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[5].xy) );
|
rgb += decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[5].xy) );
|
||||||
rgb += decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[6].xy) );
|
rgb += decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[6].xy) );
|
||||||
rgb += decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[7].xy) );
|
rgb += decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[7].xy) );
|
||||||
rgb += decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[8].xy) );
|
rgb += decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[8].xy) );
|
||||||
|
|
||||||
rgb *= 1.0/9.0;
|
rgb *= 1.0/9.0;
|
||||||
|
|
||||||
|
|||||||
@@ -7,21 +7,21 @@ $input v_texcoord0
|
|||||||
|
|
||||||
#include "common.sh"
|
#include "common.sh"
|
||||||
|
|
||||||
SAMPLER2D(u_texColor, 0);
|
SAMPLER2D(s_texColor, 0);
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
float delta = 0.0001;
|
float delta = 0.0001;
|
||||||
|
|
||||||
vec3 rgb0 = decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[0].xy) );
|
vec3 rgb0 = decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[0].xy) );
|
||||||
vec3 rgb1 = decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[1].xy) );
|
vec3 rgb1 = decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[1].xy) );
|
||||||
vec3 rgb2 = decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[2].xy) );
|
vec3 rgb2 = decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[2].xy) );
|
||||||
vec3 rgb3 = decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[3].xy) );
|
vec3 rgb3 = decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[3].xy) );
|
||||||
vec3 rgb4 = decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[4].xy) );
|
vec3 rgb4 = decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[4].xy) );
|
||||||
vec3 rgb5 = decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[5].xy) );
|
vec3 rgb5 = decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[5].xy) );
|
||||||
vec3 rgb6 = decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[6].xy) );
|
vec3 rgb6 = decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[6].xy) );
|
||||||
vec3 rgb7 = decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[7].xy) );
|
vec3 rgb7 = decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[7].xy) );
|
||||||
vec3 rgb8 = decodeRGBE8(texture2D(u_texColor, v_texcoord0+u_offset[8].xy) );
|
vec3 rgb8 = decodeRGBE8(texture2D(s_texColor, v_texcoord0+u_offset[8].xy) );
|
||||||
float avg = luma(rgb0).x
|
float avg = luma(rgb0).x
|
||||||
+ luma(rgb1).x
|
+ luma(rgb1).x
|
||||||
+ luma(rgb2).x
|
+ luma(rgb2).x
|
||||||
|
|||||||
@@ -7,27 +7,27 @@ $input v_texcoord0
|
|||||||
|
|
||||||
#include "common.sh"
|
#include "common.sh"
|
||||||
|
|
||||||
SAMPLER2D(u_texColor, 0);
|
SAMPLER2D(s_texColor, 0);
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
float sum;
|
float sum;
|
||||||
sum = decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[ 0].xy) );
|
sum = decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[ 0].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[ 1].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[ 1].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[ 2].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[ 2].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[ 3].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[ 3].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[ 4].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[ 4].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[ 5].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[ 5].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[ 6].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[ 6].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[ 7].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[ 7].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[ 8].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[ 8].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[ 9].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[ 9].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[10].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[10].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[11].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[11].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[12].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[12].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[13].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[13].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[14].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[14].xy) );
|
||||||
sum += decodeRE8(texture2D(u_texColor, v_texcoord0+u_offset[15].xy) );
|
sum += decodeRE8(texture2D(s_texColor, v_texcoord0+u_offset[15].xy) );
|
||||||
float avg = sum/16.0;
|
float avg = sum/16.0;
|
||||||
gl_FragColor = encodeRE8(avg);
|
gl_FragColor = encodeRE8(avg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ $input v_pos, v_view, v_normal
|
|||||||
|
|
||||||
#include "common.sh"
|
#include "common.sh"
|
||||||
|
|
||||||
uniform float u_time;
|
SAMPLERCUBE(s_texCube, 0);
|
||||||
SAMPLERCUBE(u_texCube, 0);
|
|
||||||
|
|
||||||
vec2 blinn(vec3 _lightDir, vec3 _normal, vec3 _viewDir)
|
vec2 blinn(vec3 _lightDir, vec3 _normal, vec3 _viewDir)
|
||||||
{
|
{
|
||||||
@@ -50,7 +49,7 @@ void main()
|
|||||||
, sin(index*2.0)*0.4 + 0.6
|
, sin(index*2.0)*0.4 + 0.6
|
||||||
);
|
);
|
||||||
|
|
||||||
color *= textureCube(u_texCube, reflect(view, -normal) ).xyz;
|
color *= textureCube(s_texCube, reflect(view, -normal) ).xyz;
|
||||||
|
|
||||||
gl_FragColor = encodeRGBE8(color.xyz*lc.y + fres*pow(lc.z, 128.0) );
|
gl_FragColor = encodeRGBE8(color.xyz*lc.y + fres*pow(lc.z, 128.0) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ $input v_texcoord0
|
|||||||
|
|
||||||
#include "common.sh"
|
#include "common.sh"
|
||||||
|
|
||||||
SAMPLERCUBE(u_texCube, 0);
|
SAMPLERCUBE(s_texCube, 0);
|
||||||
uniform mat4 u_mtx;
|
uniform mat4 u_mtx;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 dir = vec3(v_texcoord0*2.0 - 1.0, 1.0);
|
vec3 dir = vec3(v_texcoord0*2.0 - 1.0, 1.0);
|
||||||
dir = normalize(mul(u_mtx, vec4(dir, 0.0) ).xyz);
|
dir = normalize(mul(u_mtx, vec4(dir, 0.0) ).xyz);
|
||||||
gl_FragColor = encodeRGBE8(textureCube(u_texCube, dir).xyz);
|
gl_FragColor = encodeRGBE8(textureCube(s_texCube, dir).xyz);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ $input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4
|
|||||||
|
|
||||||
#include "common.sh"
|
#include "common.sh"
|
||||||
|
|
||||||
SAMPLER2D(u_texColor, 0);
|
SAMPLER2D(s_texColor, 0);
|
||||||
SAMPLER2D(u_texLum, 1);
|
SAMPLER2D(s_texLum, 1);
|
||||||
SAMPLER2D(u_texBlur, 2);
|
SAMPLER2D(s_texBlur, 2);
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 rgb = decodeRGBE8(texture2D(u_texColor, v_texcoord0) );
|
vec3 rgb = decodeRGBE8(texture2D(s_texColor, v_texcoord0) );
|
||||||
float lum = clamp(decodeRE8(texture2D(u_texLum, v_texcoord0) ), 0.1, 0.7);
|
float lum = clamp(decodeRE8(texture2D(s_texLum, v_texcoord0) ), 0.1, 0.7);
|
||||||
|
|
||||||
vec3 Yxy = convertRGB2Yxy(rgb);
|
vec3 Yxy = convertRGB2Yxy(rgb);
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ void main()
|
|||||||
|
|
||||||
rgb = convertYxy2RGB(Yxy);
|
rgb = convertYxy2RGB(Yxy);
|
||||||
|
|
||||||
vec4 blur = blur9(u_texBlur
|
vec4 blur = blur9(s_texBlur
|
||||||
, v_texcoord0
|
, v_texcoord0
|
||||||
, v_texcoord1
|
, v_texcoord1
|
||||||
, v_texcoord2
|
, v_texcoord2
|
||||||
|
|||||||
@@ -189,14 +189,13 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::ProgramHandle meshProgram = loadProgram("vs_hdr_mesh", "fs_hdr_mesh");
|
bgfx::ProgramHandle meshProgram = loadProgram("vs_hdr_mesh", "fs_hdr_mesh");
|
||||||
bgfx::ProgramHandle tonemapProgram = loadProgram("vs_hdr_tonemap", "fs_hdr_tonemap");
|
bgfx::ProgramHandle tonemapProgram = loadProgram("vs_hdr_tonemap", "fs_hdr_tonemap");
|
||||||
|
|
||||||
bgfx::UniformHandle u_time = bgfx::createUniform("u_time", bgfx::UniformType::Uniform1f);
|
bgfx::UniformHandle s_texCube = bgfx::createUniform("s_texCube", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle u_texCube = bgfx::createUniform("u_texCube", bgfx::UniformType::Uniform1i);
|
bgfx::UniformHandle s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Uniform1i);
|
bgfx::UniformHandle s_texLum = bgfx::createUniform("s_texLum", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle u_texLum = bgfx::createUniform("u_texLum", bgfx::UniformType::Uniform1i);
|
bgfx::UniformHandle s_texBlur = bgfx::createUniform("s_texBlur", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle u_texBlur = bgfx::createUniform("u_texBlur", bgfx::UniformType::Uniform1i);
|
bgfx::UniformHandle u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Mat4);
|
||||||
bgfx::UniformHandle u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Uniform4x4fv);
|
bgfx::UniformHandle u_tonemap = bgfx::createUniform("u_tonemap", bgfx::UniformType::Vec4);
|
||||||
bgfx::UniformHandle u_tonemap = bgfx::createUniform("u_tonemap", bgfx::UniformType::Uniform4fv);
|
bgfx::UniformHandle u_offset = bgfx::createUniform("u_offset", bgfx::UniformType::Vec4, 16);
|
||||||
bgfx::UniformHandle u_offset = bgfx::createUniform("u_offset", bgfx::UniformType::Uniform4fv, 16);
|
|
||||||
|
|
||||||
Mesh* mesh = meshLoad("meshes/bunny.bin");
|
Mesh* mesh = meshLoad("meshes/bunny.bin");
|
||||||
|
|
||||||
@@ -297,8 +296,6 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
|
|
||||||
time += (float)(frameTime*speed/freq);
|
time += (float)(frameTime*speed/freq);
|
||||||
|
|
||||||
bgfx::setUniform(u_time, &time);
|
|
||||||
|
|
||||||
// Use debug font to print information about this example.
|
// Use debug font to print information about this example.
|
||||||
bgfx::dbgTextClear();
|
bgfx::dbgTextClear();
|
||||||
bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/09-hdr");
|
bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/09-hdr");
|
||||||
@@ -370,7 +367,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::setUniform(u_mtx, mtx);
|
bgfx::setUniform(u_mtx, mtx);
|
||||||
|
|
||||||
// Render skybox into view 0.
|
// Render skybox into view 0.
|
||||||
bgfx::setTexture(0, u_texCube, uffizi);
|
bgfx::setTexture(0, s_texCube, uffizi);
|
||||||
|
|
||||||
bgfx::setProgram(skyProgram);
|
bgfx::setProgram(skyProgram);
|
||||||
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
||||||
@@ -378,12 +375,12 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::submit(0);
|
bgfx::submit(0);
|
||||||
|
|
||||||
// Render mesh into view 1
|
// Render mesh into view 1
|
||||||
bgfx::setTexture(0, u_texCube, uffizi);
|
bgfx::setTexture(0, s_texCube, uffizi);
|
||||||
meshSubmit(mesh, 1, meshProgram, NULL);
|
meshSubmit(mesh, 1, meshProgram, NULL);
|
||||||
|
|
||||||
// Calculate luminance.
|
// Calculate luminance.
|
||||||
setOffsets2x2Lum(u_offset, 128, 128);
|
setOffsets2x2Lum(u_offset, 128, 128);
|
||||||
bgfx::setTexture(0, u_texColor, fbtextures[0]);
|
bgfx::setTexture(0, s_texColor, fbtextures[0]);
|
||||||
bgfx::setProgram(lumProgram);
|
bgfx::setProgram(lumProgram);
|
||||||
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
||||||
screenSpaceQuad(128.0f, 128.0f, s_originBottomLeft);
|
screenSpaceQuad(128.0f, 128.0f, s_originBottomLeft);
|
||||||
@@ -391,7 +388,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
|
|
||||||
// Downscale luminance 0.
|
// Downscale luminance 0.
|
||||||
setOffsets4x4Lum(u_offset, 128, 128);
|
setOffsets4x4Lum(u_offset, 128, 128);
|
||||||
bgfx::setTexture(0, u_texColor, lum[0]);
|
bgfx::setTexture(0, s_texColor, lum[0]);
|
||||||
bgfx::setProgram(lumAvgProgram);
|
bgfx::setProgram(lumAvgProgram);
|
||||||
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
||||||
screenSpaceQuad(64.0f, 64.0f, s_originBottomLeft);
|
screenSpaceQuad(64.0f, 64.0f, s_originBottomLeft);
|
||||||
@@ -399,7 +396,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
|
|
||||||
// Downscale luminance 1.
|
// Downscale luminance 1.
|
||||||
setOffsets4x4Lum(u_offset, 64, 64);
|
setOffsets4x4Lum(u_offset, 64, 64);
|
||||||
bgfx::setTexture(0, u_texColor, lum[1]);
|
bgfx::setTexture(0, s_texColor, lum[1]);
|
||||||
bgfx::setProgram(lumAvgProgram);
|
bgfx::setProgram(lumAvgProgram);
|
||||||
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
||||||
screenSpaceQuad(16.0f, 16.0f, s_originBottomLeft);
|
screenSpaceQuad(16.0f, 16.0f, s_originBottomLeft);
|
||||||
@@ -407,7 +404,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
|
|
||||||
// Downscale luminance 2.
|
// Downscale luminance 2.
|
||||||
setOffsets4x4Lum(u_offset, 16, 16);
|
setOffsets4x4Lum(u_offset, 16, 16);
|
||||||
bgfx::setTexture(0, u_texColor, lum[2]);
|
bgfx::setTexture(0, s_texColor, lum[2]);
|
||||||
bgfx::setProgram(lumAvgProgram);
|
bgfx::setProgram(lumAvgProgram);
|
||||||
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
||||||
screenSpaceQuad(4.0f, 4.0f, s_originBottomLeft);
|
screenSpaceQuad(4.0f, 4.0f, s_originBottomLeft);
|
||||||
@@ -415,35 +412,35 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
|
|
||||||
// Downscale luminance 3.
|
// Downscale luminance 3.
|
||||||
setOffsets4x4Lum(u_offset, 4, 4);
|
setOffsets4x4Lum(u_offset, 4, 4);
|
||||||
bgfx::setTexture(0, u_texColor, lum[3]);
|
bgfx::setTexture(0, s_texColor, lum[3]);
|
||||||
bgfx::setProgram(lumAvgProgram);
|
bgfx::setProgram(lumAvgProgram);
|
||||||
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
||||||
screenSpaceQuad(1.0f, 1.0f, s_originBottomLeft);
|
screenSpaceQuad(1.0f, 1.0f, s_originBottomLeft);
|
||||||
bgfx::submit(6);
|
bgfx::submit(6);
|
||||||
|
|
||||||
float tonemap[4] = { middleGray, square(white), threshold, 0.0f };
|
float tonemap[4] = { middleGray, square(white), threshold, time };
|
||||||
bgfx::setUniform(u_tonemap, tonemap);
|
bgfx::setUniform(u_tonemap, tonemap);
|
||||||
|
|
||||||
// Bright pass threshold is tonemap[3].
|
// Bright pass threshold is tonemap[3].
|
||||||
setOffsets4x4Lum(u_offset, width/2, height/2);
|
setOffsets4x4Lum(u_offset, width/2, height/2);
|
||||||
bgfx::setTexture(0, u_texColor, fbtextures[0]);
|
bgfx::setTexture(0, s_texColor, fbtextures[0]);
|
||||||
bgfx::setTexture(1, u_texLum, lum[4]);
|
bgfx::setTexture(1, s_texLum, lum[4]);
|
||||||
bgfx::setProgram(brightProgram);
|
bgfx::setProgram(brightProgram);
|
||||||
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
||||||
screenSpaceQuad( (float)width/2.0f, (float)height/2.0f, s_originBottomLeft);
|
screenSpaceQuad( (float)width/2.0f, (float)height/2.0f, s_originBottomLeft);
|
||||||
bgfx::submit(7);
|
bgfx::submit(7);
|
||||||
|
|
||||||
// Blur bright pass vertically.
|
// Blur bright pass vertically.
|
||||||
bgfx::setTexture(0, u_texColor, bright);
|
bgfx::setTexture(0, s_texColor, bright);
|
||||||
bgfx::setProgram(blurProgram);
|
bgfx::setProgram(blurProgram);
|
||||||
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
||||||
screenSpaceQuad( (float)width/8.0f, (float)height/8.0f, s_originBottomLeft);
|
screenSpaceQuad( (float)width/8.0f, (float)height/8.0f, s_originBottomLeft);
|
||||||
bgfx::submit(8);
|
bgfx::submit(8);
|
||||||
|
|
||||||
// Blur bright pass horizontally, do tonemaping and combine.
|
// Blur bright pass horizontally, do tonemaping and combine.
|
||||||
bgfx::setTexture(0, u_texColor, fbtextures[0]);
|
bgfx::setTexture(0, s_texColor, fbtextures[0]);
|
||||||
bgfx::setTexture(1, u_texLum, lum[4]);
|
bgfx::setTexture(1, s_texLum, lum[4]);
|
||||||
bgfx::setTexture(2, u_texBlur, blur);
|
bgfx::setTexture(2, s_texBlur, blur);
|
||||||
bgfx::setProgram(tonemapProgram);
|
bgfx::setProgram(tonemapProgram);
|
||||||
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
||||||
screenSpaceQuad( (float)width, (float)height, s_originBottomLeft);
|
screenSpaceQuad( (float)width, (float)height, s_originBottomLeft);
|
||||||
@@ -476,11 +473,10 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::destroyProgram(brightProgram);
|
bgfx::destroyProgram(brightProgram);
|
||||||
bgfx::destroyTexture(uffizi);
|
bgfx::destroyTexture(uffizi);
|
||||||
|
|
||||||
bgfx::destroyUniform(u_time);
|
bgfx::destroyUniform(s_texCube);
|
||||||
bgfx::destroyUniform(u_texCube);
|
bgfx::destroyUniform(s_texColor);
|
||||||
bgfx::destroyUniform(u_texColor);
|
bgfx::destroyUniform(s_texLum);
|
||||||
bgfx::destroyUniform(u_texLum);
|
bgfx::destroyUniform(s_texBlur);
|
||||||
bgfx::destroyUniform(u_texBlur);
|
|
||||||
bgfx::destroyUniform(u_mtx);
|
bgfx::destroyUniform(u_mtx);
|
||||||
bgfx::destroyUniform(u_tonemap);
|
bgfx::destroyUniform(u_tonemap);
|
||||||
bgfx::destroyUniform(u_offset);
|
bgfx::destroyUniform(u_offset);
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ $output v_pos, v_view, v_normal
|
|||||||
|
|
||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
|
|
||||||
uniform float u_time;
|
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 pos = a_position;
|
vec3 pos = a_position;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ $input v_pos, v_view, v_normal, v_texcoord0
|
|||||||
|
|
||||||
SAMPLER2D(u_texColor, 0);
|
SAMPLER2D(u_texColor, 0);
|
||||||
SAMPLER2D(u_texStipple, 1);
|
SAMPLER2D(u_texStipple, 1);
|
||||||
uniform vec3 u_stipple;
|
uniform vec4 u_stipple;
|
||||||
|
|
||||||
vec2 blinn(vec3 _lightDir, vec3 _normal, vec3 _viewDir)
|
vec2 blinn(vec3 _lightDir, vec3 _normal, vec3 _viewDir)
|
||||||
{
|
{
|
||||||
@@ -24,7 +24,8 @@ void main()
|
|||||||
vec2 viewport = (u_viewRect.zw - u_viewRect.xy) * vec2(1.0/8.0, 1.0/4.0);
|
vec2 viewport = (u_viewRect.zw - u_viewRect.xy) * vec2(1.0/8.0, 1.0/4.0);
|
||||||
vec2 stippleUV = viewport*(v_pos.xy*0.5 + 0.5);
|
vec2 stippleUV = viewport*(v_pos.xy*0.5 + 0.5);
|
||||||
vec4 color = texture2D(u_texColor, v_texcoord0);
|
vec4 color = texture2D(u_texColor, v_texcoord0);
|
||||||
if ((u_stipple.x - texture2D(u_texStipple,stippleUV).r)*u_stipple.y > u_stipple.z || color.w < 0.5)
|
if ( (u_stipple.x - texture2D(u_texStipple,stippleUV).x)*u_stipple.y > u_stipple.z
|
||||||
|
|| color.w < 0.5)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
, 0
|
, 0
|
||||||
);
|
);
|
||||||
|
|
||||||
bgfx::UniformHandle u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle u_stipple = bgfx::createUniform("u_stipple", bgfx::UniformType::Uniform3fv);
|
bgfx::UniformHandle s_texStipple = bgfx::createUniform("s_texStipple", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle u_texStipple = bgfx::createUniform("u_texStipple", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle u_stipple = bgfx::createUniform("u_stipple", bgfx::UniformType::Vec4);
|
||||||
|
|
||||||
bgfx::ProgramHandle program = loadProgram("vs_tree", "fs_tree");
|
bgfx::ProgramHandle program = loadProgram("vs_tree", "fs_tree");
|
||||||
|
|
||||||
@@ -209,26 +209,26 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
stippleInv[1] = 1.0f;
|
stippleInv[1] = 1.0f;
|
||||||
stippleInv[2] = (float(transitionFrame)*4.0f/255.0f) - (1.0f/255.0f);
|
stippleInv[2] = (float(transitionFrame)*4.0f/255.0f) - (1.0f/255.0f);
|
||||||
|
|
||||||
bgfx::setTexture(0, u_texColor, textureBark);
|
bgfx::setTexture(0, s_texColor, textureBark);
|
||||||
bgfx::setTexture(1, u_texStipple, textureStipple);
|
bgfx::setTexture(1, s_texStipple, textureStipple);
|
||||||
bgfx::setUniform(u_stipple, stipple);
|
bgfx::setUniform(u_stipple, stipple);
|
||||||
meshSubmit(meshTrunk[mainLOD], 0, program, mtx, stateOpaque);
|
meshSubmit(meshTrunk[mainLOD], 0, program, mtx, stateOpaque);
|
||||||
|
|
||||||
bgfx::setTexture(0, u_texColor, textureLeafs);
|
bgfx::setTexture(0, s_texColor, textureLeafs);
|
||||||
bgfx::setTexture(1, u_texStipple, textureStipple);
|
bgfx::setTexture(1, s_texStipple, textureStipple);
|
||||||
bgfx::setUniform(u_stipple, stipple);
|
bgfx::setUniform(u_stipple, stipple);
|
||||||
meshSubmit(meshTop[mainLOD], 0, program, mtx, stateTransparent);
|
meshSubmit(meshTop[mainLOD], 0, program, mtx, stateTransparent);
|
||||||
|
|
||||||
if (transitions
|
if (transitions
|
||||||
&& (transitionFrame != 0) )
|
&& (transitionFrame != 0) )
|
||||||
{
|
{
|
||||||
bgfx::setTexture(0, u_texColor, textureBark);
|
bgfx::setTexture(0, s_texColor, textureBark);
|
||||||
bgfx::setTexture(1, u_texStipple, textureStipple);
|
bgfx::setTexture(1, s_texStipple, textureStipple);
|
||||||
bgfx::setUniform(u_stipple, stippleInv);
|
bgfx::setUniform(u_stipple, stippleInv);
|
||||||
meshSubmit(meshTrunk[targetLOD], 0, program, mtx, stateOpaque);
|
meshSubmit(meshTrunk[targetLOD], 0, program, mtx, stateOpaque);
|
||||||
|
|
||||||
bgfx::setTexture(0, u_texColor, textureLeafs);
|
bgfx::setTexture(0, s_texColor, textureLeafs);
|
||||||
bgfx::setTexture(1, u_texStipple, textureStipple);
|
bgfx::setTexture(1, s_texStipple, textureStipple);
|
||||||
bgfx::setUniform(u_stipple, stippleInv);
|
bgfx::setUniform(u_stipple, stippleInv);
|
||||||
meshSubmit(meshTop[targetLOD], 0, program, mtx, stateTransparent);
|
meshSubmit(meshTop[targetLOD], 0, program, mtx, stateTransparent);
|
||||||
}
|
}
|
||||||
@@ -279,9 +279,9 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
// Cleanup.
|
// Cleanup.
|
||||||
bgfx::destroyProgram(program);
|
bgfx::destroyProgram(program);
|
||||||
|
|
||||||
bgfx::destroyUniform(u_texColor);
|
bgfx::destroyUniform(s_texColor);
|
||||||
|
bgfx::destroyUniform(s_texStipple);
|
||||||
bgfx::destroyUniform(u_stipple);
|
bgfx::destroyUniform(u_stipple);
|
||||||
bgfx::destroyUniform(u_texStipple);
|
|
||||||
|
|
||||||
bgfx::destroyTexture(textureStipple);
|
bgfx::destroyTexture(textureStipple);
|
||||||
bgfx::destroyTexture(textureLeafs);
|
bgfx::destroyTexture(textureLeafs);
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ $output v_pos, v_view, v_normal, v_texcoord0
|
|||||||
|
|
||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
|
|
||||||
uniform float u_time;
|
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 pos = a_position;
|
vec3 pos = a_position;
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ $input v_normal, v_view
|
|||||||
#define MAX_NUM_LIGHTS 5
|
#define MAX_NUM_LIGHTS 5
|
||||||
|
|
||||||
uniform vec4 u_params;
|
uniform vec4 u_params;
|
||||||
uniform vec3 u_ambient;
|
uniform vec4 u_ambient;
|
||||||
uniform vec3 u_diffuse;
|
uniform vec4 u_diffuse;
|
||||||
uniform vec4 u_color;
|
uniform vec4 u_color;
|
||||||
uniform vec4 u_specular_shininess;
|
uniform vec4 u_specular_shininess;
|
||||||
uniform vec4 u_lightPosRadius[MAX_NUM_LIGHTS];
|
uniform vec4 u_lightPosRadius[MAX_NUM_LIGHTS];
|
||||||
@@ -50,7 +50,7 @@ vec3 calcLight(int _idx, vec3 _view, vec3 _normal, vec3 _viewDir)
|
|||||||
|
|
||||||
float dist = max(length(toLight), u_lightPosRadius[_idx].w);
|
float dist = max(length(toLight), u_lightPosRadius[_idx].w);
|
||||||
float attn = 250.0 * pow(dist, -2.0);
|
float attn = 250.0 * pow(dist, -2.0);
|
||||||
vec3 rgb = (lc.y * u_diffuse + lc.z * u_specular) * u_lightRgbInnerR[_idx].rgb * attn;
|
vec3 rgb = (lc.y * u_diffuse.xyz + lc.z * u_specular) * u_lightRgbInnerR[_idx].rgb * attn;
|
||||||
|
|
||||||
return rgb;
|
return rgb;
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ void main()
|
|||||||
vec3 normal = normalize(v_normal);
|
vec3 normal = normalize(v_normal);
|
||||||
vec3 viewDir = -normalize(v_view);
|
vec3 viewDir = -normalize(v_view);
|
||||||
|
|
||||||
vec3 ambientColor = u_ambient * u_ambientPass;
|
vec3 ambientColor = u_ambient.xyz * u_ambientPass;
|
||||||
|
|
||||||
vec3 lightColor = vec3_splat(0.0);
|
vec3 lightColor = vec3_splat(0.0);
|
||||||
for(int ii = 0; ii < MAX_NUM_LIGHTS; ++ii)
|
for(int ii = 0; ii < MAX_NUM_LIGHTS; ++ii)
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ $input v_normal, v_view, v_texcoord0
|
|||||||
#define MAX_NUM_LIGHTS 5
|
#define MAX_NUM_LIGHTS 5
|
||||||
|
|
||||||
uniform vec4 u_params;
|
uniform vec4 u_params;
|
||||||
uniform vec3 u_ambient;
|
uniform vec4 u_ambient;
|
||||||
uniform vec3 u_diffuse;
|
uniform vec4 u_diffuse;
|
||||||
uniform vec4 u_color;
|
uniform vec4 u_color;
|
||||||
uniform vec4 u_specular_shininess;
|
uniform vec4 u_specular_shininess;
|
||||||
uniform vec4 u_lightPosRadius[MAX_NUM_LIGHTS];
|
uniform vec4 u_lightPosRadius[MAX_NUM_LIGHTS];
|
||||||
@@ -51,7 +51,7 @@ vec3 calcLight(int _idx, vec3 _view, vec3 _normal, vec3 _viewDir)
|
|||||||
|
|
||||||
float dist = max(length(toLight), u_lightPosRadius[_idx].w);
|
float dist = max(length(toLight), u_lightPosRadius[_idx].w);
|
||||||
float attn = 250.0 * pow(dist, -2.0);
|
float attn = 250.0 * pow(dist, -2.0);
|
||||||
vec3 rgb = (lc.y * u_diffuse + lc.z * u_specular) * u_lightRgbInnerR[_idx].rgb * attn;
|
vec3 rgb = (lc.y * u_diffuse.xyz + lc.z * u_specular) * u_lightRgbInnerR[_idx].rgb * attn;
|
||||||
|
|
||||||
return rgb;
|
return rgb;
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ void main()
|
|||||||
vec3 normal = normalize(v_normal);
|
vec3 normal = normalize(v_normal);
|
||||||
vec3 viewDir = -normalize(v_view);
|
vec3 viewDir = -normalize(v_view);
|
||||||
|
|
||||||
vec3 ambientColor = u_ambient * u_ambientPass;
|
vec3 ambientColor = u_ambient.xyz * u_ambientPass;
|
||||||
|
|
||||||
vec3 lightColor = vec3_splat(0.0);
|
vec3 lightColor = vec3_splat(0.0);
|
||||||
for(int ii = 0; ii < MAX_NUM_LIGHTS; ++ii)
|
for(int ii = 0; ii < MAX_NUM_LIGHTS; ++ii)
|
||||||
|
|||||||
@@ -316,14 +316,13 @@ struct Uniforms
|
|||||||
m_lightRgbInnerR[ii][3] = 1.0f;
|
m_lightRgbInnerR[ii][3] = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
u_params = bgfx::createUniform("u_params", bgfx::UniformType::Uniform4fv);
|
u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4);
|
||||||
u_ambient = bgfx::createUniform("u_ambient", bgfx::UniformType::Uniform4fv);
|
u_ambient = bgfx::createUniform("u_ambient", bgfx::UniformType::Vec4);
|
||||||
u_diffuse = bgfx::createUniform("u_diffuse", bgfx::UniformType::Uniform4fv);
|
u_diffuse = bgfx::createUniform("u_diffuse", bgfx::UniformType::Vec4);
|
||||||
u_specular_shininess = bgfx::createUniform("u_specular_shininess", bgfx::UniformType::Uniform4fv);
|
u_specular_shininess = bgfx::createUniform("u_specular_shininess", bgfx::UniformType::Vec4);
|
||||||
u_color = bgfx::createUniform("u_color", bgfx::UniformType::Uniform4fv);
|
u_color = bgfx::createUniform("u_color", bgfx::UniformType::Vec4);
|
||||||
u_time = bgfx::createUniform("u_time", bgfx::UniformType::Uniform1f );
|
u_lightPosRadius = bgfx::createUniform("u_lightPosRadius", bgfx::UniformType::Vec4, MAX_NUM_LIGHTS);
|
||||||
u_lightPosRadius = bgfx::createUniform("u_lightPosRadius", bgfx::UniformType::Uniform4fv, MAX_NUM_LIGHTS);
|
u_lightRgbInnerR = bgfx::createUniform("u_lightRgbInnerR", bgfx::UniformType::Vec4, MAX_NUM_LIGHTS);
|
||||||
u_lightRgbInnerR = bgfx::createUniform("u_lightRgbInnerR", bgfx::UniformType::Uniform4fv, MAX_NUM_LIGHTS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//call this once at initialization
|
//call this once at initialization
|
||||||
@@ -334,12 +333,6 @@ struct Uniforms
|
|||||||
bgfx::setUniform(u_specular_shininess, &m_specular_shininess);
|
bgfx::setUniform(u_specular_shininess, &m_specular_shininess);
|
||||||
}
|
}
|
||||||
|
|
||||||
//call this once per frame
|
|
||||||
void submitPerFrameUniforms()
|
|
||||||
{
|
|
||||||
bgfx::setUniform(u_time, &m_time);
|
|
||||||
}
|
|
||||||
|
|
||||||
//call this before each draw call
|
//call this before each draw call
|
||||||
void submitPerDrawUniforms()
|
void submitPerDrawUniforms()
|
||||||
{
|
{
|
||||||
@@ -356,7 +349,6 @@ struct Uniforms
|
|||||||
bgfx::destroyUniform(u_diffuse);
|
bgfx::destroyUniform(u_diffuse);
|
||||||
bgfx::destroyUniform(u_specular_shininess);
|
bgfx::destroyUniform(u_specular_shininess);
|
||||||
bgfx::destroyUniform(u_color);
|
bgfx::destroyUniform(u_color);
|
||||||
bgfx::destroyUniform(u_time);
|
|
||||||
bgfx::destroyUniform(u_lightPosRadius);
|
bgfx::destroyUniform(u_lightPosRadius);
|
||||||
bgfx::destroyUniform(u_lightRgbInnerR);
|
bgfx::destroyUniform(u_lightRgbInnerR);
|
||||||
}
|
}
|
||||||
@@ -399,7 +391,6 @@ struct Uniforms
|
|||||||
bgfx::UniformHandle u_diffuse;
|
bgfx::UniformHandle u_diffuse;
|
||||||
bgfx::UniformHandle u_specular_shininess;
|
bgfx::UniformHandle u_specular_shininess;
|
||||||
bgfx::UniformHandle u_color;
|
bgfx::UniformHandle u_color;
|
||||||
bgfx::UniformHandle u_time;
|
|
||||||
bgfx::UniformHandle u_lightPosRadius;
|
bgfx::UniformHandle u_lightPosRadius;
|
||||||
bgfx::UniformHandle u_lightRgbInnerR;
|
bgfx::UniformHandle u_lightRgbInnerR;
|
||||||
};
|
};
|
||||||
@@ -873,7 +864,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
s_uniforms.init();
|
s_uniforms.init();
|
||||||
s_uniforms.submitConstUniforms();
|
s_uniforms.submitConstUniforms();
|
||||||
|
|
||||||
u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Uniform1iv);
|
u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Int1);
|
||||||
|
|
||||||
bgfx::ProgramHandle programTextureLightning = loadProgram("vs_stencil_texture_lightning", "fs_stencil_texture_lightning");
|
bgfx::ProgramHandle programTextureLightning = loadProgram("vs_stencil_texture_lightning", "fs_stencil_texture_lightning");
|
||||||
bgfx::ProgramHandle programColorLightning = loadProgram("vs_stencil_color_lightning", "fs_stencil_color_lightning" );
|
bgfx::ProgramHandle programColorLightning = loadProgram("vs_stencil_color_lightning", "fs_stencil_color_lightning" );
|
||||||
@@ -1001,7 +992,6 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
s_uniforms.m_params.m_lightCount = settings_numLights;
|
s_uniforms.m_params.m_lightCount = settings_numLights;
|
||||||
s_uniforms.m_params.m_lightIndex = 0.0f;
|
s_uniforms.m_params.m_lightIndex = 0.0f;
|
||||||
s_uniforms.m_color[3] = settings_reflectionValue;
|
s_uniforms.m_color[3] = settings_reflectionValue;
|
||||||
s_uniforms.submitPerFrameUniforms();
|
|
||||||
|
|
||||||
// Time.
|
// Time.
|
||||||
int64_t now = bx::getHPCounter();
|
int64_t now = bx::getHPCounter();
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ $input v_normal, v_view
|
|||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
uniform vec4 u_params;
|
uniform vec4 u_params;
|
||||||
uniform vec4 u_svparams;
|
uniform vec4 u_svparams;
|
||||||
uniform vec3 u_ambient;
|
uniform vec4 u_ambient;
|
||||||
uniform vec3 u_diffuse;
|
uniform vec4 u_diffuse;
|
||||||
uniform vec4 u_color;
|
uniform vec4 u_color;
|
||||||
uniform vec4 u_specular_shininess;
|
uniform vec4 u_specular_shininess;
|
||||||
uniform vec4 u_fog;
|
uniform vec4 u_fog;
|
||||||
@@ -54,14 +54,14 @@ vec3 calcLight(vec3 _view, vec3 _normal, vec3 _viewDir)
|
|||||||
|
|
||||||
float dist = max(length(toLight), u_lightPosRadius.w);
|
float dist = max(length(toLight), u_lightPosRadius.w);
|
||||||
float attn = 50.0 * pow(dist, -2.0);
|
float attn = 50.0 * pow(dist, -2.0);
|
||||||
vec3 rgb = (lc.y * u_diffuse + lc.z * u_specular) * u_lightRgbInnerR.rgb * attn;
|
vec3 rgb = (lc.y * u_diffuse.xyz + lc.z * u_specular) * u_lightRgbInnerR.rgb * attn;
|
||||||
|
|
||||||
return rgb;
|
return rgb;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 ambientColor = u_ambient * u_ambientPass;
|
vec3 ambientColor = u_ambient.xyz * u_ambientPass;
|
||||||
|
|
||||||
vec3 normal = normalize(v_normal);
|
vec3 normal = normalize(v_normal);
|
||||||
vec3 viewDir = -normalize(v_view);
|
vec3 viewDir = -normalize(v_view);
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ $input v_k
|
|||||||
|
|
||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
|
|
||||||
uniform vec3 u_color;
|
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
float k = v_k;
|
float k = v_k;
|
||||||
|
|||||||
@@ -8,9 +8,8 @@ $input v_normal, v_view, v_texcoord0
|
|||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
uniform vec4 u_params;
|
uniform vec4 u_params;
|
||||||
uniform vec4 u_svparams;
|
uniform vec4 u_svparams;
|
||||||
uniform vec3 u_ambient;
|
uniform vec4 u_ambient;
|
||||||
uniform vec3 u_diffuse;
|
uniform vec4 u_diffuse;
|
||||||
uniform vec4 u_color;
|
|
||||||
uniform vec4 u_specular_shininess;
|
uniform vec4 u_specular_shininess;
|
||||||
uniform vec4 u_fog;
|
uniform vec4 u_fog;
|
||||||
uniform vec4 u_lightPosRadius;
|
uniform vec4 u_lightPosRadius;
|
||||||
@@ -55,14 +54,14 @@ vec3 calcLight(vec3 _view, vec3 _normal, vec3 _viewDir)
|
|||||||
|
|
||||||
float dist = max(length(toLight), u_lightPosRadius.w);
|
float dist = max(length(toLight), u_lightPosRadius.w);
|
||||||
float attn = 50.0 * pow(dist, -2.0);
|
float attn = 50.0 * pow(dist, -2.0);
|
||||||
vec3 rgb = (lc.y * u_diffuse + lc.z * u_specular) * u_lightRgbInnerR.rgb * attn;
|
vec3 rgb = (lc.y * u_diffuse.xyz + lc.z * u_specular) * u_lightRgbInnerR.rgb * attn;
|
||||||
|
|
||||||
return rgb;
|
return rgb;
|
||||||
}
|
}
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec3 ambientColor = u_ambient * u_ambientPass;
|
vec3 ambientColor = u_ambient.xyz * u_ambientPass;
|
||||||
|
|
||||||
vec3 normal = normalize(v_normal);
|
vec3 normal = normalize(v_normal);
|
||||||
vec3 viewDir = -normalize(v_view);
|
vec3 viewDir = -normalize(v_view);
|
||||||
|
|||||||
@@ -250,17 +250,16 @@ struct Uniforms
|
|||||||
m_virtualLightPos_extrusionDist[2] = 0.0f;
|
m_virtualLightPos_extrusionDist[2] = 0.0f;
|
||||||
m_virtualLightPos_extrusionDist[3] = 100.0f;
|
m_virtualLightPos_extrusionDist[3] = 100.0f;
|
||||||
|
|
||||||
u_params = bgfx::createUniform("u_params", bgfx::UniformType::Uniform4fv);
|
u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4);
|
||||||
u_svparams = bgfx::createUniform("u_svparams", bgfx::UniformType::Uniform4fv);
|
u_svparams = bgfx::createUniform("u_svparams", bgfx::UniformType::Vec4);
|
||||||
u_ambient = bgfx::createUniform("u_ambient", bgfx::UniformType::Uniform4fv);
|
u_ambient = bgfx::createUniform("u_ambient", bgfx::UniformType::Vec4);
|
||||||
u_diffuse = bgfx::createUniform("u_diffuse", bgfx::UniformType::Uniform4fv);
|
u_diffuse = bgfx::createUniform("u_diffuse", bgfx::UniformType::Vec4);
|
||||||
u_specular_shininess = bgfx::createUniform("u_specular_shininess", bgfx::UniformType::Uniform4fv);
|
u_specular_shininess = bgfx::createUniform("u_specular_shininess", bgfx::UniformType::Vec4);
|
||||||
u_fog = bgfx::createUniform("u_fog", bgfx::UniformType::Uniform4fv);
|
u_fog = bgfx::createUniform("u_fog", bgfx::UniformType::Vec4);
|
||||||
u_color = bgfx::createUniform("u_color", bgfx::UniformType::Uniform4fv);
|
u_color = bgfx::createUniform("u_color", bgfx::UniformType::Vec4);
|
||||||
u_time = bgfx::createUniform("u_time", bgfx::UniformType::Uniform1f );
|
u_lightPosRadius = bgfx::createUniform("u_lightPosRadius", bgfx::UniformType::Vec4);
|
||||||
u_lightPosRadius = bgfx::createUniform("u_lightPosRadius", bgfx::UniformType::Uniform4fv);
|
u_lightRgbInnerR = bgfx::createUniform("u_lightRgbInnerR", bgfx::UniformType::Vec4);
|
||||||
u_lightRgbInnerR = bgfx::createUniform("u_lightRgbInnerR", bgfx::UniformType::Uniform4fv);
|
u_virtualLightPos_extrusionDist = bgfx::createUniform("u_virtualLightPos_extrusionDist", bgfx::UniformType::Vec4);
|
||||||
u_virtualLightPos_extrusionDist = bgfx::createUniform("u_virtualLightPos_extrusionDist", bgfx::UniformType::Uniform4fv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//call this once at initialization
|
//call this once at initialization
|
||||||
@@ -272,12 +271,6 @@ struct Uniforms
|
|||||||
bgfx::setUniform(u_fog, &m_fog);
|
bgfx::setUniform(u_fog, &m_fog);
|
||||||
}
|
}
|
||||||
|
|
||||||
//call this once per frame
|
|
||||||
void submitPerFrameUniforms()
|
|
||||||
{
|
|
||||||
bgfx::setUniform(u_time, &m_time);
|
|
||||||
}
|
|
||||||
|
|
||||||
//call this before each draw call
|
//call this before each draw call
|
||||||
void submitPerDrawUniforms()
|
void submitPerDrawUniforms()
|
||||||
{
|
{
|
||||||
@@ -298,7 +291,6 @@ struct Uniforms
|
|||||||
bgfx::destroyUniform(u_specular_shininess);
|
bgfx::destroyUniform(u_specular_shininess);
|
||||||
bgfx::destroyUniform(u_fog);
|
bgfx::destroyUniform(u_fog);
|
||||||
bgfx::destroyUniform(u_color);
|
bgfx::destroyUniform(u_color);
|
||||||
bgfx::destroyUniform(u_time);
|
|
||||||
bgfx::destroyUniform(u_lightPosRadius);
|
bgfx::destroyUniform(u_lightPosRadius);
|
||||||
bgfx::destroyUniform(u_lightRgbInnerR);
|
bgfx::destroyUniform(u_lightRgbInnerR);
|
||||||
bgfx::destroyUniform(u_virtualLightPos_extrusionDist);
|
bgfx::destroyUniform(u_virtualLightPos_extrusionDist);
|
||||||
@@ -351,7 +343,6 @@ struct Uniforms
|
|||||||
bgfx::UniformHandle u_specular_shininess;
|
bgfx::UniformHandle u_specular_shininess;
|
||||||
bgfx::UniformHandle u_fog;
|
bgfx::UniformHandle u_fog;
|
||||||
bgfx::UniformHandle u_color;
|
bgfx::UniformHandle u_color;
|
||||||
bgfx::UniformHandle u_time;
|
|
||||||
bgfx::UniformHandle u_lightPosRadius;
|
bgfx::UniformHandle u_lightPosRadius;
|
||||||
bgfx::UniformHandle u_lightRgbInnerR;
|
bgfx::UniformHandle u_lightRgbInnerR;
|
||||||
bgfx::UniformHandle u_virtualLightPos_extrusionDist;
|
bgfx::UniformHandle u_virtualLightPos_extrusionDist;
|
||||||
@@ -1906,8 +1897,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
};
|
};
|
||||||
s_stencilFb = bgfx::createFrameBuffer(BX_COUNTOF(fbtextures), fbtextures, true);
|
s_stencilFb = bgfx::createFrameBuffer(BX_COUNTOF(fbtextures), fbtextures, true);
|
||||||
|
|
||||||
u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Uniform1iv);
|
u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Int1);
|
||||||
u_texStencil = bgfx::createUniform("u_texStencil", bgfx::UniformType::Uniform1iv);
|
u_texStencil = bgfx::createUniform("u_texStencil", bgfx::UniformType::Int1);
|
||||||
|
|
||||||
bgfx::ProgramHandle programTextureLightning = loadProgram("vs_shadowvolume_texture_lightning", "fs_shadowvolume_texture_lightning");
|
bgfx::ProgramHandle programTextureLightning = loadProgram("vs_shadowvolume_texture_lightning", "fs_shadowvolume_texture_lightning");
|
||||||
bgfx::ProgramHandle programColorLightning = loadProgram("vs_shadowvolume_color_lightning", "fs_shadowvolume_color_lightning" );
|
bgfx::ProgramHandle programColorLightning = loadProgram("vs_shadowvolume_color_lightning", "fs_shadowvolume_color_lightning" );
|
||||||
@@ -2255,7 +2246,6 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
s_uniforms.m_params.m_lightningPass = 1.0f;
|
s_uniforms.m_params.m_lightningPass = 1.0f;
|
||||||
s_uniforms.m_params.m_texelHalf = s_texelHalf;
|
s_uniforms.m_params.m_texelHalf = s_texelHalf;
|
||||||
s_uniforms.m_svparams.m_useStencilTex = float(settings_useStencilTexture);
|
s_uniforms.m_svparams.m_useStencilTex = float(settings_useStencilTexture);
|
||||||
s_uniforms.submitPerFrameUniforms();
|
|
||||||
|
|
||||||
//set picked bunny model
|
//set picked bunny model
|
||||||
Model* bunnyModel = BunnyLowPoly == currentMesh ? &bunnyLowPolyModel : &bunnyHighPolyModel;
|
Model* bunnyModel = BunnyLowPoly == currentMesh ? &bunnyLowPolyModel : &bunnyHighPolyModel;
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::setDebug(debug);
|
bgfx::setDebug(debug);
|
||||||
|
|
||||||
// Uniforms.
|
// Uniforms.
|
||||||
bgfx::UniformHandle u_shadowMap = bgfx::createUniform("u_shadowMap", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle u_shadowMap = bgfx::createUniform("u_shadowMap", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle u_lightPos = bgfx::createUniform("u_lightPos", bgfx::UniformType::Uniform4fv);
|
bgfx::UniformHandle u_lightPos = bgfx::createUniform("u_lightPos", bgfx::UniformType::Vec4);
|
||||||
bgfx::UniformHandle u_lightMtx = bgfx::createUniform("u_lightMtx", bgfx::UniformType::Uniform4x4fv);
|
bgfx::UniformHandle u_lightMtx = bgfx::createUniform("u_lightMtx", bgfx::UniformType::Mat4);
|
||||||
|
|
||||||
// Vertex declarations.
|
// Vertex declarations.
|
||||||
bgfx::VertexDecl PosNormalDecl;
|
bgfx::VertexDecl PosNormalDecl;
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ uniform vec4 u_params1;
|
|||||||
uniform vec4 u_params2;
|
uniform vec4 u_params2;
|
||||||
uniform vec4 u_color;
|
uniform vec4 u_color;
|
||||||
|
|
||||||
uniform vec3 u_materialKa;
|
uniform vec4 u_materialKa;
|
||||||
uniform vec3 u_materialKd;
|
uniform vec4 u_materialKd;
|
||||||
uniform vec4 u_materialKs;
|
uniform vec4 u_materialKs;
|
||||||
uniform vec4 u_lightPosition;
|
uniform vec4 u_lightPosition;
|
||||||
uniform vec4 u_lightAmbientPower;
|
uniform vec4 u_lightAmbientPower;
|
||||||
@@ -23,10 +23,10 @@ uniform vec4 u_smSamplingParams;
|
|||||||
uniform vec4 u_csmFarDistances;
|
uniform vec4 u_csmFarDistances;
|
||||||
|
|
||||||
#if SM_OMNI
|
#if SM_OMNI
|
||||||
uniform vec3 u_tetraNormalGreen;
|
uniform vec4 u_tetraNormalGreen;
|
||||||
uniform vec3 u_tetraNormalYellow;
|
uniform vec4 u_tetraNormalYellow;
|
||||||
uniform vec3 u_tetraNormalBlue;
|
uniform vec4 u_tetraNormalBlue;
|
||||||
uniform vec3 u_tetraNormalRed;
|
uniform vec4 u_tetraNormalRed;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SAMPLER2D(u_shadowMap0, 4);
|
SAMPLER2D(u_shadowMap0, 4);
|
||||||
@@ -45,8 +45,8 @@ Shader evalShader(float _diff, float _spec)
|
|||||||
{
|
{
|
||||||
Shader shader;
|
Shader shader;
|
||||||
|
|
||||||
shader.ambi = u_lightAmbientPower.xyz * u_lightAmbientPower.w * u_materialKa;
|
shader.ambi = u_lightAmbientPower.xyz * u_lightAmbientPower.w * u_materialKa.xyz;
|
||||||
shader.diff = u_lightDiffusePower.xyz * u_lightDiffusePower.w * u_materialKd * _diff;
|
shader.diff = u_lightDiffusePower.xyz * u_lightDiffusePower.w * u_materialKd.xyz * _diff;
|
||||||
shader.spec = u_lightSpecularPower.xyz * u_lightSpecularPower.w * u_materialKs.xyz * _spec;
|
shader.spec = u_lightSpecularPower.xyz * u_lightSpecularPower.w * u_materialKs.xyz * _spec;
|
||||||
|
|
||||||
return shader;
|
return shader;
|
||||||
|
|||||||
@@ -79,10 +79,10 @@
|
|||||||
|
|
||||||
vec4 faceSelection;
|
vec4 faceSelection;
|
||||||
vec3 pos = v_position.xyz;
|
vec3 pos = v_position.xyz;
|
||||||
faceSelection.x = dot(u_tetraNormalGreen, pos);
|
faceSelection.x = dot(u_tetraNormalGreen.xyz, pos);
|
||||||
faceSelection.y = dot(u_tetraNormalYellow, pos);
|
faceSelection.y = dot(u_tetraNormalYellow.xyz, pos);
|
||||||
faceSelection.z = dot(u_tetraNormalBlue, pos);
|
faceSelection.z = dot(u_tetraNormalBlue.xyz, pos);
|
||||||
faceSelection.w = dot(u_tetraNormalRed, pos);
|
faceSelection.w = dot(u_tetraNormalRed.xyz, pos);
|
||||||
|
|
||||||
vec4 shadowcoord;
|
vec4 shadowcoord;
|
||||||
float faceMax = max(max(faceSelection.x, faceSelection.y), max(faceSelection.z, faceSelection.w));
|
float faceMax = max(max(faceSelection.x, faceSelection.y), max(faceSelection.z, faceSelection.w));
|
||||||
|
|||||||
@@ -448,34 +448,34 @@ struct Uniforms
|
|||||||
m_XOffset = 10.0f/512.0f;
|
m_XOffset = 10.0f/512.0f;
|
||||||
m_YOffset = 10.0f/512.0f;
|
m_YOffset = 10.0f/512.0f;
|
||||||
|
|
||||||
u_params0 = bgfx::createUniform("u_params0", bgfx::UniformType::Uniform4fv);
|
u_params0 = bgfx::createUniform("u_params0", bgfx::UniformType::Vec4);
|
||||||
u_params1 = bgfx::createUniform("u_params1", bgfx::UniformType::Uniform4fv);
|
u_params1 = bgfx::createUniform("u_params1", bgfx::UniformType::Vec4);
|
||||||
u_params2 = bgfx::createUniform("u_params2", bgfx::UniformType::Uniform4fv);
|
u_params2 = bgfx::createUniform("u_params2", bgfx::UniformType::Vec4);
|
||||||
u_color = bgfx::createUniform("u_color", bgfx::UniformType::Uniform4fv);
|
u_color = bgfx::createUniform("u_color", bgfx::UniformType::Vec4);
|
||||||
u_smSamplingParams = bgfx::createUniform("u_smSamplingParams", bgfx::UniformType::Uniform4fv);
|
u_smSamplingParams = bgfx::createUniform("u_smSamplingParams", bgfx::UniformType::Vec4);
|
||||||
u_csmFarDistances = bgfx::createUniform("u_csmFarDistances", bgfx::UniformType::Uniform4fv);
|
u_csmFarDistances = bgfx::createUniform("u_csmFarDistances", bgfx::UniformType::Vec4);
|
||||||
u_lightMtx = bgfx::createUniform("u_lightMtx", bgfx::UniformType::Uniform4x4fv);
|
u_lightMtx = bgfx::createUniform("u_lightMtx", bgfx::UniformType::Mat4);
|
||||||
|
|
||||||
u_tetraNormalGreen = bgfx::createUniform("u_tetraNormalGreen", bgfx::UniformType::Uniform3fv);
|
u_tetraNormalGreen = bgfx::createUniform("u_tetraNormalGreen", bgfx::UniformType::Vec4);
|
||||||
u_tetraNormalYellow = bgfx::createUniform("u_tetraNormalYellow", bgfx::UniformType::Uniform3fv);
|
u_tetraNormalYellow = bgfx::createUniform("u_tetraNormalYellow", bgfx::UniformType::Vec4);
|
||||||
u_tetraNormalBlue = bgfx::createUniform("u_tetraNormalBlue", bgfx::UniformType::Uniform3fv);
|
u_tetraNormalBlue = bgfx::createUniform("u_tetraNormalBlue", bgfx::UniformType::Vec4);
|
||||||
u_tetraNormalRed = bgfx::createUniform("u_tetraNormalRed", bgfx::UniformType::Uniform3fv);
|
u_tetraNormalRed = bgfx::createUniform("u_tetraNormalRed", bgfx::UniformType::Vec4);
|
||||||
|
|
||||||
u_shadowMapMtx0 = bgfx::createUniform("u_shadowMapMtx0", bgfx::UniformType::Uniform4x4fv);
|
u_shadowMapMtx0 = bgfx::createUniform("u_shadowMapMtx0", bgfx::UniformType::Mat4);
|
||||||
u_shadowMapMtx1 = bgfx::createUniform("u_shadowMapMtx1", bgfx::UniformType::Uniform4x4fv);
|
u_shadowMapMtx1 = bgfx::createUniform("u_shadowMapMtx1", bgfx::UniformType::Mat4);
|
||||||
u_shadowMapMtx2 = bgfx::createUniform("u_shadowMapMtx2", bgfx::UniformType::Uniform4x4fv);
|
u_shadowMapMtx2 = bgfx::createUniform("u_shadowMapMtx2", bgfx::UniformType::Mat4);
|
||||||
u_shadowMapMtx3 = bgfx::createUniform("u_shadowMapMtx3", bgfx::UniformType::Uniform4x4fv);
|
u_shadowMapMtx3 = bgfx::createUniform("u_shadowMapMtx3", bgfx::UniformType::Mat4);
|
||||||
|
|
||||||
u_lightPosition = bgfx::createUniform("u_lightPosition", bgfx::UniformType::Uniform4fv);
|
u_lightPosition = bgfx::createUniform("u_lightPosition", bgfx::UniformType::Vec4);
|
||||||
u_lightAmbientPower = bgfx::createUniform("u_lightAmbientPower", bgfx::UniformType::Uniform4fv);
|
u_lightAmbientPower = bgfx::createUniform("u_lightAmbientPower", bgfx::UniformType::Vec4);
|
||||||
u_lightDiffusePower = bgfx::createUniform("u_lightDiffusePower", bgfx::UniformType::Uniform4fv);
|
u_lightDiffusePower = bgfx::createUniform("u_lightDiffusePower", bgfx::UniformType::Vec4);
|
||||||
u_lightSpecularPower = bgfx::createUniform("u_lightSpecularPower", bgfx::UniformType::Uniform4fv);
|
u_lightSpecularPower = bgfx::createUniform("u_lightSpecularPower", bgfx::UniformType::Vec4);
|
||||||
u_lightSpotDirectionInner = bgfx::createUniform("u_lightSpotDirectionInner", bgfx::UniformType::Uniform4fv);
|
u_lightSpotDirectionInner = bgfx::createUniform("u_lightSpotDirectionInner", bgfx::UniformType::Vec4);
|
||||||
u_lightAttenuationSpotOuter = bgfx::createUniform("u_lightAttenuationSpotOuter", bgfx::UniformType::Uniform4fv);
|
u_lightAttenuationSpotOuter = bgfx::createUniform("u_lightAttenuationSpotOuter", bgfx::UniformType::Vec4);
|
||||||
|
|
||||||
u_materialKa = bgfx::createUniform("u_materialKa", bgfx::UniformType::Uniform4fv);
|
u_materialKa = bgfx::createUniform("u_materialKa", bgfx::UniformType::Vec4);
|
||||||
u_materialKd = bgfx::createUniform("u_materialKd", bgfx::UniformType::Uniform4fv);
|
u_materialKd = bgfx::createUniform("u_materialKd", bgfx::UniformType::Vec4);
|
||||||
u_materialKs = bgfx::createUniform("u_materialKs", bgfx::UniformType::Uniform4fv);
|
u_materialKs = bgfx::createUniform("u_materialKs", bgfx::UniformType::Vec4);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1350,11 +1350,11 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
|
|
||||||
// Uniforms.
|
// Uniforms.
|
||||||
s_uniforms.init();
|
s_uniforms.init();
|
||||||
u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Uniform1iv);
|
u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Int1);
|
||||||
u_shadowMap[0] = bgfx::createUniform("u_shadowMap0", bgfx::UniformType::Uniform1iv);
|
u_shadowMap[0] = bgfx::createUniform("u_shadowMap0", bgfx::UniformType::Int1);
|
||||||
u_shadowMap[1] = bgfx::createUniform("u_shadowMap1", bgfx::UniformType::Uniform1iv);
|
u_shadowMap[1] = bgfx::createUniform("u_shadowMap1", bgfx::UniformType::Int1);
|
||||||
u_shadowMap[2] = bgfx::createUniform("u_shadowMap2", bgfx::UniformType::Uniform1iv);
|
u_shadowMap[2] = bgfx::createUniform("u_shadowMap2", bgfx::UniformType::Int1);
|
||||||
u_shadowMap[3] = bgfx::createUniform("u_shadowMap3", bgfx::UniformType::Uniform1iv);
|
u_shadowMap[3] = bgfx::createUniform("u_shadowMap3", bgfx::UniformType::Int1);
|
||||||
|
|
||||||
// Programs.
|
// Programs.
|
||||||
s_programs.init();
|
s_programs.init();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
static const uint8_t fs_drawstress_glsl[89] =
|
static const uint8_t fs_drawstress_glsl[89] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I..J...va
|
0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I..J...va
|
||||||
0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4
|
0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4
|
||||||
0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // v_color0;.void
|
0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // v_color0;.void
|
||||||
0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // main ().{. gl_F
|
0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // main ().{. gl_F
|
||||||
@@ -9,7 +9,7 @@ static const uint8_t fs_drawstress_glsl[89] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_drawstress_dx9[137] =
|
static const uint8_t fs_drawstress_dx9[137] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I..|.....
|
0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I..|.....
|
||||||
0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#...
|
0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#...
|
||||||
0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
||||||
0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
|
0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
|
||||||
@@ -21,7 +21,7 @@ static const uint8_t fs_drawstress_dx9[137] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_drawstress_dx11[260] =
|
static const uint8_t fs_drawstress_dx11[260] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xf4, 0x00, 0x44, 0x58, 0x42, 0x43, // FSH....I....DXBC
|
0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xf4, 0x00, 0x44, 0x58, 0x42, 0x43, // FSH....I....DXBC
|
||||||
0xa6, 0x7f, 0x08, 0xe2, 0x95, 0xbd, 0x5f, 0xa3, 0x3f, 0x5b, 0x58, 0x8e, 0x54, 0x0f, 0x89, 0x67, // ......_.?[X.T..g
|
0xa6, 0x7f, 0x08, 0xe2, 0x95, 0xbd, 0x5f, 0xa3, 0x3f, 0x5b, 0x58, 0x8e, 0x54, 0x0f, 0x89, 0x67, // ......_.?[X.T..g
|
||||||
0x01, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
0x01, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
||||||
0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // ........ISGNL...
|
0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // ........ISGNL...
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t vs_drawstress_glsl[325] =
|
static const uint8_t vs_drawstress_glsl[325] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod
|
0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
||||||
0x20, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ...attribute hi
|
0x20, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ...attribute hi
|
||||||
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color
|
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color
|
||||||
0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig
|
0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig
|
||||||
@@ -24,8 +24,8 @@ static const uint8_t vs_drawstress_glsl[325] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_drawstress_dx9[319] =
|
static const uint8_t vs_drawstress_dx9[319] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod
|
0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB..
|
0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB..
|
||||||
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
||||||
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
||||||
@@ -47,8 +47,8 @@ static const uint8_t vs_drawstress_dx9[319] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_drawstress_dx11[510] =
|
static const uint8_t vs_drawstress_dx11[510] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod
|
0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0xd4, 0x01, 0x44, 0x58, 0x42, 0x43, 0x32, 0x9b, 0xdd, 0xb5, 0xa9, 0xb7, 0x22, 0xf0, 0xcf, 0x5e, // ..DXBC2....."..^
|
0xd4, 0x01, 0x44, 0x58, 0x42, 0x43, 0x32, 0x9b, 0xdd, 0xb5, 0xa9, 0xb7, 0x22, 0xf0, 0xcf, 0x5e, // ..DXBC2....."..^
|
||||||
0x34, 0x2c, 0x72, 0xf0, 0x87, 0x00, 0x01, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x03, 0x00, // 4,r.............
|
0x34, 0x2c, 0x72, 0xf0, 0x87, 0x00, 0x01, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x03, 0x00, // 4,r.............
|
||||||
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...|.......IS
|
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...|.......IS
|
||||||
|
|||||||
@@ -7,13 +7,11 @@ $input v_view, v_normal
|
|||||||
|
|
||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
|
|
||||||
uniform float u_time;
|
|
||||||
uniform vec4 u_params;
|
uniform vec4 u_params;
|
||||||
uniform mat4 u_mtx;
|
uniform mat4 u_mtx;
|
||||||
uniform vec4 u_flags;
|
uniform vec4 u_flags;
|
||||||
uniform vec3 u_camPos;
|
uniform vec4 u_rgbDiff;
|
||||||
uniform vec3 u_rgbDiff;
|
uniform vec4 u_rgbSpec;
|
||||||
uniform vec3 u_rgbSpec;
|
|
||||||
|
|
||||||
SAMPLERCUBE(u_texCube, 4);
|
SAMPLERCUBE(u_texCube, 4);
|
||||||
SAMPLERCUBE(u_texCubeIrr, 5);
|
SAMPLERCUBE(u_texCubeIrr, 5);
|
||||||
@@ -55,8 +53,8 @@ void main()
|
|||||||
float mipLevel = min((1.0 - u_glossiness)*11.0 + 1.0, 8.0);
|
float mipLevel = min((1.0 - u_glossiness)*11.0 + 1.0, 8.0);
|
||||||
vec3 cenv = textureCubeLod(u_texCube, cubeR, mipLevel).xyz;
|
vec3 cenv = textureCubeLod(u_texCube, cubeR, mipLevel).xyz;
|
||||||
|
|
||||||
vec3 kd = u_rgbDiff;
|
vec3 kd = u_rgbDiff.xyz;
|
||||||
vec3 ks = u_rgbSpec;
|
vec3 ks = u_rgbSpec.xyz;
|
||||||
|
|
||||||
vec3 cs = ks * u_diffspec;
|
vec3 cs = ks * u_diffspec;
|
||||||
vec3 cd = kd * (1.0 - cs);
|
vec3 cd = kd * (1.0 - cs);
|
||||||
|
|||||||
@@ -23,22 +23,20 @@ struct Uniforms
|
|||||||
m_time = 0.0f;
|
m_time = 0.0f;
|
||||||
bx::mtxIdentity(m_mtx);
|
bx::mtxIdentity(m_mtx);
|
||||||
|
|
||||||
u_time = bgfx::createUniform("u_time", bgfx::UniformType::Uniform1f);
|
u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Mat4);
|
||||||
u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Uniform4x4fv);
|
u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4);
|
||||||
u_params = bgfx::createUniform("u_params", bgfx::UniformType::Uniform4fv);
|
u_flags = bgfx::createUniform("u_flags", bgfx::UniformType::Vec4);
|
||||||
u_flags = bgfx::createUniform("u_flags", bgfx::UniformType::Uniform4fv);
|
u_camPos = bgfx::createUniform("u_camPos", bgfx::UniformType::Vec4);
|
||||||
u_camPos = bgfx::createUniform("u_camPos", bgfx::UniformType::Uniform3fv);
|
u_rgbDiff = bgfx::createUniform("u_rgbDiff", bgfx::UniformType::Vec4);
|
||||||
u_rgbDiff = bgfx::createUniform("u_rgbDiff", bgfx::UniformType::Uniform3fv);
|
u_rgbSpec = bgfx::createUniform("u_rgbSpec", bgfx::UniformType::Vec4);
|
||||||
u_rgbSpec = bgfx::createUniform("u_rgbSpec", bgfx::UniformType::Uniform3fv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call this once per frame.
|
// Call this once per frame.
|
||||||
void submitPerFrameUniforms()
|
void submitPerFrameUniforms()
|
||||||
{
|
{
|
||||||
bgfx::setUniform(u_time, &m_time);
|
bgfx::setUniform(u_mtx, m_mtx);
|
||||||
bgfx::setUniform(u_mtx, m_mtx);
|
bgfx::setUniform(u_flags, m_flags);
|
||||||
bgfx::setUniform(u_flags, m_flags);
|
bgfx::setUniform(u_camPos, m_camPosTime);
|
||||||
bgfx::setUniform(u_camPos, m_camPos);
|
|
||||||
bgfx::setUniform(u_rgbDiff, m_rgbDiff);
|
bgfx::setUniform(u_rgbDiff, m_rgbDiff);
|
||||||
bgfx::setUniform(u_rgbSpec, m_rgbSpec);
|
bgfx::setUniform(u_rgbSpec, m_rgbSpec);
|
||||||
}
|
}
|
||||||
@@ -57,7 +55,6 @@ struct Uniforms
|
|||||||
bgfx::destroyUniform(u_flags);
|
bgfx::destroyUniform(u_flags);
|
||||||
bgfx::destroyUniform(u_params);
|
bgfx::destroyUniform(u_params);
|
||||||
bgfx::destroyUniform(u_mtx);
|
bgfx::destroyUniform(u_mtx);
|
||||||
bgfx::destroyUniform(u_time);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
union
|
union
|
||||||
@@ -67,7 +64,7 @@ struct Uniforms
|
|||||||
float m_glossiness;
|
float m_glossiness;
|
||||||
float m_exposure;
|
float m_exposure;
|
||||||
float m_diffspec;
|
float m_diffspec;
|
||||||
float m_unused0;
|
float m_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
float m_params[4];
|
float m_params[4];
|
||||||
@@ -86,13 +83,11 @@ struct Uniforms
|
|||||||
float m_flags[4];
|
float m_flags[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
float m_time;
|
|
||||||
float m_mtx[16];
|
float m_mtx[16];
|
||||||
float m_camPos[3];
|
float m_camPosTime[4];
|
||||||
float m_rgbDiff[3];
|
float m_rgbDiff[4];
|
||||||
float m_rgbSpec[3];
|
float m_rgbSpec[4];
|
||||||
|
|
||||||
bgfx::UniformHandle u_time;
|
|
||||||
bgfx::UniformHandle u_mtx;
|
bgfx::UniformHandle u_mtx;
|
||||||
bgfx::UniformHandle u_params;
|
bgfx::UniformHandle u_params;
|
||||||
bgfx::UniformHandle u_flags;
|
bgfx::UniformHandle u_flags;
|
||||||
@@ -256,17 +251,15 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
lightProbes[LightProbe::Grace ].load("grace");
|
lightProbes[LightProbe::Grace ].load("grace");
|
||||||
LightProbe::Enum currentLightProbe = LightProbe::Wells;
|
LightProbe::Enum currentLightProbe = LightProbe::Wells;
|
||||||
|
|
||||||
bgfx::UniformHandle u_time = bgfx::createUniform("u_time", bgfx::UniformType::Uniform1f);
|
bgfx::UniformHandle u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Mat4);
|
||||||
bgfx::UniformHandle u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Uniform4x4fv);
|
bgfx::UniformHandle u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4);
|
||||||
bgfx::UniformHandle u_params = bgfx::createUniform("u_params", bgfx::UniformType::Uniform4fv);
|
bgfx::UniformHandle u_flags = bgfx::createUniform("u_flags", bgfx::UniformType::Vec4);
|
||||||
bgfx::UniformHandle u_flags = bgfx::createUniform("u_flags", bgfx::UniformType::Uniform4fv);
|
bgfx::UniformHandle u_camPos = bgfx::createUniform("u_camPos", bgfx::UniformType::Vec4);
|
||||||
bgfx::UniformHandle u_camPos = bgfx::createUniform("u_camPos", bgfx::UniformType::Uniform3fv);
|
bgfx::UniformHandle s_texCube = bgfx::createUniform("s_texCube", bgfx::UniformType::Int1);
|
||||||
|
bgfx::UniformHandle s_texCubeIrr = bgfx::createUniform("s_texCubeIrr", bgfx::UniformType::Int1);
|
||||||
|
|
||||||
bgfx::UniformHandle u_texCube = bgfx::createUniform("u_texCube", bgfx::UniformType::Uniform1i);
|
bgfx::ProgramHandle programMesh = loadProgram("vs_ibl_mesh", "fs_ibl_mesh");
|
||||||
bgfx::UniformHandle u_texCubeIrr = bgfx::createUniform("u_texCubeIrr", bgfx::UniformType::Uniform1i);
|
bgfx::ProgramHandle programSky = loadProgram("vs_ibl_skybox", "fs_ibl_skybox");
|
||||||
|
|
||||||
bgfx::ProgramHandle programMesh = loadProgram("vs_ibl_mesh", "fs_ibl_mesh");
|
|
||||||
bgfx::ProgramHandle programSky = loadProgram("vs_ibl_skybox", "fs_ibl_skybox");
|
|
||||||
|
|
||||||
Mesh* meshBunny;
|
Mesh* meshBunny;
|
||||||
meshBunny = meshLoad("meshes/bunny.bin");
|
meshBunny = meshLoad("meshes/bunny.bin");
|
||||||
@@ -454,7 +447,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
const double toMs = 1000.0/freq;
|
const double toMs = 1000.0/freq;
|
||||||
|
|
||||||
time += (float)(frameTime*settings.m_speed/freq);
|
time += (float)(frameTime*settings.m_speed/freq);
|
||||||
s_uniforms.m_time = time;
|
s_uniforms.m_camPosTime[3] = time;
|
||||||
|
|
||||||
// Use debug font to print information about this example.
|
// Use debug font to print information about this example.
|
||||||
bgfx::dbgTextClear();
|
bgfx::dbgTextClear();
|
||||||
@@ -478,7 +471,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::setViewTransform(0, view, proj);
|
bgfx::setViewTransform(0, view, proj);
|
||||||
|
|
||||||
bx::mtxLookAt(view, eye, at);
|
bx::mtxLookAt(view, eye, at);
|
||||||
memcpy(s_uniforms.m_camPos, eye, 3*sizeof(float));
|
memcpy(s_uniforms.m_camPosTime, eye, 3*sizeof(float) );
|
||||||
bx::mtxProj(proj, 60.0f, float(width)/float(height), 0.1f, 100.0f);
|
bx::mtxProj(proj, 60.0f, float(width)/float(height), 0.1f, 100.0f);
|
||||||
bgfx::setViewTransform(1, view, proj);
|
bgfx::setViewTransform(1, view, proj);
|
||||||
|
|
||||||
@@ -486,7 +479,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::setViewRect(1, 0, 0, width, height);
|
bgfx::setViewRect(1, 0, 0, width, height);
|
||||||
|
|
||||||
// View 0.
|
// View 0.
|
||||||
bgfx::setTexture(4, u_texCube, lightProbes[currentLightProbe].m_tex);
|
bgfx::setTexture(4, s_texCube, lightProbes[currentLightProbe].m_tex);
|
||||||
bgfx::setProgram(programSky);
|
bgfx::setProgram(programSky);
|
||||||
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
|
||||||
screenSpaceQuad( (float)width, (float)height, true);
|
screenSpaceQuad( (float)width, (float)height, true);
|
||||||
@@ -507,8 +500,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
, 0.0f
|
, 0.0f
|
||||||
);
|
);
|
||||||
|
|
||||||
bgfx::setTexture(4, u_texCube, lightProbes[currentLightProbe].m_tex);
|
bgfx::setTexture(4, s_texCube, lightProbes[currentLightProbe].m_tex);
|
||||||
bgfx::setTexture(5, u_texCubeIrr, lightProbes[currentLightProbe].m_texIrr);
|
bgfx::setTexture(5, s_texCubeIrr, lightProbes[currentLightProbe].m_texIrr);
|
||||||
meshSubmit(meshBunny, 1, programMesh, mtx);
|
meshSubmit(meshBunny, 1, programMesh, mtx);
|
||||||
|
|
||||||
// Advance to next frame. Rendering thread will be kicked to
|
// Advance to next frame. Rendering thread will be kicked to
|
||||||
@@ -526,10 +519,9 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::destroyUniform(u_flags);
|
bgfx::destroyUniform(u_flags);
|
||||||
bgfx::destroyUniform(u_params);
|
bgfx::destroyUniform(u_params);
|
||||||
bgfx::destroyUniform(u_mtx);
|
bgfx::destroyUniform(u_mtx);
|
||||||
bgfx::destroyUniform(u_time);
|
|
||||||
|
|
||||||
bgfx::destroyUniform(u_texCube);
|
bgfx::destroyUniform(s_texCube);
|
||||||
bgfx::destroyUniform(u_texCubeIrr);
|
bgfx::destroyUniform(s_texCubeIrr);
|
||||||
|
|
||||||
for (uint8_t ii = 0; ii < LightProbe::Count; ++ii)
|
for (uint8_t ii = 0; ii < LightProbe::Count; ++ii)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ $output v_view, v_normal
|
|||||||
|
|
||||||
#include "../common/common.sh"
|
#include "../common/common.sh"
|
||||||
|
|
||||||
uniform vec3 u_camPos;
|
uniform vec4 u_camPos;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
@@ -16,5 +16,5 @@ void main()
|
|||||||
|
|
||||||
vec3 normal = a_normal * 2.0 - 1.0;
|
vec3 normal = a_normal * 2.0 - 1.0;
|
||||||
v_normal = mul(u_model[0], vec4(normal, 0.0) ).xyz;
|
v_normal = mul(u_model[0], vec4(normal, 0.0) ).xyz;
|
||||||
v_view = normalize(u_camPos - mul(u_model[0], vec4(a_position, 1.0)).xyz);
|
v_view = normalize(u_camPos.xyz - mul(u_model[0], vec4(a_position, 1.0)).xyz);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,9 +193,9 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::IndexBufferHandle ibh = bgfx::createIndexBuffer(mem);
|
bgfx::IndexBufferHandle ibh = bgfx::createIndexBuffer(mem);
|
||||||
|
|
||||||
// Create texture sampler uniforms.
|
// Create texture sampler uniforms.
|
||||||
bgfx::UniformHandle u_texColor0 = bgfx::createUniform("u_texColor0", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle s_texColor0 = bgfx::createUniform("s_texColor0", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle u_texColor1 = bgfx::createUniform("u_texColor1", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle s_texColor1 = bgfx::createUniform("s_texColor1", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle u_color = bgfx::createUniform("u_color", bgfx::UniformType::Uniform4fv);
|
bgfx::UniformHandle u_color = bgfx::createUniform("u_color", bgfx::UniformType::Vec4);
|
||||||
|
|
||||||
bgfx::ProgramHandle blend = loadProgram("vs_oit", "fs_oit" );
|
bgfx::ProgramHandle blend = loadProgram("vs_oit", "fs_oit" );
|
||||||
bgfx::ProgramHandle wbSeparatePass = loadProgram("vs_oit", "fs_oit_wb_separate" );
|
bgfx::ProgramHandle wbSeparatePass = loadProgram("vs_oit", "fs_oit_wb_separate" );
|
||||||
@@ -424,8 +424,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
|
|
||||||
if (0 != mode)
|
if (0 != mode)
|
||||||
{
|
{
|
||||||
bgfx::setTexture(0, u_texColor0, fbtextures[0]);
|
bgfx::setTexture(0, s_texColor0, fbtextures[0]);
|
||||||
bgfx::setTexture(1, u_texColor1, fbtextures[1]);
|
bgfx::setTexture(1, s_texColor1, fbtextures[1]);
|
||||||
bgfx::setProgram(1 == mode ? wbSeparateBlit : wbBlit);
|
bgfx::setProgram(1 == mode ? wbSeparateBlit : wbBlit);
|
||||||
bgfx::setState(0
|
bgfx::setState(0
|
||||||
| BGFX_STATE_RGB_WRITE
|
| BGFX_STATE_RGB_WRITE
|
||||||
@@ -451,8 +451,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::destroyProgram(wbSeparateBlit);
|
bgfx::destroyProgram(wbSeparateBlit);
|
||||||
bgfx::destroyProgram(wbPass);
|
bgfx::destroyProgram(wbPass);
|
||||||
bgfx::destroyProgram(wbBlit);
|
bgfx::destroyProgram(wbBlit);
|
||||||
bgfx::destroyUniform(u_texColor0);
|
bgfx::destroyUniform(s_texColor0);
|
||||||
bgfx::destroyUniform(u_texColor1);
|
bgfx::destroyUniform(s_texColor1);
|
||||||
bgfx::destroyUniform(u_color);
|
bgfx::destroyUniform(u_color);
|
||||||
|
|
||||||
// Shutdown bgfx.
|
// Shutdown bgfx.
|
||||||
|
|||||||
@@ -274,17 +274,17 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::IndexBufferHandle ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_cubeIndices, sizeof(s_cubeIndices) ) );
|
bgfx::IndexBufferHandle ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_cubeIndices, sizeof(s_cubeIndices) ) );
|
||||||
|
|
||||||
// Create texture sampler uniforms.
|
// Create texture sampler uniforms.
|
||||||
bgfx::UniformHandle s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle s_texNormal = bgfx::createUniform("s_texNormal", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle s_texNormal = bgfx::createUniform("s_texNormal", bgfx::UniformType::Int1);
|
||||||
|
|
||||||
bgfx::UniformHandle s_albedo = bgfx::createUniform("s_albedo", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle s_albedo = bgfx::createUniform("s_albedo", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle s_normal = bgfx::createUniform("s_normal", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle s_normal = bgfx::createUniform("s_normal", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle s_depth = bgfx::createUniform("s_depth", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle s_depth = bgfx::createUniform("s_depth", bgfx::UniformType::Int1);
|
||||||
bgfx::UniformHandle s_light = bgfx::createUniform("s_light", bgfx::UniformType::Uniform1iv);
|
bgfx::UniformHandle s_light = bgfx::createUniform("s_light", bgfx::UniformType::Int1);
|
||||||
|
|
||||||
bgfx::UniformHandle u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Uniform4x4fv);
|
bgfx::UniformHandle u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Mat4);
|
||||||
bgfx::UniformHandle u_lightPosRadius = bgfx::createUniform("u_lightPosRadius", bgfx::UniformType::Uniform4fv);
|
bgfx::UniformHandle u_lightPosRadius = bgfx::createUniform("u_lightPosRadius", bgfx::UniformType::Vec4);
|
||||||
bgfx::UniformHandle u_lightRgbInnerR = bgfx::createUniform("u_lightRgbInnerR", bgfx::UniformType::Uniform4fv);
|
bgfx::UniformHandle u_lightRgbInnerR = bgfx::createUniform("u_lightRgbInnerR", bgfx::UniformType::Vec4);
|
||||||
|
|
||||||
// Create program from shaders.
|
// Create program from shaders.
|
||||||
bgfx::ProgramHandle geomProgram = loadProgram("vs_deferred_geom", "fs_deferred_geom");
|
bgfx::ProgramHandle geomProgram = loadProgram("vs_deferred_geom", "fs_deferred_geom");
|
||||||
|
|||||||
@@ -2,12 +2,19 @@ $input v_color0, v_texcoord0
|
|||||||
|
|
||||||
#include <bgfx_shader.sh>
|
#include <bgfx_shader.sh>
|
||||||
|
|
||||||
SAMPLER2D(s_textureSampler, 0);
|
SAMPLER2D(s_texColor, 0);
|
||||||
|
|
||||||
uniform float u_compose_alpha;
|
uniform vec4 u_params;
|
||||||
uniform float u_compose_mult;
|
#define u_blur_scale u_params.xy
|
||||||
|
#define u_compose_mult u_params.z
|
||||||
|
#define u_compose_alpha u_params.w
|
||||||
|
|
||||||
void main() {
|
void main()
|
||||||
gl_FragColor = texture2D(s_textureSampler, v_texcoord0.xy) *
|
{
|
||||||
vec4(u_compose_mult, u_compose_mult, u_compose_mult, u_compose_alpha*u_compose_mult);
|
gl_FragColor = texture2D(s_texColor, v_texcoord0.xy)
|
||||||
|
* vec4( u_compose_mult
|
||||||
|
, u_compose_mult
|
||||||
|
, u_compose_mult
|
||||||
|
, u_compose_mult*u_compose_alpha
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,23 +2,30 @@ $input v_color0, v_texcoord0
|
|||||||
|
|
||||||
#include <bgfx_shader.sh>
|
#include <bgfx_shader.sh>
|
||||||
|
|
||||||
SAMPLER2D(s_textureSampler, 0);
|
SAMPLER2D(s_texColor, 0);
|
||||||
|
|
||||||
uniform vec2 u_blur_scale;
|
uniform vec4 u_params;
|
||||||
|
#define u_blur_scale u_params.xy
|
||||||
|
#define u_compose_mult u_params.z
|
||||||
|
#define u_compose_alpha u_params.w
|
||||||
|
|
||||||
uniform float u_compose_alpha;
|
void main()
|
||||||
uniform float u_compose_mult;
|
{
|
||||||
|
vec4 color;
|
||||||
|
color = texture2D(s_texColor, vec2(v_texcoord0.x-4.0*u_blur_scale.x, v_texcoord0.y-4.0*u_blur_scale.y))*0.05;
|
||||||
|
color += texture2D(s_texColor, vec2(v_texcoord0.x-3.0*u_blur_scale.x, v_texcoord0.y-3.0*u_blur_scale.y))*0.09;
|
||||||
|
color += texture2D(s_texColor, vec2(v_texcoord0.x-2.0*u_blur_scale.x, v_texcoord0.y-2.0*u_blur_scale.y))*0.12;
|
||||||
|
color += texture2D(s_texColor, vec2(v_texcoord0.x-1.0*u_blur_scale.x, v_texcoord0.y-1.0*u_blur_scale.y))*0.15;
|
||||||
|
color += texture2D(s_texColor, vec2(v_texcoord0.x+0.0*u_blur_scale.x, v_texcoord0.y+0.0*u_blur_scale.y))*0.16;
|
||||||
|
color += texture2D(s_texColor, vec2(v_texcoord0.x+1.0*u_blur_scale.x, v_texcoord0.y+1.0*u_blur_scale.y))*0.15;
|
||||||
|
color += texture2D(s_texColor, vec2(v_texcoord0.x+2.0*u_blur_scale.x, v_texcoord0.y+2.0*u_blur_scale.y))*0.12;
|
||||||
|
color += texture2D(s_texColor, vec2(v_texcoord0.x+3.0*u_blur_scale.x, v_texcoord0.y+3.0*u_blur_scale.y))*0.09;
|
||||||
|
color += texture2D(s_texColor, vec2(v_texcoord0.x+4.0*u_blur_scale.x, v_texcoord0.y+4.0*u_blur_scale.y))*0.05;
|
||||||
|
|
||||||
void main() {
|
gl_FragColor = color
|
||||||
vec4 color = texture2D(s_textureSampler, vec2(v_texcoord0.x-4.0*u_blur_scale.x, v_texcoord0.y-4.0*u_blur_scale.y))*0.05;
|
* vec4(u_compose_mult
|
||||||
color += texture2D(s_textureSampler, vec2(v_texcoord0.x-3.0*u_blur_scale.x, v_texcoord0.y-3.0*u_blur_scale.y))*0.09;
|
, u_compose_mult
|
||||||
color += texture2D(s_textureSampler, vec2(v_texcoord0.x-2.0*u_blur_scale.x, v_texcoord0.y-2.0*u_blur_scale.y))*0.12;
|
, u_compose_mult
|
||||||
color += texture2D(s_textureSampler, vec2(v_texcoord0.x-1.0*u_blur_scale.x, v_texcoord0.y-1.0*u_blur_scale.y))*0.15;
|
, u_compose_mult * u_compose_alpha
|
||||||
color += texture2D(s_textureSampler, vec2(v_texcoord0.x+0.0*u_blur_scale.x, v_texcoord0.y+0.0*u_blur_scale.y))*0.16;
|
);
|
||||||
color += texture2D(s_textureSampler, vec2(v_texcoord0.x+1.0*u_blur_scale.x, v_texcoord0.y+1.0*u_blur_scale.y))*0.15;
|
|
||||||
color += texture2D(s_textureSampler, vec2(v_texcoord0.x+2.0*u_blur_scale.x, v_texcoord0.y+2.0*u_blur_scale.y))*0.12;
|
|
||||||
color += texture2D(s_textureSampler, vec2(v_texcoord0.x+3.0*u_blur_scale.x, v_texcoord0.y+3.0*u_blur_scale.y))*0.09;
|
|
||||||
color += texture2D(s_textureSampler, vec2(v_texcoord0.x+4.0*u_blur_scale.x, v_texcoord0.y+4.0*u_blur_scale.y))*0.05;
|
|
||||||
|
|
||||||
gl_FragColor = color * vec4(u_compose_mult, u_compose_mult, u_compose_mult, u_compose_alpha*u_compose_mult);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,14 @@ $input v_color0, v_texcoord0
|
|||||||
|
|
||||||
#include <bgfx_shader.sh>
|
#include <bgfx_shader.sh>
|
||||||
|
|
||||||
SAMPLER2D(s_lineTexture, 0);
|
SAMPLER2D(s_texColor, 0);
|
||||||
|
|
||||||
uniform float u_compose_alpha;
|
uniform vec4 u_params;
|
||||||
|
#define u_blur_scale u_params.xy
|
||||||
|
#define u_compose_mult u_params.z
|
||||||
|
#define u_compose_alpha u_params.w
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
vec4 texColor = texture2D(s_lineTexture, v_texcoord0.xy);
|
vec4 texColor = texture2D(s_texColor, v_texcoord0.xy);
|
||||||
gl_FragColor = v_color0 * texColor * vec4(1.0, 1.0, 1.0, u_compose_alpha);
|
gl_FragColor = v_color0 * texColor * vec4(1.0, 1.0, 1.0, u_compose_alpha);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,16 +93,11 @@ void VectorDisplay::setup(uint16_t _width, uint16_t _height, int _view)
|
|||||||
m_view = _view;
|
m_view = _view;
|
||||||
|
|
||||||
m_drawToScreenShader = loadProgram("vs_vectordisplay_fb", "fs_vectordisplay_fb");
|
m_drawToScreenShader = loadProgram("vs_vectordisplay_fb", "fs_vectordisplay_fb");
|
||||||
u_compose_alpha = bgfx::createUniform("u_compose_alpha", bgfx::UniformType::Uniform1f);
|
m_blurShader = loadProgram("vs_vectordisplay_fb", "fs_vectordisplay_blur");
|
||||||
|
m_blitShader = loadProgram("vs_vectordisplay_fb", "fs_vectordisplay_blit");
|
||||||
|
|
||||||
m_blurShader = loadProgram("vs_vectordisplay_fb", "fs_vectordisplay_blur");
|
u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4);
|
||||||
u_blur_scale = bgfx::createUniform("u_blur_scale", bgfx::UniformType::Uniform2fv);
|
s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
|
||||||
u_compose_mult = bgfx::createUniform("u_compose_mult", bgfx::UniformType::Uniform1f);
|
|
||||||
|
|
||||||
m_blitShader = loadProgram("vs_vectordisplay_fb", "fs_vectordisplay_blit");
|
|
||||||
|
|
||||||
//generate uniforms for sampler
|
|
||||||
s_textureSampler = bgfx::createUniform("u_tex1", bgfx::UniformType::Uniform1iv);
|
|
||||||
|
|
||||||
genLinetex();
|
genLinetex();
|
||||||
|
|
||||||
@@ -131,17 +126,13 @@ void VectorDisplay::teardown()
|
|||||||
teardownResDependent();
|
teardownResDependent();
|
||||||
|
|
||||||
bgfx::destroyProgram(m_drawToScreenShader);
|
bgfx::destroyProgram(m_drawToScreenShader);
|
||||||
bgfx::destroyUniform(u_compose_alpha);
|
|
||||||
bgfx::destroyTexture(m_lineTexId);
|
|
||||||
bgfx::destroyUniform(s_lineTexture);
|
|
||||||
|
|
||||||
bgfx::destroyProgram(m_blurShader);
|
bgfx::destroyProgram(m_blurShader);
|
||||||
bgfx::destroyUniform(u_blur_scale);
|
|
||||||
bgfx::destroyUniform(u_compose_mult);
|
|
||||||
|
|
||||||
bgfx::destroyUniform(s_textureSampler);
|
|
||||||
|
|
||||||
bgfx::destroyProgram(m_blitShader);
|
bgfx::destroyProgram(m_blitShader);
|
||||||
|
|
||||||
|
bgfx::destroyUniform(u_params);
|
||||||
|
bgfx::destroyUniform(s_texColor);
|
||||||
|
|
||||||
|
bgfx::destroyTexture(m_lineTexId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VectorDisplay::beginFrame()
|
void VectorDisplay::beginFrame()
|
||||||
@@ -189,9 +180,10 @@ void VectorDisplay::endFrame()
|
|||||||
alpha = powf(m_decayValue, stepi - 1.0f) * m_initialDecay;
|
alpha = powf(m_decayValue, stepi - 1.0f) * m_initialDecay;
|
||||||
}
|
}
|
||||||
|
|
||||||
bgfx::setUniform(u_compose_alpha, &alpha);
|
float params[4] = { 0.0f, 0.0f, 0.0f, alpha };
|
||||||
|
bgfx::setUniform(u_params, ¶ms);
|
||||||
|
|
||||||
bgfx::setTexture(0, s_lineTexture, m_lineTexId);
|
bgfx::setTexture(0, s_texColor, m_lineTexId);
|
||||||
bgfx::setProgram(m_drawToScreenShader);
|
bgfx::setProgram(m_drawToScreenShader);
|
||||||
|
|
||||||
bgfx::setVertexBuffer(m_vertexBuffers[i], m_vertexBuffersSize[i]); // explicitly feed vertex number!
|
bgfx::setVertexBuffer(m_vertexBuffers[i], m_vertexBuffersSize[i]); // explicitly feed vertex number!
|
||||||
@@ -210,18 +202,17 @@ void VectorDisplay::endFrame()
|
|||||||
|
|
||||||
int viewCounter = m_view + 1;
|
int viewCounter = m_view + 1;
|
||||||
|
|
||||||
|
bx::mtxOrtho(proj, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 100.0f);
|
||||||
|
|
||||||
float glow_iter_mult = 1.05f + ( (m_brightness - 1.0f) / 5.0f);
|
float glow_iter_mult = 1.05f + ( (m_brightness - 1.0f) / 5.0f);
|
||||||
float glow_fin_mult = 1.25f + ( (m_brightness - 1.0f) / 2.0f);
|
float glow_fin_mult = 1.25f + ( (m_brightness - 1.0f) / 2.0f);
|
||||||
|
float params[4] = { 0.0f, 0.0f, glow_iter_mult, 1.0f };
|
||||||
bx::mtxOrtho(proj, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f, 100.0f);
|
|
||||||
|
|
||||||
if (m_brightness > 0)
|
if (m_brightness > 0)
|
||||||
{
|
{
|
||||||
float alpha = 1.0f;
|
bgfx::setUniform(u_params, params);
|
||||||
bgfx::setUniform(u_compose_alpha, &alpha);
|
|
||||||
bgfx::setUniform(u_compose_mult, &glow_iter_mult);
|
|
||||||
|
|
||||||
bgfx::setTexture(0, s_textureSampler, m_sceneFrameBuffer);
|
bgfx::setTexture(0, s_texColor, m_sceneFrameBuffer);
|
||||||
|
|
||||||
int npasses = (int)(m_brightness * 4);
|
int npasses = (int)(m_brightness * 4);
|
||||||
for (int pass = 0; pass < npasses; pass++)
|
for (int pass = 0; pass < npasses; pass++)
|
||||||
@@ -234,10 +225,9 @@ void VectorDisplay::endFrame()
|
|||||||
| BGFX_STATE_RGB_WRITE
|
| BGFX_STATE_RGB_WRITE
|
||||||
| BGFX_STATE_ALPHA_WRITE
|
| BGFX_STATE_ALPHA_WRITE
|
||||||
);
|
);
|
||||||
float scale[2];
|
params[0] = 1.0f / m_glowWidth;
|
||||||
scale[0] = 1.0f / m_glowWidth;
|
params[1] = 0.0f;
|
||||||
scale[1] = 0.0f;
|
bgfx::setUniform(u_params, ¶ms);
|
||||||
bgfx::setUniform(u_blur_scale, &scale);
|
|
||||||
bgfx::setProgram(m_blurShader);
|
bgfx::setProgram(m_blurShader);
|
||||||
|
|
||||||
bgfx::setViewTransform(viewCounter, NULL, proj);
|
bgfx::setViewTransform(viewCounter, NULL, proj);
|
||||||
@@ -249,17 +239,17 @@ void VectorDisplay::endFrame()
|
|||||||
|
|
||||||
bgfx::setViewFrameBuffer(viewCounter, m_glow1FrameBuffer); //second glow pass
|
bgfx::setViewFrameBuffer(viewCounter, m_glow1FrameBuffer); //second glow pass
|
||||||
bgfx::setViewRect(viewCounter, 0, 0, m_glowWidth, m_glowHeight);
|
bgfx::setViewRect(viewCounter, 0, 0, m_glowWidth, m_glowHeight);
|
||||||
bgfx::setTexture(0, s_textureSampler, m_glow0FrameBuffer);
|
bgfx::setTexture(0, s_texColor, m_glow0FrameBuffer);
|
||||||
bgfx::setProgram(m_blurShader);
|
bgfx::setProgram(m_blurShader);
|
||||||
|
|
||||||
bgfx::setViewTransform(viewCounter, NULL, proj);
|
bgfx::setViewTransform(viewCounter, NULL, proj);
|
||||||
screenSpaceQuad(m_glowWidth, m_glowHeight);
|
screenSpaceQuad(m_glowWidth, m_glowHeight);
|
||||||
|
|
||||||
bgfx::setUniform(u_compose_alpha, &alpha);
|
params[0] = 0.0f;
|
||||||
bgfx::setUniform(u_compose_mult, &glow_iter_mult);
|
params[1] = 1.0f / m_glowHeight;
|
||||||
scale[0] = 0.0f;
|
params[2] = glow_iter_mult;
|
||||||
scale[1] = 1.0f / m_glowHeight;
|
params[3] = 1.0f;
|
||||||
bgfx::setUniform(u_blur_scale, &scale);
|
bgfx::setUniform(u_params, params);
|
||||||
|
|
||||||
bgfx::setState(0
|
bgfx::setState(0
|
||||||
| BGFX_STATE_RGB_WRITE
|
| BGFX_STATE_RGB_WRITE
|
||||||
@@ -272,14 +262,14 @@ void VectorDisplay::endFrame()
|
|||||||
viewCounter++;
|
viewCounter++;
|
||||||
|
|
||||||
//set for next iteration
|
//set for next iteration
|
||||||
bgfx::setTexture(0, s_textureSampler, m_glow1FrameBuffer);
|
bgfx::setTexture(0, s_texColor, m_glow1FrameBuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//now do last pass, combination of blur and normal buffer to screen
|
//now do last pass, combination of blur and normal buffer to screen
|
||||||
bgfx::setViewTransform(viewCounter, NULL, proj);
|
bgfx::setViewTransform(viewCounter, NULL, proj);
|
||||||
bgfx::setViewRect(viewCounter, 0, 0, m_screenWidth, m_screenHeight);
|
bgfx::setViewRect(viewCounter, 0, 0, m_screenWidth, m_screenHeight);
|
||||||
bgfx::setTexture(0, s_textureSampler, m_sceneFrameBuffer);
|
bgfx::setTexture(0, s_texColor, m_sceneFrameBuffer);
|
||||||
bgfx::setProgram(m_blitShader);
|
bgfx::setProgram(m_blitShader);
|
||||||
bgfx::setState(0
|
bgfx::setState(0
|
||||||
| BGFX_STATE_RGB_WRITE
|
| BGFX_STATE_RGB_WRITE
|
||||||
@@ -287,9 +277,9 @@ void VectorDisplay::endFrame()
|
|||||||
| BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ONE)
|
| BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ONE)
|
||||||
);
|
);
|
||||||
|
|
||||||
float tempOne = 1.0f;
|
params[2] = 1.0f;
|
||||||
bgfx::setUniform(u_compose_alpha, &tempOne);
|
params[3] = 1.0f;
|
||||||
bgfx::setUniform(u_compose_mult, &tempOne);
|
bgfx::setUniform(u_params, params);
|
||||||
bgfx::setViewName(viewCounter, "BlendVectorToDisplay");
|
bgfx::setViewName(viewCounter, "BlendVectorToDisplay");
|
||||||
screenSpaceQuad(m_screenWidth, m_screenHeight);
|
screenSpaceQuad(m_screenWidth, m_screenHeight);
|
||||||
bgfx::submit(viewCounter);
|
bgfx::submit(viewCounter);
|
||||||
@@ -300,14 +290,16 @@ void VectorDisplay::endFrame()
|
|||||||
// blend in the glow
|
// blend in the glow
|
||||||
bgfx::setViewTransform(viewCounter, NULL, proj);
|
bgfx::setViewTransform(viewCounter, NULL, proj);
|
||||||
bgfx::setViewRect(viewCounter, 0, 0, m_screenWidth, m_screenHeight);
|
bgfx::setViewRect(viewCounter, 0, 0, m_screenWidth, m_screenHeight);
|
||||||
bgfx::setTexture(0, s_textureSampler, m_glow1FrameBuffer);
|
bgfx::setTexture(0, s_texColor, m_glow1FrameBuffer);
|
||||||
bgfx::setProgram(m_blitShader);
|
bgfx::setProgram(m_blitShader);
|
||||||
bgfx::setState(0
|
bgfx::setState(0
|
||||||
| BGFX_STATE_RGB_WRITE
|
| BGFX_STATE_RGB_WRITE
|
||||||
| BGFX_STATE_ALPHA_WRITE
|
| BGFX_STATE_ALPHA_WRITE
|
||||||
| BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ONE)
|
| BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_ONE, BGFX_STATE_BLEND_ONE)
|
||||||
);
|
);
|
||||||
bgfx::setUniform(u_compose_mult, &glow_fin_mult);
|
|
||||||
|
params[2] = glow_fin_mult;
|
||||||
|
bgfx::setUniform(u_params, params);
|
||||||
bgfx::setViewName(viewCounter, "BlendBlurToDisplay");
|
bgfx::setViewName(viewCounter, "BlendBlurToDisplay");
|
||||||
screenSpaceQuad(m_screenWidth, m_screenHeight);
|
screenSpaceQuad(m_screenWidth, m_screenHeight);
|
||||||
bgfx::submit(viewCounter);
|
bgfx::submit(viewCounter);
|
||||||
@@ -880,7 +872,6 @@ void VectorDisplay::genLinetex() // generate
|
|||||||
;
|
;
|
||||||
|
|
||||||
m_lineTexId = bgfx::createTexture2D(TEXTURE_SIZE, TEXTURE_SIZE, 1, bgfx::TextureFormat::BGRA8, flags, mem);
|
m_lineTexId = bgfx::createTexture2D(TEXTURE_SIZE, TEXTURE_SIZE, 1, bgfx::TextureFormat::BGRA8, flags, mem);
|
||||||
s_lineTexture = bgfx::createUniform("s_lineTexture", bgfx::UniformType::Uniform1iv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const int8_t simplex[95][112] =
|
static const int8_t simplex[95][112] =
|
||||||
|
|||||||
@@ -150,20 +150,16 @@ protected:
|
|||||||
bool m_originBottomLeft;
|
bool m_originBottomLeft;
|
||||||
float m_texelHalf;
|
float m_texelHalf;
|
||||||
|
|
||||||
bgfx::ProgramHandle m_drawToScreenShader; // program for drawing to the framebuffer
|
bgfx::ProgramHandle m_drawToScreenShader; // program for drawing to the framebuffer
|
||||||
bgfx::UniformHandle u_compose_alpha;
|
bgfx::ProgramHandle m_blurShader; // program for gaussian blur
|
||||||
|
|
||||||
bgfx::FrameBufferHandle m_sceneFrameBuffer;
|
|
||||||
|
|
||||||
bgfx::ProgramHandle m_blurShader; // program for gaussian blur
|
|
||||||
bgfx::UniformHandle u_blur_scale;
|
|
||||||
bgfx::UniformHandle u_compose_mult;
|
|
||||||
bgfx::UniformHandle s_textureSampler; //texture handle for blur
|
|
||||||
|
|
||||||
bgfx::ProgramHandle m_blitShader;
|
bgfx::ProgramHandle m_blitShader;
|
||||||
|
|
||||||
bgfx::FrameBufferHandle m_glow0FrameBuffer; // framebuffer for glow pass 0
|
bgfx::UniformHandle u_params;
|
||||||
bgfx::FrameBufferHandle m_glow1FrameBuffer; // framebuffer for glow pass 1
|
bgfx::UniformHandle s_texColor;
|
||||||
|
|
||||||
|
bgfx::FrameBufferHandle m_sceneFrameBuffer;
|
||||||
|
bgfx::FrameBufferHandle m_glow0FrameBuffer; // framebuffer for glow pass 0
|
||||||
|
bgfx::FrameBufferHandle m_glow1FrameBuffer; // framebuffer for glow pass 1
|
||||||
|
|
||||||
int m_view;
|
int m_view;
|
||||||
|
|
||||||
@@ -182,7 +178,6 @@ protected:
|
|||||||
stl::vector<int> m_vertexBuffersSize;
|
stl::vector<int> m_vertexBuffersSize;
|
||||||
|
|
||||||
bgfx::TextureHandle m_lineTexId;
|
bgfx::TextureHandle m_lineTexId;
|
||||||
bgfx::UniformHandle s_lineTexture;
|
|
||||||
|
|
||||||
float m_initialDecay;
|
float m_initialDecay;
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||||||
bgfx::DynamicVertexBufferHandle prevPositionBuffer0 = bgfx::createDynamicVertexBuffer(1 << 15, computeVertexDecl, BGFX_BUFFER_COMPUTE_READ_WRITE);
|
bgfx::DynamicVertexBufferHandle prevPositionBuffer0 = bgfx::createDynamicVertexBuffer(1 << 15, computeVertexDecl, BGFX_BUFFER_COMPUTE_READ_WRITE);
|
||||||
bgfx::DynamicVertexBufferHandle prevPositionBuffer1 = bgfx::createDynamicVertexBuffer(1 << 15, computeVertexDecl, BGFX_BUFFER_COMPUTE_READ_WRITE);
|
bgfx::DynamicVertexBufferHandle prevPositionBuffer1 = bgfx::createDynamicVertexBuffer(1 << 15, computeVertexDecl, BGFX_BUFFER_COMPUTE_READ_WRITE);
|
||||||
|
|
||||||
bgfx::UniformHandle u_params = bgfx::createUniform("u_params", bgfx::UniformType::Uniform4fv, 3);
|
bgfx::UniformHandle u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4, 3);
|
||||||
|
|
||||||
bgfx::ProgramHandle initInstancesProgram = bgfx::createProgram(loadShader("cs_init_instances"), true);
|
bgfx::ProgramHandle initInstancesProgram = bgfx::createProgram(loadShader("cs_init_instances"), true);
|
||||||
bgfx::ProgramHandle updateInstancesProgram = bgfx::createProgram(loadShader("cs_update_instances"), true);
|
bgfx::ProgramHandle updateInstancesProgram = bgfx::createProgram(loadShader("cs_update_instances"), true);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
static const uint8_t fs_font_basic_glsl[553] =
|
static const uint8_t fs_font_basic_glsl[553] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x74, 0x65, 0x78, // FSH........u_tex
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x74, 0x65, 0x78, // FSH........u_tex
|
||||||
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x09, 0x02, 0x00, 0x00, 0x76, // Color..........v
|
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x09, 0x02, 0x00, 0x00, 0x76, // Color..........v
|
||||||
0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec
|
0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec
|
||||||
0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary
|
0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary
|
||||||
@@ -38,7 +38,7 @@ static const uint8_t fs_font_basic_glsl[553] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_font_basic_dx9[445] =
|
static const uint8_t fs_font_basic_dx9[445] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x03, 0xff, 0xff, // FSH.............
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x03, 0xff, 0xff, // FSH.............
|
||||||
0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, // ..".CTAB....S...
|
0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, // ..".CTAB....S...
|
||||||
0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
||||||
0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // L...0...........
|
0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // L...0...........
|
||||||
@@ -69,7 +69,7 @@ static const uint8_t fs_font_basic_dx9[445] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_font_basic_dx11[600] =
|
static const uint8_t fs_font_basic_dx11[600] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x48, 0x02, 0x44, 0x58, 0x42, 0x43, // FSH.......H.DXBC
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x48, 0x02, 0x44, 0x58, 0x42, 0x43, // FSH.......H.DXBC
|
||||||
0xdb, 0x69, 0x11, 0xe0, 0xc0, 0xf9, 0x23, 0x5b, 0x4d, 0x65, 0x8f, 0xa1, 0x99, 0x34, 0xff, 0x76, // .i....#[Me...4.v
|
0xdb, 0x69, 0x11, 0xe0, 0xc0, 0xf9, 0x23, 0x5b, 0x4d, 0x65, 0x8f, 0xa1, 0x99, 0x34, 0xff, 0x76, // .i....#[Me...4.v
|
||||||
0x01, 0x00, 0x00, 0x00, 0x48, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ....H.......,...
|
0x01, 0x00, 0x00, 0x00, 0x48, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ....H.......,...
|
||||||
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
static const uint8_t fs_font_distance_field_glsl[1019] =
|
static const uint8_t fs_font_distance_field_glsl[1019] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x74, 0x65, 0x78, // FSH........u_tex
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x74, 0x65, 0x78, // FSH........u_tex
|
||||||
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xdb, 0x03, 0x00, 0x00, 0x76, // Color..........v
|
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xdb, 0x03, 0x00, 0x00, 0x76, // Color..........v
|
||||||
0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec
|
0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec
|
||||||
0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary
|
0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary
|
||||||
@@ -67,7 +67,7 @@ static const uint8_t fs_font_distance_field_glsl[1019] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_font_distance_field_dx9[737] =
|
static const uint8_t fs_font_distance_field_dx9[737] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xd4, 0x02, 0x00, 0x03, 0xff, 0xff, // FSH.............
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xd4, 0x02, 0x00, 0x03, 0xff, 0xff, // FSH.............
|
||||||
0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, // ..".CTAB....S...
|
0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, // ..".CTAB....S...
|
||||||
0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
||||||
0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // L...0...........
|
0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // L...0...........
|
||||||
@@ -117,7 +117,7 @@ static const uint8_t fs_font_distance_field_dx9[737] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_font_distance_field_dx11[1036] =
|
static const uint8_t fs_font_distance_field_dx11[1036] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xfc, 0x03, 0x44, 0x58, 0x42, 0x43, // FSH.........DXBC
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xfc, 0x03, 0x44, 0x58, 0x42, 0x43, // FSH.........DXBC
|
||||||
0x9a, 0xd6, 0x47, 0xb1, 0x98, 0xc8, 0x0f, 0x79, 0xab, 0x0a, 0x57, 0x47, 0xee, 0xac, 0xc0, 0xfe, // ..G....y..WG....
|
0x9a, 0xd6, 0x47, 0xb1, 0x98, 0xc8, 0x0f, 0x79, 0xab, 0x0a, 0x57, 0x47, 0xee, 0xac, 0xc0, 0xfe, // ..G....y..WG....
|
||||||
0x01, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
0x01, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
||||||
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
static const uint8_t fs_font_distance_field_subpixel_glsl[1268] =
|
static const uint8_t fs_font_distance_field_subpixel_glsl[1268] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x74, 0x65, 0x78, // FSH........u_tex
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x74, 0x65, 0x78, // FSH........u_tex
|
||||||
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd4, 0x04, 0x00, 0x00, 0x76, // Color..........v
|
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd4, 0x04, 0x00, 0x00, 0x76, // Color..........v
|
||||||
0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec
|
0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec
|
||||||
0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary
|
0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary
|
||||||
@@ -83,7 +83,7 @@ static const uint8_t fs_font_distance_field_subpixel_glsl[1268] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_font_distance_field_subpixel_dx9[885] =
|
static const uint8_t fs_font_distance_field_subpixel_dx9[885] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x68, 0x03, 0x00, 0x03, 0xff, 0xff, // FSH.......h.....
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x68, 0x03, 0x00, 0x03, 0xff, 0xff, // FSH.......h.....
|
||||||
0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, // ..".CTAB....S...
|
0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, // ..".CTAB....S...
|
||||||
0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
||||||
0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // L...0...........
|
0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // L...0...........
|
||||||
@@ -142,7 +142,7 @@ static const uint8_t fs_font_distance_field_subpixel_dx9[885] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_font_distance_field_subpixel_dx11[1288] =
|
static const uint8_t fs_font_distance_field_subpixel_dx11[1288] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xf8, 0x04, 0x44, 0x58, 0x42, 0x43, // FSH.........DXBC
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xf8, 0x04, 0x44, 0x58, 0x42, 0x43, // FSH.........DXBC
|
||||||
0x72, 0x17, 0x00, 0xad, 0x3a, 0xed, 0x4a, 0x16, 0x14, 0x58, 0xdb, 0x06, 0xdf, 0x01, 0x0f, 0x39, // r...:.J..X.....9
|
0x72, 0x17, 0x00, 0xad, 0x3a, 0xed, 0x4a, 0x16, 0x14, 0x58, 0xdb, 0x06, 0xdf, 0x01, 0x0f, 0x39, // r...:.J..X.....9
|
||||||
0x01, 0x00, 0x00, 0x00, 0xf8, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
0x01, 0x00, 0x00, 0x00, 0xf8, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
||||||
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
||||||
|
|||||||
@@ -619,7 +619,7 @@ TextBufferManager::TextBufferManager(FontManager* _fontManager)
|
|||||||
.add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true)
|
.add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true)
|
||||||
.end();
|
.end();
|
||||||
|
|
||||||
u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Uniform1iv);
|
u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Int1);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextBufferManager::~TextBufferManager()
|
TextBufferManager::~TextBufferManager()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t vs_font_basic_glsl[431] =
|
static const uint8_t vs_font_basic_glsl[431] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
||||||
0x8a, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi
|
0x8a, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi
|
||||||
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color
|
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color
|
||||||
0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig
|
0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig
|
||||||
@@ -30,8 +30,8 @@ static const uint8_t vs_font_basic_glsl[431] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_font_basic_dx9[335] =
|
static const uint8_t vs_font_basic_dx9[335] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB..
|
0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB..
|
||||||
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
||||||
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
||||||
@@ -54,8 +54,8 @@ static const uint8_t vs_font_basic_dx9[335] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_font_basic_dx11[580] =
|
static const uint8_t vs_font_basic_dx11[580] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0x18, 0x02, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, 0x48, 0x51, // ..DXBC.].....:HQ
|
0x18, 0x02, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, 0x48, 0x51, // ..DXBC.].....:HQ
|
||||||
0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, // ...i.f..........
|
0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, // ...i.f..........
|
||||||
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,...........IS
|
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,...........IS
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t vs_font_distance_field_glsl[431] =
|
static const uint8_t vs_font_distance_field_glsl[431] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
||||||
0x8a, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi
|
0x8a, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi
|
||||||
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color
|
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color
|
||||||
0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig
|
0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig
|
||||||
@@ -30,8 +30,8 @@ static const uint8_t vs_font_distance_field_glsl[431] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_font_distance_field_dx9[335] =
|
static const uint8_t vs_font_distance_field_dx9[335] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB..
|
0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB..
|
||||||
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
||||||
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
||||||
@@ -54,8 +54,8 @@ static const uint8_t vs_font_distance_field_dx9[335] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_font_distance_field_dx11[580] =
|
static const uint8_t vs_font_distance_field_dx11[580] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0x18, 0x02, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, 0x48, 0x51, // ..DXBC.].....:HQ
|
0x18, 0x02, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, 0x48, 0x51, // ..DXBC.].....:HQ
|
||||||
0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, // ...i.f..........
|
0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, // ...i.f..........
|
||||||
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,...........IS
|
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,...........IS
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t vs_font_distance_field_subpixel_glsl[431] =
|
static const uint8_t vs_font_distance_field_subpixel_glsl[431] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
||||||
0x8a, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi
|
0x8a, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi
|
||||||
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color
|
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color
|
||||||
0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig
|
0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig
|
||||||
@@ -30,8 +30,8 @@ static const uint8_t vs_font_distance_field_subpixel_glsl[431] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_font_distance_field_subpixel_dx9[335] =
|
static const uint8_t vs_font_distance_field_subpixel_dx9[335] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB..
|
0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB..
|
||||||
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
||||||
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
||||||
@@ -54,8 +54,8 @@ static const uint8_t vs_font_distance_field_subpixel_dx9[335] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_font_distance_field_subpixel_dx11[580] =
|
static const uint8_t vs_font_distance_field_subpixel_dx11[580] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0x18, 0x02, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, 0x48, 0x51, // ..DXBC.].....:HQ
|
0x18, 0x02, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, 0x48, 0x51, // ..DXBC.].....:HQ
|
||||||
0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, // ...i.f..........
|
0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, // ...i.f..........
|
||||||
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,...........IS
|
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,...........IS
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
static const uint8_t fs_imgui_color_glsl[89] =
|
static const uint8_t fs_imgui_color_glsl[89] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I..J...va
|
0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I..J...va
|
||||||
0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4
|
0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4
|
||||||
0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // v_color0;.void
|
0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // v_color0;.void
|
||||||
0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // main ().{. gl_F
|
0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // main ().{. gl_F
|
||||||
@@ -9,7 +9,7 @@ static const uint8_t fs_imgui_color_glsl[89] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_color_dx9[137] =
|
static const uint8_t fs_imgui_color_dx9[137] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I..|.....
|
0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I..|.....
|
||||||
0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#...
|
0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#...
|
||||||
0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
||||||
0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
|
0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
|
||||||
@@ -21,7 +21,7 @@ static const uint8_t fs_imgui_color_dx9[137] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_color_dx11[260] =
|
static const uint8_t fs_imgui_color_dx11[260] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xf4, 0x00, 0x44, 0x58, 0x42, 0x43, // FSH....I....DXBC
|
0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xf4, 0x00, 0x44, 0x58, 0x42, 0x43, // FSH....I....DXBC
|
||||||
0xa6, 0x7f, 0x08, 0xe2, 0x95, 0xbd, 0x5f, 0xa3, 0x3f, 0x5b, 0x58, 0x8e, 0x54, 0x0f, 0x89, 0x67, // ......_.?[X.T..g
|
0xa6, 0x7f, 0x08, 0xe2, 0x95, 0xbd, 0x5f, 0xa3, 0x3f, 0x5b, 0x58, 0x8e, 0x54, 0x0f, 0x89, 0x67, // ......_.?[X.T..g
|
||||||
0x01, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
0x01, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
||||||
0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // ........ISGNL...
|
0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // ........ISGNL...
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t fs_imgui_cubemap_glsl[363] =
|
static const uint8_t fs_imgui_cubemap_glsl[363] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xe3, 0xc2, 0x5c, 0x65, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima
|
0x46, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x07, 0x01, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor...
|
0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor...
|
||||||
0x00, 0x01, 0x00, 0x33, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...3...varying h
|
0x00, 0x01, 0x00, 0x33, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...3...varying h
|
||||||
0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, // ighp vec3 v_norm
|
0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, // ighp vec3 v_norm
|
||||||
@@ -26,8 +26,8 @@ static const uint8_t fs_imgui_cubemap_glsl[363] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_cubemap_dx9[373] =
|
static const uint8_t fs_imgui_cubemap_dx9[373] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima
|
0x46, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x17, 0x01, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0x50, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, 0x42, // ..P.......0.CTAB
|
0x01, 0x00, 0x50, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, 0x42, // ..P.......0.CTAB
|
||||||
0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, // ................
|
0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, // ................
|
||||||
0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, // ............D...
|
0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, // ............D...
|
||||||
@@ -53,8 +53,8 @@ static const uint8_t fs_imgui_cubemap_dx9[373] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_cubemap_dx11[424] =
|
static const uint8_t fs_imgui_cubemap_dx11[424] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima
|
0x46, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x17, 0x00, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x00, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0x80, 0x01, 0x44, 0x58, 0x42, 0x43, 0x3a, 0x0c, 0x3f, 0xee, 0x22, 0x31, 0x60, 0x3f, // ....DXBC:.?."1`?
|
0x01, 0x00, 0x80, 0x01, 0x44, 0x58, 0x42, 0x43, 0x3a, 0x0c, 0x3f, 0xee, 0x22, 0x31, 0x60, 0x3f, // ....DXBC:.?."1`?
|
||||||
0x80, 0x4a, 0x2e, 0x3f, 0xcb, 0x18, 0x1c, 0x94, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, // .J.?............
|
0x80, 0x4a, 0x2e, 0x3f, 0xcb, 0x18, 0x1c, 0x94, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, // .J.?............
|
||||||
0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, // ....,...........
|
0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, // ....,...........
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t fs_imgui_image_glsl[360] =
|
static const uint8_t fs_imgui_image_glsl[360] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x07, 0x01, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor...
|
0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor...
|
||||||
0x00, 0x01, 0x00, 0x30, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...0...varying h
|
0x00, 0x01, 0x00, 0x30, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...0...varying h
|
||||||
0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec2 v_texc
|
0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec2 v_texc
|
||||||
@@ -26,8 +26,8 @@ static const uint8_t fs_imgui_image_glsl[360] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_image_dx9[377] =
|
static const uint8_t fs_imgui_image_dx9[377] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x17, 0x01, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0x54, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, 0x42, // ..T.......0.CTAB
|
0x01, 0x00, 0x54, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, 0x42, // ..T.......0.CTAB
|
||||||
0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, // ................
|
0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, // ................
|
||||||
0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, // ............D...
|
0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, // ............D...
|
||||||
@@ -53,8 +53,8 @@ static const uint8_t fs_imgui_image_dx9[377] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_image_dx11[428] =
|
static const uint8_t fs_imgui_image_dx11[428] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x17, 0x00, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x00, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0x84, 0x01, 0x44, 0x58, 0x42, 0x43, 0x60, 0x83, 0xa2, 0x5c, 0x77, 0x3d, 0xcc, 0x9b, // ....DXBC`...w=..
|
0x01, 0x00, 0x84, 0x01, 0x44, 0x58, 0x42, 0x43, 0x60, 0x83, 0xa2, 0x5c, 0x77, 0x3d, 0xcc, 0x9b, // ....DXBC`...w=..
|
||||||
0xb9, 0x73, 0xdf, 0x41, 0x6b, 0x18, 0x8f, 0x0e, 0x01, 0x00, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, // .s.Ak...........
|
0xb9, 0x73, 0xdf, 0x41, 0x6b, 0x18, 0x8f, 0x0e, 0x01, 0x00, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, // .s.Ak...........
|
||||||
0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, // ....,...........
|
0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, // ....,...........
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
static const uint8_t fs_imgui_image_swizz_glsl[425] =
|
static const uint8_t fs_imgui_image_swizz_glsl[425] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x03, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x03, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x07, 0x01, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x07, 0x01, 0x00, 0x00, // ...u_swizzle....
|
0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x02, 0x01, 0x00, 0x00, // ...u_swizzle....
|
||||||
0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor...
|
0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor...
|
||||||
0x00, 0x01, 0x00, 0x61, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...a...varying h
|
0x00, 0x01, 0x00, 0x61, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...a...varying h
|
||||||
0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec2 v_texc
|
0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec2 v_texc
|
||||||
@@ -30,9 +30,9 @@ static const uint8_t fs_imgui_image_swizz_glsl[425] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_image_swizz_dx9[441] =
|
static const uint8_t fs_imgui_image_swizz_dx9[441] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x17, 0x01, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x17, 0x01, 0x01, 0x00, // ...u_swizzle....
|
0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x12, 0x01, 0x01, 0x00, // ...u_swizzle....
|
||||||
0x01, 0x00, 0x84, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x38, 0x00, 0x43, 0x54, 0x41, 0x42, // ..........8.CTAB
|
0x01, 0x00, 0x84, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x38, 0x00, 0x43, 0x54, 0x41, 0x42, // ..........8.CTAB
|
||||||
0x1c, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, // ................
|
0x1c, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, // ................
|
||||||
0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, // ............X...
|
0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, // ............X...
|
||||||
@@ -61,9 +61,9 @@ static const uint8_t fs_imgui_image_swizz_dx9[441] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_image_swizz_dx11[476] =
|
static const uint8_t fs_imgui_image_swizz_dx11[476] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x17, 0x00, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x00, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x17, 0x00, 0x10, 0x00, // ...u_swizzle....
|
0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x12, 0x00, 0x10, 0x00, // ...u_swizzle....
|
||||||
0x01, 0x00, 0xa4, 0x01, 0x44, 0x58, 0x42, 0x43, 0x82, 0x53, 0x75, 0xc2, 0x4f, 0x7e, 0x06, 0x0a, // ....DXBC.Su.O~..
|
0x01, 0x00, 0xa4, 0x01, 0x44, 0x58, 0x42, 0x43, 0x82, 0x53, 0x75, 0xc2, 0x4f, 0x7e, 0x06, 0x0a, // ....DXBC.Su.O~..
|
||||||
0x49, 0x27, 0x42, 0x29, 0x01, 0x0a, 0x6a, 0x92, 0x01, 0x00, 0x00, 0x00, 0xa4, 0x01, 0x00, 0x00, // I'B)..j.........
|
0x49, 0x27, 0x42, 0x29, 0x01, 0x0a, 0x6a, 0x92, 0x01, 0x00, 0x00, 0x00, 0xa4, 0x01, 0x00, 0x00, // I'B)..j.........
|
||||||
0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, // ....,...........
|
0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, // ....,...........
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t fs_imgui_latlong_glsl[651] =
|
static const uint8_t fs_imgui_latlong_glsl[651] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x07, 0x01, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor...
|
0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor...
|
||||||
0x00, 0x01, 0x00, 0x53, 0x02, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...S...varying h
|
0x00, 0x01, 0x00, 0x53, 0x02, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...S...varying h
|
||||||
0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec2 v_texc
|
0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec2 v_texc
|
||||||
@@ -44,8 +44,8 @@ static const uint8_t fs_imgui_latlong_glsl[651] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_latlong_dx9[537] =
|
static const uint8_t fs_imgui_latlong_dx9[537] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x17, 0x01, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0xf4, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, 0x42, // ..........0.CTAB
|
0x01, 0x00, 0xf4, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, 0x42, // ..........0.CTAB
|
||||||
0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, // ................
|
0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, // ................
|
||||||
0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, // ............D...
|
0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, // ............D...
|
||||||
@@ -81,8 +81,8 @@ static const uint8_t fs_imgui_latlong_dx9[537] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_latlong_dx11[600] =
|
static const uint8_t fs_imgui_latlong_dx11[600] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima
|
||||||
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x17, 0x00, 0x00, 0x00, // geLodEnabled....
|
0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x00, 0x00, 0x00, // geLodEnabled....
|
||||||
0x01, 0x00, 0x30, 0x02, 0x44, 0x58, 0x42, 0x43, 0x8e, 0x4b, 0x65, 0x9b, 0x2e, 0xce, 0x92, 0x33, // ..0.DXBC.Ke....3
|
0x01, 0x00, 0x30, 0x02, 0x44, 0x58, 0x42, 0x43, 0x8e, 0x4b, 0x65, 0x9b, 0x2e, 0xce, 0x92, 0x33, // ..0.DXBC.Ke....3
|
||||||
0xf0, 0xfb, 0x9d, 0x50, 0x09, 0x30, 0x0b, 0xf1, 0x01, 0x00, 0x00, 0x00, 0x30, 0x02, 0x00, 0x00, // ...P.0......0...
|
0xf0, 0xfb, 0x9d, 0x50, 0x09, 0x30, 0x0b, 0xf1, 0x01, 0x00, 0x00, 0x00, 0x30, 0x02, 0x00, 0x00, // ...P.0......0...
|
||||||
0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, // ....,...........
|
0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, // ....,...........
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
static const uint8_t fs_imgui_texture_glsl[290] =
|
static const uint8_t fs_imgui_texture_glsl[290] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex
|
||||||
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x02, 0x01, 0x00, 0x00, 0x76, // Color..........v
|
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x02, 0x01, 0x00, 0x00, 0x76, // Color..........v
|
||||||
0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec
|
0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec
|
||||||
0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary
|
0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary
|
||||||
@@ -22,7 +22,7 @@ static const uint8_t fs_imgui_texture_glsl[290] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_texture_dx9[241] =
|
static const uint8_t fs_imgui_texture_dx9[241] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH.............
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH.............
|
||||||
0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, // ..".CTAB....S...
|
0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, // ..".CTAB....S...
|
||||||
0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
||||||
0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // L...0...........
|
0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // L...0...........
|
||||||
@@ -41,7 +41,7 @@ static const uint8_t fs_imgui_texture_dx9[241] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_imgui_texture_dx11[404] =
|
static const uint8_t fs_imgui_texture_dx11[404] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x84, 0x01, 0x44, 0x58, 0x42, 0x43, // FSH.........DXBC
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x84, 0x01, 0x44, 0x58, 0x42, 0x43, // FSH.........DXBC
|
||||||
0x57, 0x7b, 0x79, 0x39, 0xfb, 0xd2, 0x84, 0x36, 0x53, 0xeb, 0x9a, 0xf9, 0x9e, 0xa5, 0xf8, 0xb1, // W{y9...6S.......
|
0x57, 0x7b, 0x79, 0x39, 0xfb, 0xd2, 0x84, 0x36, 0x53, 0xeb, 0x9a, 0xf9, 0x9e, 0xa5, 0xf8, 0xb1, // W{y9...6S.......
|
||||||
0x01, 0x00, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
0x01, 0x00, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
||||||
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
static const uint8_t fs_ocornut_imgui_glsl[238] =
|
static const uint8_t fs_ocornut_imgui_glsl[238] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex
|
||||||
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd3, 0x00, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, // ..........varyin
|
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd3, 0x00, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, // ..........varyin
|
||||||
0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, // g highp vec4 v_c
|
0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, // g highp vec4 v_c
|
||||||
0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // olor0;.varying h
|
0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // olor0;.varying h
|
||||||
@@ -18,7 +18,7 @@ static const uint8_t fs_ocornut_imgui_glsl[238] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_ocornut_imgui_dx9[225] =
|
static const uint8_t fs_ocornut_imgui_dx9[225] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH.............
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH.............
|
||||||
0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, // ..!.CTAB....O...
|
0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, // ..!.CTAB....O...
|
||||||
0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
||||||
0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // H...0...........
|
0x48, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // H...0...........
|
||||||
@@ -36,7 +36,7 @@ static const uint8_t fs_ocornut_imgui_dx9[225] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_ocornut_imgui_dx11[384] =
|
static const uint8_t fs_ocornut_imgui_dx11[384] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x70, 0x01, 0x44, 0x58, 0x42, 0x43, // FSH.......p.DXBC
|
0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x70, 0x01, 0x44, 0x58, 0x42, 0x43, // FSH.......p.DXBC
|
||||||
0xbe, 0x78, 0xe7, 0xa5, 0x19, 0x0c, 0x70, 0xeb, 0x4c, 0xb1, 0xac, 0x1f, 0x16, 0x84, 0xe9, 0x97, // .x....p.L.......
|
0xbe, 0x78, 0xe7, 0xa5, 0x19, 0x0c, 0x70, 0xeb, 0x4c, 0xb1, 0xac, 0x1f, 0x16, 0x84, 0xe9, 0x97, // .x....p.L.......
|
||||||
0x01, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ....p.......,...
|
0x01, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ....p.......,...
|
||||||
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl...
|
||||||
|
|||||||
@@ -486,9 +486,9 @@ struct Imgui
|
|||||||
PosUvVertex::init();
|
PosUvVertex::init();
|
||||||
PosNormalVertex::init();
|
PosNormalVertex::init();
|
||||||
|
|
||||||
u_imageLodEnabled = bgfx::createUniform("u_imageLodEnabled", bgfx::UniformType::Uniform4fv);
|
u_imageLodEnabled = bgfx::createUniform("u_imageLodEnabled", bgfx::UniformType::Vec4);
|
||||||
u_imageSwizzle = bgfx::createUniform("u_swizzle", bgfx::UniformType::Uniform4fv);
|
u_imageSwizzle = bgfx::createUniform("u_swizzle", bgfx::UniformType::Vec4);
|
||||||
s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Uniform1i);
|
s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
|
||||||
|
|
||||||
const bgfx::Memory* vs_imgui_color;
|
const bgfx::Memory* vs_imgui_color;
|
||||||
const bgfx::Memory* fs_imgui_color;
|
const bgfx::Memory* fs_imgui_color;
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ struct OcornutImguiContext
|
|||||||
.add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true)
|
.add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true)
|
||||||
.end();
|
.end();
|
||||||
|
|
||||||
s_tex = bgfx::createUniform("s_tex", bgfx::UniformType::Uniform1i);
|
s_tex = bgfx::createUniform("s_tex", bgfx::UniformType::Int1);
|
||||||
|
|
||||||
uint8_t* data;
|
uint8_t* data;
|
||||||
int32_t width;
|
int32_t width;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t vs_imgui_color_glsl[324] =
|
static const uint8_t vs_imgui_color_glsl[324] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie
|
0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie
|
||||||
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x01, 0x00, 0x24, 0x01, 0x00, 0x00, 0x61, // wProj......$...a
|
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x24, 0x01, 0x00, 0x00, 0x61, // wProj......$...a
|
||||||
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v
|
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v
|
||||||
0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, // ec4 a_color0;.at
|
0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, // ec4 a_color0;.at
|
||||||
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // tribute highp ve
|
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // tribute highp ve
|
||||||
@@ -24,8 +24,8 @@ static const uint8_t vs_imgui_color_glsl[324] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_imgui_color_dx9[290] =
|
static const uint8_t vs_imgui_color_dx9[290] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie
|
0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie
|
||||||
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0x00, 0x03, 0xfe, // wProj...........
|
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0x00, 0x03, 0xfe, // wProj...........
|
||||||
0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S..
|
0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S..
|
||||||
0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................
|
0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................
|
||||||
0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0..........
|
0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0..........
|
||||||
@@ -46,8 +46,8 @@ static const uint8_t vs_imgui_color_dx9[290] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_imgui_color_dx11[465] =
|
static const uint8_t vs_imgui_color_dx11[465] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie
|
0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie
|
||||||
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0xac, 0x01, 0x44, 0x58, 0x42, // wProj........DXB
|
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0xac, 0x01, 0x44, 0x58, 0x42, // wProj........DXB
|
||||||
0x43, 0xbc, 0xb2, 0x28, 0xa7, 0xd2, 0xab, 0xc3, 0x2f, 0xa4, 0xe4, 0xbc, 0x67, 0xff, 0xa4, 0xcf, // C..(..../...g...
|
0x43, 0xbc, 0xb2, 0x28, 0xa7, 0xd2, 0xab, 0xc3, 0x2f, 0xa4, 0xe4, 0xbc, 0x67, 0xff, 0xa4, 0xcf, // C..(..../...g...
|
||||||
0x66, 0x01, 0x00, 0x00, 0x00, 0xac, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // f............,..
|
0x66, 0x01, 0x00, 0x00, 0x00, 0xac, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // f............,..
|
||||||
0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x48, 0x00, 0x00, // .|.......ISGNH..
|
0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x48, 0x00, 0x00, // .|.......ISGNH..
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t vs_imgui_cubemap_glsl[329] =
|
static const uint8_t vs_imgui_cubemap_glsl[329] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod
|
0x56, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
||||||
0x24, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // $...attribute hi
|
0x24, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // $...attribute hi
|
||||||
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, // ghp vec4 a_norma
|
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, // ghp vec4 a_norma
|
||||||
0x6c, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // l;.attribute hig
|
0x6c, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // l;.attribute hig
|
||||||
@@ -24,8 +24,8 @@ static const uint8_t vs_imgui_cubemap_glsl[329] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_imgui_cubemap_dx9[319] =
|
static const uint8_t vs_imgui_cubemap_dx9[319] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod
|
0x56, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB..
|
0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB..
|
||||||
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
||||||
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
||||||
@@ -47,8 +47,8 @@ static const uint8_t vs_imgui_cubemap_dx9[319] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_imgui_cubemap_dx11[510] =
|
static const uint8_t vs_imgui_cubemap_dx11[510] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod
|
0x56, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0xd4, 0x01, 0x44, 0x58, 0x42, 0x43, 0x6e, 0xf2, 0xe5, 0x72, 0xab, 0xb8, 0x0f, 0x91, 0xad, 0x8f, // ..DXBCn..r......
|
0xd4, 0x01, 0x44, 0x58, 0x42, 0x43, 0x6e, 0xf2, 0xe5, 0x72, 0xab, 0xb8, 0x0f, 0x91, 0xad, 0x8f, // ..DXBCn..r......
|
||||||
0x4c, 0xdf, 0x0e, 0x04, 0x3e, 0x81, 0x01, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x03, 0x00, // L...>...........
|
0x4c, 0xdf, 0x0e, 0x04, 0x3e, 0x81, 0x01, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x03, 0x00, // L...>...........
|
||||||
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...|.......IS
|
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...|.......IS
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t vs_imgui_image_glsl[336] =
|
static const uint8_t vs_imgui_image_glsl[336] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie
|
0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie
|
||||||
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x01, 0x00, 0x30, 0x01, 0x00, 0x00, 0x61, // wProj......0...a
|
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x30, 0x01, 0x00, 0x00, 0x61, // wProj......0...a
|
||||||
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v
|
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v
|
||||||
0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, // ec3 a_position;.
|
0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, // ec3 a_position;.
|
||||||
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // attribute highp
|
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // attribute highp
|
||||||
@@ -24,8 +24,8 @@ static const uint8_t vs_imgui_image_glsl[336] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_imgui_image_dx9[290] =
|
static const uint8_t vs_imgui_image_dx9[290] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie
|
0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie
|
||||||
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0x00, 0x03, 0xfe, // wProj...........
|
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0x00, 0x03, 0xfe, // wProj...........
|
||||||
0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S..
|
0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S..
|
||||||
0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................
|
0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................
|
||||||
0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0..........
|
0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0..........
|
||||||
@@ -46,8 +46,8 @@ static const uint8_t vs_imgui_image_dx9[290] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_imgui_image_dx11[473] =
|
static const uint8_t vs_imgui_image_dx11[473] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie
|
0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie
|
||||||
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0xb4, 0x01, 0x44, 0x58, 0x42, // wProj........DXB
|
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0xb4, 0x01, 0x44, 0x58, 0x42, // wProj........DXB
|
||||||
0x43, 0x62, 0x0c, 0x7d, 0x32, 0x98, 0x4b, 0xbb, 0x29, 0xce, 0xaa, 0xb2, 0xca, 0x5d, 0xc9, 0x55, // Cb.}2.K.)....].U
|
0x43, 0x62, 0x0c, 0x7d, 0x32, 0x98, 0x4b, 0xbb, 0x29, 0xce, 0xaa, 0xb2, 0xca, 0x5d, 0xc9, 0x55, // Cb.}2.K.)....].U
|
||||||
0xf0, 0x01, 0x00, 0x00, 0x00, 0xb4, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // .............,..
|
0xf0, 0x01, 0x00, 0x00, 0x00, 0xb4, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // .............,..
|
||||||
0x00, 0x80, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, // .........ISGNL..
|
0x00, 0x80, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, // .........ISGNL..
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t vs_imgui_latlong_glsl[337] =
|
static const uint8_t vs_imgui_latlong_glsl[337] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod
|
0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj......
|
||||||
0x2c, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ,...attribute hi
|
0x2c, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ,...attribute hi
|
||||||
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // ghp vec3 a_posit
|
0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // ghp vec3 a_posit
|
||||||
0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, // ion;.attribute h
|
0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, // ion;.attribute h
|
||||||
@@ -25,8 +25,8 @@ static const uint8_t vs_imgui_latlong_glsl[337] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_imgui_latlong_dx9[319] =
|
static const uint8_t vs_imgui_latlong_dx9[319] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod
|
0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB..
|
0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB..
|
||||||
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W.............
|
||||||
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0.....
|
||||||
@@ -48,8 +48,8 @@ static const uint8_t vs_imgui_latlong_dx9[319] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_imgui_latlong_dx11[518] =
|
static const uint8_t vs_imgui_latlong_dx11[518] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod
|
0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod
|
||||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||||
0xdc, 0x01, 0x44, 0x58, 0x42, 0x43, 0x0b, 0x6a, 0x72, 0xae, 0x8a, 0xf0, 0xc5, 0xba, 0x55, 0x23, // ..DXBC.jr.....U#
|
0xdc, 0x01, 0x44, 0x58, 0x42, 0x43, 0x0b, 0x6a, 0x72, 0xae, 0x8a, 0xf0, 0xc5, 0xba, 0x55, 0x23, // ..DXBC.jr.....U#
|
||||||
0xc7, 0x67, 0xc5, 0xc7, 0xe9, 0x83, 0x01, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0x03, 0x00, // .g..............
|
0xc7, 0x67, 0xc5, 0xc7, 0xe9, 0x83, 0x01, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0x03, 0x00, // .g..............
|
||||||
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...........IS
|
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...........IS
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t vs_imgui_texture_glsl[419] =
|
static const uint8_t vs_imgui_texture_glsl[419] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
||||||
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x01, 0x00, 0x83, 0x01, 0x00, 0x00, 0x61, // wProj..........a
|
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x83, 0x01, 0x00, 0x00, 0x61, // wProj..........a
|
||||||
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v
|
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v
|
||||||
0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, // ec4 a_color0;.at
|
0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, // ec4 a_color0;.at
|
||||||
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // tribute highp ve
|
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // tribute highp ve
|
||||||
@@ -30,8 +30,8 @@ static const uint8_t vs_imgui_texture_glsl[419] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_imgui_texture_dx9[326] =
|
static const uint8_t vs_imgui_texture_dx9[326] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
||||||
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x01, 0x00, 0x00, 0x04, 0x00, 0x28, 0x01, 0x00, 0x03, 0xfe, // wProj......(....
|
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x28, 0x01, 0x00, 0x03, 0xfe, // wProj......(....
|
||||||
0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S..
|
0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S..
|
||||||
0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................
|
0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................
|
||||||
0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0..........
|
0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0..........
|
||||||
@@ -54,8 +54,8 @@ static const uint8_t vs_imgui_texture_dx9[326] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_imgui_texture_dx11[575] =
|
static const uint8_t vs_imgui_texture_dx11[575] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
||||||
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x18, 0x02, 0x44, 0x58, 0x42, // wProj........DXB
|
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x18, 0x02, 0x44, 0x58, 0x42, // wProj........DXB
|
||||||
0x43, 0x02, 0x1b, 0xea, 0x24, 0x10, 0xd8, 0x6f, 0x23, 0xf5, 0xf6, 0x01, 0x38, 0x5b, 0x08, 0x13, // C...$..o#...8[..
|
0x43, 0x02, 0x1b, 0xea, 0x24, 0x10, 0xd8, 0x6f, 0x23, 0xf5, 0xf6, 0x01, 0x38, 0x5b, 0x08, 0x13, // C...$..o#...8[..
|
||||||
0x4d, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // M............,..
|
0x4d, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // M............,..
|
||||||
0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, // .........ISGNh..
|
0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, // .........ISGNh..
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
static const uint8_t vs_ocornut_imgui_glsl[523] =
|
static const uint8_t vs_ocornut_imgui_glsl[523] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
||||||
0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0xea, 0x01, 0x00, 0x00, // wTexel..........
|
0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0xea, 0x01, 0x00, 0x00, // wTexel..........
|
||||||
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // attribute highp
|
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // attribute highp
|
||||||
0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, // vec4 a_color0;.a
|
0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, // vec4 a_color0;.a
|
||||||
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v
|
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v
|
||||||
@@ -36,8 +36,8 @@ static const uint8_t vs_ocornut_imgui_glsl[523] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_ocornut_imgui_dx9[367] =
|
static const uint8_t vs_ocornut_imgui_dx9[367] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
||||||
0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0x50, 0x01, 0x00, 0x03, // wTexel......P...
|
0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x50, 0x01, 0x00, 0x03, // wTexel......P...
|
||||||
0xfe, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, // ....".CTAB....S.
|
0xfe, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, // ....".CTAB....S.
|
||||||
0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................
|
0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................
|
||||||
0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, // ..L...0.........
|
0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, // ..L...0.........
|
||||||
@@ -62,8 +62,8 @@ static const uint8_t vs_ocornut_imgui_dx9[367] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_ocornut_imgui_dx11[612] =
|
static const uint8_t vs_ocornut_imgui_dx11[612] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
||||||
0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3c, 0x02, 0x44, 0x58, // wTexel......<.DX
|
0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3c, 0x02, 0x44, 0x58, // wTexel......<.DX
|
||||||
0x42, 0x43, 0x22, 0x5c, 0xcc, 0x36, 0x58, 0xb2, 0x23, 0x45, 0x8a, 0x2b, 0xbd, 0x13, 0xac, 0xf2, // BC"..6X.#E.+....
|
0x42, 0x43, 0x22, 0x5c, 0xcc, 0x36, 0x58, 0xb2, 0x23, 0x45, 0x8a, 0x2b, 0xbd, 0x13, 0xac, 0xf2, // BC"..6X.#E.+....
|
||||||
0xa4, 0x09, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // ......<.......,.
|
0xa4, 0x09, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // ......<.......,.
|
||||||
0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, // ..........ISGNh.
|
0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, // ..........ISGNh.
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
static const uint8_t fs_nanovg_fill_glsl[3095] =
|
static const uint8_t fs_nanovg_fill_glsl[3095] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xcf, 0xda, 0x1b, 0x94, 0x08, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci
|
0x46, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x08, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci
|
||||||
0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x08, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, // ssorMat.......u_
|
0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x03, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, // ssorMat.......u_
|
||||||
0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x08, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, // paintMat.......u
|
0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x03, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, // paintMat.......u
|
||||||
0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, // _innerCol.......
|
0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, // _innerCol.......
|
||||||
0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, // u_outerCol......
|
0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, // u_outerCol......
|
||||||
0x11, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, // .u_scissorExtSca
|
0x11, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, // .u_scissorExtSca
|
||||||
0x6c, 0x65, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, // le.......u_exten
|
0x6c, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, // le.......u_exten
|
||||||
0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, // tRadius.......u_
|
0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, // tRadius.......u_
|
||||||
0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, // params.......s_t
|
0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, // params.......s_t
|
||||||
0x65, 0x78, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, // ex......z...vary
|
0x65, 0x78, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, // ex......z...vary
|
||||||
0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, // ing highp vec2 v
|
0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, // ing highp vec2 v
|
||||||
0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // _position;.varyi
|
0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // _position;.varyi
|
||||||
@@ -197,15 +197,15 @@ static const uint8_t fs_nanovg_fill_glsl[3095] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_nanovg_fill_dx9[1531] =
|
static const uint8_t fs_nanovg_fill_dx9[1531] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xcf, 0xda, 0x1b, 0x94, 0x07, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, // FSH........u_ext
|
0x46, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x07, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, // FSH........u_ext
|
||||||
0x65, 0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x17, 0x01, 0x09, 0x00, 0x01, 0x00, 0x0a, // entRadius.......
|
0x65, 0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x01, 0x09, 0x00, 0x01, 0x00, 0x0a, // entRadius.......
|
||||||
0x75, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x17, 0x01, 0x06, 0x00, 0x01, 0x00, // u_innerCol......
|
0x75, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x12, 0x01, 0x06, 0x00, 0x01, 0x00, // u_innerCol......
|
||||||
0x0a, 0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x17, 0x01, 0x07, 0x00, 0x01, // .u_outerCol.....
|
0x0a, 0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x12, 0x01, 0x07, 0x00, 0x01, // .u_outerCol.....
|
||||||
0x00, 0x0a, 0x75, 0x5f, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x18, 0x01, 0x03, 0x00, // ..u_paintMat....
|
0x00, 0x0a, 0x75, 0x5f, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x13, 0x01, 0x03, 0x00, // ..u_paintMat....
|
||||||
0x03, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x17, 0x01, 0x0a, 0x00, 0x01, // ...u_params.....
|
0x03, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x01, 0x0a, 0x00, 0x01, // ...u_params.....
|
||||||
0x00, 0x11, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, // ..u_scissorExtSc
|
0x00, 0x11, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, // ..u_scissorExtSc
|
||||||
0x61, 0x6c, 0x65, 0x17, 0x01, 0x08, 0x00, 0x01, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, // ale.......u_scis
|
0x61, 0x6c, 0x65, 0x12, 0x01, 0x08, 0x00, 0x01, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, // ale.......u_scis
|
||||||
0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x18, 0x01, 0x00, 0x00, 0x03, 0x00, 0x6c, 0x05, 0x00, 0x03, // sorMat......l...
|
0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x13, 0x01, 0x00, 0x00, 0x03, 0x00, 0x6c, 0x05, 0x00, 0x03, // sorMat......l...
|
||||||
0xff, 0xff, 0xfe, 0xff, 0x63, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x57, 0x01, // ....c.CTAB....W.
|
0xff, 0xff, 0xfe, 0xff, 0x63, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x57, 0x01, // ....c.CTAB....W.
|
||||||
0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................
|
0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................
|
||||||
0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0xbc, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ..P.............
|
0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0xbc, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ..P.............
|
||||||
@@ -296,15 +296,15 @@ static const uint8_t fs_nanovg_fill_dx9[1531] =
|
|||||||
};
|
};
|
||||||
static const uint8_t fs_nanovg_fill_dx11[2286] =
|
static const uint8_t fs_nanovg_fill_dx11[2286] =
|
||||||
{
|
{
|
||||||
0x46, 0x53, 0x48, 0x03, 0xcf, 0xda, 0x1b, 0x94, 0x07, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci
|
0x46, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x07, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci
|
||||||
0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0a, 0x75, 0x5f, // ssorMat.......u_
|
0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x13, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0a, 0x75, 0x5f, // ssorMat.......u_
|
||||||
0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x18, 0x00, 0x30, 0x00, 0x03, 0x00, 0x0a, 0x75, // paintMat..0....u
|
0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x13, 0x00, 0x30, 0x00, 0x03, 0x00, 0x0a, 0x75, // paintMat..0....u
|
||||||
0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x17, 0x00, 0x60, 0x00, 0x01, 0x00, 0x0a, // _innerCol..`....
|
0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x12, 0x00, 0x60, 0x00, 0x01, 0x00, 0x0a, // _innerCol..`....
|
||||||
0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x17, 0x00, 0x70, 0x00, 0x01, 0x00, // u_outerCol..p...
|
0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x12, 0x00, 0x70, 0x00, 0x01, 0x00, // u_outerCol..p...
|
||||||
0x11, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, // .u_scissorExtSca
|
0x11, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, // .u_scissorExtSca
|
||||||
0x6c, 0x65, 0x17, 0x00, 0x80, 0x00, 0x01, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, // le.......u_exten
|
0x6c, 0x65, 0x12, 0x00, 0x80, 0x00, 0x01, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, // le.......u_exten
|
||||||
0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x17, 0x00, 0x90, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, // tRadius.......u_
|
0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x00, 0x90, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, // tRadius.......u_
|
||||||
0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x17, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x5c, 0x08, 0x44, 0x58, // params........DX
|
0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x5c, 0x08, 0x44, 0x58, // params........DX
|
||||||
0x42, 0x43, 0xd1, 0x0d, 0x44, 0xc2, 0xc4, 0x7b, 0x60, 0xde, 0xb6, 0xfb, 0x34, 0x0f, 0x88, 0x9d, // BC..D..{`...4...
|
0x42, 0x43, 0xd1, 0x0d, 0x44, 0xc2, 0xc4, 0x7b, 0x60, 0xde, 0xb6, 0xfb, 0x34, 0x0f, 0x88, 0x9d, // BC..D..{`...4...
|
||||||
0xbc, 0x6e, 0x01, 0x00, 0x00, 0x00, 0x5c, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // .n............,.
|
0xbc, 0x6e, 0x01, 0x00, 0x00, 0x00, 0x5c, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // .n............,.
|
||||||
0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, // ..........ISGNh.
|
0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, // ..........ISGNh.
|
||||||
|
|||||||
@@ -259,19 +259,19 @@ namespace
|
|||||||
, true
|
, true
|
||||||
);
|
);
|
||||||
|
|
||||||
gl->u_scissorMat = bgfx::createUniform("u_scissorMat", bgfx::UniformType::Uniform3x3fv);
|
gl->u_scissorMat = bgfx::createUniform("u_scissorMat", bgfx::UniformType::Mat3);
|
||||||
gl->u_paintMat = bgfx::createUniform("u_paintMat", bgfx::UniformType::Uniform3x3fv);
|
gl->u_paintMat = bgfx::createUniform("u_paintMat", bgfx::UniformType::Mat3);
|
||||||
gl->u_innerCol = bgfx::createUniform("u_innerCol", bgfx::UniformType::Uniform4fv);
|
gl->u_innerCol = bgfx::createUniform("u_innerCol", bgfx::UniformType::Vec4);
|
||||||
gl->u_outerCol = bgfx::createUniform("u_outerCol", bgfx::UniformType::Uniform4fv);
|
gl->u_outerCol = bgfx::createUniform("u_outerCol", bgfx::UniformType::Vec4);
|
||||||
gl->u_viewSize = bgfx::createUniform("u_viewSize", bgfx::UniformType::Uniform2fv);
|
gl->u_viewSize = bgfx::createUniform("u_viewSize", bgfx::UniformType::Vec4);
|
||||||
gl->u_scissorExtScale = bgfx::createUniform("u_scissorExtScale", bgfx::UniformType::Uniform4fv);
|
gl->u_scissorExtScale = bgfx::createUniform("u_scissorExtScale", bgfx::UniformType::Vec4);
|
||||||
gl->u_extentRadius = bgfx::createUniform("u_extentRadius", bgfx::UniformType::Uniform4fv);
|
gl->u_extentRadius = bgfx::createUniform("u_extentRadius", bgfx::UniformType::Vec4);
|
||||||
gl->u_params = bgfx::createUniform("u_params", bgfx::UniformType::Uniform4fv);
|
gl->u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4);
|
||||||
gl->s_tex = bgfx::createUniform("s_tex", bgfx::UniformType::Uniform1i);
|
gl->s_tex = bgfx::createUniform("s_tex", bgfx::UniformType::Int1);
|
||||||
|
|
||||||
if (bgfx::getRendererType() == bgfx::RendererType::Direct3D9)
|
if (bgfx::getRendererType() == bgfx::RendererType::Direct3D9)
|
||||||
{
|
{
|
||||||
gl->u_halfTexel = bgfx::createUniform("u_halfTexel", bgfx::UniformType::Uniform4fv);
|
gl->u_halfTexel = bgfx::createUniform("u_halfTexel", bgfx::UniformType::Vec4);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
static const uint8_t vs_nanovg_fill_glsl[541] =
|
static const uint8_t vs_nanovg_fill_glsl[541] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
0x56, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
||||||
0x77, 0x53, 0x69, 0x7a, 0x65, 0x05, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, // wSize.......u_ha
|
0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, // wSize.......u_ha
|
||||||
0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0xeb, 0x01, 0x00, // lfTexel.........
|
0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0xeb, 0x01, 0x00, // lfTexel.........
|
||||||
0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // .attribute highp
|
0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // .attribute highp
|
||||||
0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // vec2 a_position
|
0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // vec2 a_position
|
||||||
0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, // ;.attribute high
|
0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, // ;.attribute high
|
||||||
@@ -12,7 +12,7 @@ static const uint8_t vs_nanovg_fill_glsl[541] =
|
|||||||
0x6e, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // n;.varying highp
|
0x6e, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // n;.varying highp
|
||||||
0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // vec2 v_texcoord
|
0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // vec2 v_texcoord
|
||||||
0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.uniform highp
|
0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.uniform highp
|
||||||
0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, // vec2 u_viewSize
|
0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, // vec4 u_viewSize
|
||||||
0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // ;.uniform highp
|
0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // ;.uniform highp
|
||||||
0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x68, 0x61, 0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, // vec4 u_halfTexel
|
0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x68, 0x61, 0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, // vec4 u_halfTexel
|
||||||
0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, // ;.void main ().{
|
0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, // ;.void main ().{
|
||||||
@@ -35,23 +35,22 @@ static const uint8_t vs_nanovg_fill_glsl[541] =
|
|||||||
0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, // gl_Position = t
|
0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, // gl_Position = t
|
||||||
0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // mpvar_1;.}...
|
0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // mpvar_1;.}...
|
||||||
};
|
};
|
||||||
static const uint8_t vs_nanovg_fill_dx9[448] =
|
static const uint8_t vs_nanovg_fill_dx9[432] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, 0x6c, // VSH........u_hal
|
0x56, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, 0x6c, // VSH........u_hal
|
||||||
0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x07, 0x01, 0x01, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, // fTexel.......u_v
|
0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x01, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, // fTexel.......u_v
|
||||||
0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0x90, 0x01, 0x00, // iewSize.........
|
0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x80, 0x01, 0x00, // iewSize.........
|
||||||
0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x83, // .......CTAB.....
|
0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2a, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x72, // .....*.CTAB....r
|
||||||
0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................
|
0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
0x91, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, // ...|...D........
|
0x91, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, // ...k...D........
|
||||||
0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, // ...P.......`....
|
0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, // ...P.......`....
|
||||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, // .......l.......u
|
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, // .......P.......u
|
||||||
0x5f, 0x68, 0x61, 0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, // _halfTexel......
|
0x5f, 0x68, 0x61, 0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, // _halfTexel......
|
||||||
0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...........u_vie
|
0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...........u_vie
|
||||||
0x77, 0x53, 0x69, 0x7a, 0x65, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, // wSize...........
|
0x77, 0x53, 0x69, 0x7a, 0x65, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // wSize.vs_3_0.Mic
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......vs_3_0.Mi
|
0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL
|
||||||
0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL
|
0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler
|
||||||
0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler
|
0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0x51, // 9.29.952.3111..Q
|
||||||
0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, // 9.29.952.3111.Q
|
|
||||||
0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, // ..............?.
|
0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, // ..............?.
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, // ................
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, // ................
|
||||||
0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, // ................
|
0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, // ................
|
||||||
@@ -68,8 +67,8 @@ static const uint8_t vs_nanovg_fill_dx9[448] =
|
|||||||
};
|
};
|
||||||
static const uint8_t vs_nanovg_fill_dx11[577] =
|
static const uint8_t vs_nanovg_fill_dx11[577] =
|
||||||
{
|
{
|
||||||
0x56, 0x53, 0x48, 0x03, 0xcf, 0xda, 0x1b, 0x94, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
0x56, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
||||||
0x77, 0x53, 0x69, 0x7a, 0x65, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x02, 0x44, 0x58, 0x42, // wSize........DXB
|
0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x02, 0x44, 0x58, 0x42, // wSize........DXB
|
||||||
0x43, 0x99, 0x64, 0x1c, 0x9f, 0xec, 0x38, 0xd9, 0xd2, 0x91, 0x86, 0xde, 0x66, 0x7d, 0x52, 0x06, // C.d...8.....f}R.
|
0x43, 0x99, 0x64, 0x1c, 0x9f, 0xec, 0x38, 0xd9, 0xd2, 0x91, 0x86, 0xde, 0x66, 0x7d, 0x52, 0x06, // C.d...8.....f}R.
|
||||||
0xfe, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // .............,..
|
0xfe, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // .............,..
|
||||||
0x00, 0x80, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, // .........ISGNL..
|
0x00, 0x80, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, // .........ISGNL..
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ $output v_position, v_texcoord0
|
|||||||
|
|
||||||
#define NEED_HALF_TEXEL (BGFX_SHADER_LANGUAGE_HLSL < 4)
|
#define NEED_HALF_TEXEL (BGFX_SHADER_LANGUAGE_HLSL < 4)
|
||||||
|
|
||||||
uniform vec2 u_viewSize;
|
uniform vec4 u_viewSize;
|
||||||
|
|
||||||
#if NEED_HALF_TEXEL
|
#if NEED_HALF_TEXEL
|
||||||
uniform vec4 u_halfTexel;
|
uniform vec4 u_halfTexel;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user