clearquad uses uniform update instead of vertex update

This commit is contained in:
attilaz 2019-02-04 17:42:28 +01:00
Родитель a235f8028f
Коммит 8aff45398a
8 изменённых файлов: 278 добавлений и 294 удалений

Просмотреть файл

@ -812,7 +812,7 @@ namespace bgfx
{
m_decl
.begin()
.add(Attrib::Position, 3, AttribType::Float)
.add(Attrib::Position, 2, AttribType::Float)
.end();
ShaderHandle vsh = createEmbeddedShader(s_embeddedShaders, g_caps.rendererType, "vs_clear");
@ -830,7 +830,30 @@ namespace bgfx
destroy(vsh);
m_vb = s_ctx->createTransientVertexBuffer(4*m_decl.m_stride, &m_decl);
struct Vertex
{
float m_x;
float m_y;
};
const uint16_t stride = m_decl.m_stride;
const bgfx::Memory* mem = bgfx::alloc(4 * stride);
Vertex* vertex = (Vertex*)mem->data;
BX_CHECK(stride == sizeof(Vertex), "Stride/Vertex mismatch (stride %d, sizeof(Vertex) %d)", stride, sizeof(Vertex));
vertex->m_x = -1.0f;
vertex->m_y = -1.0f;
vertex++;
vertex->m_x = 1.0f;
vertex->m_y = -1.0f;
vertex++;
vertex->m_x = -1.0f;
vertex->m_y = 1.0f;
vertex++;
vertex->m_x = 1.0f;
vertex->m_y = 1.0f;
m_vb = s_ctx->createVertexBuffer(mem, m_decl, 0);
}
}
@ -849,7 +872,7 @@ namespace bgfx
}
}
s_ctx->destroyTransientVertexBuffer(m_vb);
s_ctx->destroyVertexBuffer(m_vb);
}
}

Просмотреть файл

@ -723,7 +723,7 @@ namespace bgfx
void init();
void shutdown();
TransientVertexBuffer* m_vb;
VertexBufferHandle m_vb;
VertexDecl m_decl;
ProgramHandle m_program[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS];
};

Просмотреть файл

@ -3323,24 +3323,27 @@ namespace bgfx { namespace d3d11
ProgramD3D11& program = m_program[_clearQuad.m_program[numMrt-1].idx];
m_currentProgram = &program;
deviceCtx->VSSetShader(program.m_vsh->m_vertexShader, NULL, 0);
deviceCtx->VSSetConstantBuffers(0, 1, s_zero.m_buffer);
const ShaderD3D11* vsh = program.m_vsh;
deviceCtx->VSSetShader(vsh->m_vertexShader, NULL, 0);
deviceCtx->VSSetConstantBuffers(0, 1, &vsh->m_buffer);
float mrtClearDepth[4] = { _clear.m_depth };
deviceCtx->UpdateSubresource(vsh->m_buffer, 0, 0, mrtClearDepth, 0, 0);
if (NULL != m_currentColor)
{
const ShaderD3D11* fsh = program.m_fsh;
deviceCtx->PSSetShader(fsh->m_pixelShader, NULL, 0);
deviceCtx->PSSetConstantBuffers(0, 1, &fsh->m_buffer);
float mrtClearColor[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];
if (BGFX_CLEAR_COLOR_USE_PALETTE & _clear.m_flags)
{
float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];
for (uint32_t ii = 0; ii < numMrt; ++ii)
{
uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE-1, _clear.m_index[ii]);
bx::memCopy(mrtClear[ii], _palette[index], 16);
bx::memCopy(mrtClearColor[ii], _palette[index], 16);
}
deviceCtx->UpdateSubresource(fsh->m_buffer, 0, 0, mrtClear, 0, 0);
}
else
{
@ -3351,51 +3354,25 @@ namespace bgfx { namespace d3d11
_clear.m_index[2]*1.0f/255.0f,
_clear.m_index[3]*1.0f/255.0f,
};
deviceCtx->UpdateSubresource(fsh->m_buffer, 0, 0, rgba, 0, 0);
for (uint32_t ii = 0; ii < numMrt; ++ii)
{
bx::memCopy(mrtClearColor[ii], rgba, 16);
}
}
deviceCtx->UpdateSubresource(fsh->m_buffer, 0, 0, mrtClearColor, 0, 0);
}
else
{
deviceCtx->PSSetShader(NULL, NULL, 0);
}
VertexBufferD3D11& vb = m_vertexBuffers[_clearQuad.m_vb->handle.idx];
const VertexDecl& vertexDecl = m_vertexDecls[_clearQuad.m_vb->decl.idx];
VertexBufferD3D11& vb = m_vertexBuffers[_clearQuad.m_vb.idx];
const VertexDecl& vertexDecl = _clearQuad.m_decl;
const uint32_t stride = vertexDecl.m_stride;
const uint32_t offset = 0;
{
struct Vertex
{
float m_x;
float m_y;
float m_z;
};
Vertex* vertex = (Vertex*)_clearQuad.m_vb->data;
BX_CHECK(stride == sizeof(Vertex), "Stride/Vertex mismatch (stride %d, sizeof(Vertex) %d)", stride, sizeof(Vertex) );
const float depth = _clear.m_depth;
vertex->m_x = -1.0f;
vertex->m_y = -1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = 1.0f;
vertex->m_y = -1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = -1.0f;
vertex->m_y = 1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = 1.0f;
vertex->m_y = 1.0f;
vertex->m_z = depth;
}
m_vertexBuffers[_clearQuad.m_vb->handle.idx].update(0, 4*_clearQuad.m_decl.m_stride, _clearQuad.m_vb->data);
deviceCtx->IASetVertexBuffers(0, 1, &vb.m_ptr, &stride, &offset);
setInputLayout(vertexDecl, program, 0);

Просмотреть файл

@ -2080,54 +2080,25 @@ namespace bgfx { namespace d3d9
DX_CHECK(device->SetRenderState(D3DRS_STENCILENABLE, FALSE) );
}
VertexBufferD3D9& vb = m_vertexBuffers[_clearQuad.m_vb->handle.idx];
VertexDecl& vertexDecl = m_vertexDecls[_clearQuad.m_vb->decl.idx];
VertexBufferD3D9& vb = m_vertexBuffers[_clearQuad.m_vb.idx];
VertexDecl& vertexDecl = _clearQuad.m_decl;
uint32_t stride = _clearQuad.m_decl.m_stride;
{
struct Vertex
{
float m_x;
float m_y;
float m_z;
};
Vertex* vertex = (Vertex*)_clearQuad.m_vb->data;
BX_CHECK(stride == sizeof(Vertex), "Stride/Vertex mismatch (stride %d, sizeof(Vertex) %d)", stride, sizeof(Vertex) );
const float depth = _clear.m_depth;
vertex->m_x = -1.0f;
vertex->m_y = -1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = 1.0f;
vertex->m_y = -1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = -1.0f;
vertex->m_y = 1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = 1.0f;
vertex->m_y = 1.0f;
vertex->m_z = depth;
}
vb.update(0, 4*stride, _clearQuad.m_vb->data);
ProgramD3D9& program = m_program[_clearQuad.m_program[numMrt-1].idx];
device->SetVertexShader(program.m_vsh->m_vertexShader);
device->SetPixelShader(program.m_fsh->m_pixelShader);
float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];
float mrtClearDepth[4] = { _clear.m_depth };
DX_CHECK(device->SetVertexShaderConstantF(0, mrtClearDepth, 1));
float mrtClearColor[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];
if (BGFX_CLEAR_COLOR_USE_PALETTE & _clear.m_flags)
{
for (uint32_t ii = 0; ii < numMrt; ++ii)
{
uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE - 1, _clear.m_index[ii]);
bx::memCopy(mrtClear[ii], _palette[index], 16);
bx::memCopy(mrtClearColor[ii], _palette[index], 16);
}
}
else
@ -2142,11 +2113,11 @@ namespace bgfx { namespace d3d9
for (uint32_t ii = 0; ii < numMrt; ++ii)
{
bx::memCopy(mrtClear[ii], rgba, 16);
bx::memCopy(mrtClearColor[ii], rgba, 16);
}
}
DX_CHECK(device->SetPixelShaderConstantF(0, mrtClear[0], numMrt));
DX_CHECK(device->SetPixelShaderConstantF(0, mrtClearColor[0], numMrt));
DX_CHECK(device->SetStreamSource(0, vb.m_ptr, 0, stride) );
DX_CHECK(device->SetStreamSourceFreq(0, 1) );

Просмотреть файл

@ -1738,6 +1738,8 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
, m_hash( (BX_PLATFORM_WINDOWS<<1) | BX_ARCH_64BIT)
, m_backBufferFbo(0)
, m_msaaBackBufferFbo(0)
, m_clearQuadColor(BGFX_INVALID_HANDLE)
, m_clearQuadDepth(BGFX_INVALID_HANDLE)
{
bx::memSet(m_msaaBackBufferRbos, 0, sizeof(m_msaaBackBufferRbos) );
}
@ -3750,40 +3752,8 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
GL_CHECK(glDisable(GL_STENCIL_TEST) );
}
VertexBufferGL& vb = m_vertexBuffers[_clearQuad.m_vb->handle.idx];
VertexDecl& vertexDecl = m_vertexDecls[_clearQuad.m_vb->decl.idx];
{
struct Vertex
{
float m_x;
float m_y;
float m_z;
};
Vertex* vertex = (Vertex*)_clearQuad.m_vb->data;
BX_CHECK(vertexDecl.m_stride == sizeof(Vertex), "Stride/Vertex mismatch (stride %d, sizeof(Vertex) %d)", vertexDecl.m_stride, sizeof(Vertex) );
const float depth = _clear.m_depth * 2.0f - 1.0f;
vertex->m_x = -1.0f;
vertex->m_y = -1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = 1.0f;
vertex->m_y = -1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = -1.0f;
vertex->m_y = 1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = 1.0f;
vertex->m_y = 1.0f;
vertex->m_z = depth;
}
vb.update(0, 4*_clearQuad.m_decl.m_stride, _clearQuad.m_vb->data);
VertexBufferGL& vb = m_vertexBuffers[_clearQuad.m_vb.idx];
VertexDecl& vertexDecl = _clearQuad.m_decl;
GL_CHECK(glBindBuffer(GL_ARRAY_BUFFER, vb.m_id) );
@ -3793,14 +3763,31 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
program.bindAttributes(vertexDecl, 0);
program.bindAttributesEnd();
float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];
if (m_clearQuadColor.idx == kInvalidHandle)
{
const UniformRegInfo* infoClearColor = m_uniformReg.find("bgfx_clear_color");
if (NULL != infoClearColor)
m_clearQuadColor = infoClearColor->m_handle;
}
if (m_clearQuadDepth.idx == kInvalidHandle)
{
const UniformRegInfo* infoClearDepth = m_uniformReg.find("bgfx_clear_depth");
if (NULL != infoClearDepth)
m_clearQuadDepth = infoClearDepth->m_handle;
}
float mrtClearDepth[4] = { _clear.m_depth * 2.0f - 1.0f };
updateUniform(m_clearQuadDepth.idx, mrtClearDepth, sizeof(float)*4);
float mrtClearColor[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];
if (BGFX_CLEAR_COLOR_USE_PALETTE & _clear.m_flags)
{
for (uint32_t ii = 0; ii < numMrt; ++ii)
{
uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE-1, _clear.m_index[ii]);
bx::memCopy(mrtClear[ii], _palette[index], 16);
bx::memCopy(mrtClearColor[ii], _palette[index], 16);
}
}
else
@ -3815,11 +3802,13 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
for (uint32_t ii = 0; ii < numMrt; ++ii)
{
bx::memCopy(mrtClear[ii], rgba, 16);
bx::memCopy(mrtClearColor[ii], rgba, 16);
}
}
GL_CHECK(glUniform4fv(0, numMrt, mrtClear[0]) );
updateUniform(m_clearQuadColor.idx, mrtClearColor[0], numMrt * sizeof(float) * 4);
commit(*program.m_constantBuffer);
GL_CHECK(glDrawArrays(GL_TRIANGLE_STRIP
, 0
@ -3887,6 +3876,9 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
GlContext m_glctx;
bool m_needPresent;
UniformHandle m_clearQuadColor;
UniformHandle m_clearQuadDepth;
const char* m_vendor;
const char* m_renderer;
const char* m_version;

Просмотреть файл

@ -1484,38 +1484,44 @@ namespace bgfx { namespace mtl
numMrt = bx::uint32_max(1, fb.m_num);
}
const VertexDecl* decl = &_clearQuad.m_decl;
const PipelineStateMtl* pso = getPipelineState(
state
, 0
, fbh
, _clearQuad.m_vb->decl
, 1
, &decl
, _clearQuad.m_program[numMrt-1]
, 0
);
m_renderCommandEncoder.setRenderPipelineState(pso->m_rps);
uint32_t fragmentUniformBufferSize = pso->m_fshConstantBufferSize;
const uint32_t vertexUniformBufferSize = pso->m_vshConstantBufferSize;
const uint32_t fragmentUniformBufferSize = pso->m_fshConstantBufferSize;
m_uniformBufferFragmentOffset = m_uniformBufferVertexOffset;
if (0 != vertexUniformBufferSize)
{
m_uniformBufferVertexOffset = BX_ALIGN_MASK(m_uniformBufferVertexOffset, pso->m_vshConstantBufferAlignmentMask);
m_renderCommandEncoder.setVertexBuffer(m_uniformBuffer, m_uniformBufferVertexOffset, 0);
}
m_uniformBufferFragmentOffset = m_uniformBufferVertexOffset + vertexUniformBufferSize;
if (fragmentUniformBufferSize)
{
m_uniformBufferFragmentOffset = BX_ALIGN_MASK(m_uniformBufferFragmentOffset, pso->m_fshConstantBufferAlignmentMask);
m_renderCommandEncoder.setFragmentBuffer(m_uniformBuffer, m_uniformBufferFragmentOffset, 0);
}
float mrtClearColor[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];
float mrtClearDepth[4] = { _clear.m_depth };
if (BGFX_CLEAR_COLOR_USE_PALETTE & _clear.m_flags)
{
float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];
for (uint32_t ii = 0; ii < numMrt; ++ii)
{
uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE-1, _clear.m_index[ii]);
bx::memCopy(mrtClear[ii], _palette[index], 16);
bx::memCopy(mrtClearColor[ii], _palette[index], 16);
}
bx::memCopy( (uint8_t*)m_uniformBuffer.contents() + m_uniformBufferFragmentOffset
, mrtClear
, bx::uint32_min(fragmentUniformBufferSize, sizeof(mrtClear) )
);
}
else
{
@ -1527,58 +1533,33 @@ namespace bgfx { namespace mtl
_clear.m_index[3]*1.0f/255.0f,
};
bx::memCopy( (uint8_t*)m_uniformBuffer.contents() + m_uniformBufferFragmentOffset
, rgba
, bx::uint32_min(fragmentUniformBufferSize, sizeof(rgba) )
);
for (uint32_t ii = 0; ii < numMrt; ++ii)
{
bx::memCopy( mrtClearColor[ii]
, rgba
, 16
);
}
}
bx::memCopy( (uint8_t*)m_uniformBuffer.contents() + m_uniformBufferVertexOffset
, mrtClearDepth
, bx::uint32_min(vertexUniformBufferSize, sizeof(mrtClearDepth) )
);
bx::memCopy( (uint8_t*)m_uniformBuffer.contents() + m_uniformBufferFragmentOffset
, mrtClearColor
, bx::uint32_min(fragmentUniformBufferSize, sizeof(mrtClearColor) )
);
m_uniformBufferFragmentOffset += fragmentUniformBufferSize;
m_uniformBufferVertexOffset = m_uniformBufferFragmentOffset;
m_uniformBufferVertexOffset = m_uniformBufferFragmentOffset;
const VertexBufferMtl& vb = m_vertexBuffers[_clearQuad.m_vb->handle.idx];
const VertexDecl& vertexDecl = m_vertexDecls[_clearQuad.m_vb->decl.idx];
const uint32_t stride = vertexDecl.m_stride;
const uint32_t offset = 0;
const VertexBufferMtl& vb = m_vertexBuffers[_clearQuad.m_vb.idx];
{
struct Vertex
{
float m_x;
float m_y;
float m_z;
};
Vertex* vertex = (Vertex*)_clearQuad.m_vb->data;
BX_CHECK(stride == sizeof(Vertex)
, "Stride/Vertex mismatch (stride %d, sizeof(Vertex) %d)"
, stride
, sizeof(Vertex)
);
BX_UNUSED(stride);
const float depth = _clear.m_depth;
vertex->m_x = -1.0f;
vertex->m_y = -1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = 1.0f;
vertex->m_y = -1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = -1.0f;
vertex->m_y = 1.0f;
vertex->m_z = depth;
vertex++;
vertex->m_x = 1.0f;
vertex->m_y = 1.0f;
vertex->m_z = depth;
}
m_vertexBuffers[_clearQuad.m_vb->handle.idx].update(0, 4*_clearQuad.m_decl.m_stride, _clearQuad.m_vb->data);
m_renderCommandEncoder.setCullMode(MTLCullModeNone);
m_renderCommandEncoder.setVertexBuffer(vb.getBuffer(), offset, 1);
m_renderCommandEncoder.setVertexBuffer(vb.getBuffer(), 0, 1);
m_renderCommandEncoder.drawPrimitives(MTLPrimitiveTypeTriangleStrip, 0, 4, 1);
}

Просмотреть файл

@ -1,132 +1,170 @@
static const uint8_t vs_clear_glsl[164] =
static const uint8_t vs_clear_glsl[265] =
{
0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x61, 0x74, // VSH...........at
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // tribute highp ve
0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x76, // c3 a_position;.v
0x56, 0x53, 0x48, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, // VSH............b
0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x02, // gfx_clear_depth.
0x01, 0x00, 0x00, 0x01, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, // .........attribu
0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, // te highp vec3 a_
0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, // position;.unifor
0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x62, 0x67, 0x66, // m highp vec4 bgf
0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x3b, 0x0a, 0x76, // x_clear_depth;.v
0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, // oid main ().{.
0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // highp vec4 tmpva
0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, // r_1;. tmpvar_1.
0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // w = 1.0;. tmpva
0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // r_1.xyz = a_posi
0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // tion;. gl_Posit
0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, // ion = tmpvar_1;.
0x7d, 0x0a, 0x0a, 0x00, // }...
0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // r_1.xy = a_posit
0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // ion.xy;. tmpvar
0x5f, 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // _1.z = bgfx_clea
0x72, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x2e, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, // r_depth.x;. gl_
0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // Position = tmpva
0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r_1;.}...
};
static const uint8_t vs_clear_spv[568] =
static const uint8_t vs_clear_spv[863] =
{
0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x02, 0x00, 0x00, 0x03, 0x02, // VSH.......$.....
0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x08, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, // #.........O.....
0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................
0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450..
0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main..
0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, // ..'...*.........
0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, // ..............ma
0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x00, 0x00, 0x00, 0x61, 0x5f, // in........'...a_
0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x2a, 0x00, // position......*.
0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, // ..@entryPointOut
0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, // put.gl_Position.
0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x27, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G...'.........
0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G...*.........
0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, // ..........!.....
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. .
0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, // ................
0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, // ................
0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, // ..+.............
0x80, 0x3f, 0x20, 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, // .? ...&.........
0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x01, 0x00, // ..;...&...'.....
0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x29, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0x00, // .. ...).........
0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x29, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x03, 0x00, // ..;...)...*.....
0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ..6.............
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=.
0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x51, 0x00, // ......(...'...Q.
0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, // ......8...(.....
0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x28, 0x00, // ..Q.......9...(.
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3a, 0x00, // ......Q.......:.
0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x09, 0x00, // ..(.......P.....
0x00, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x3a, 0x00, // ..;...8...9...:.
0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3f, 0x00, // ..............?.
0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x52, 0x00, 0x06, 0x00, 0x09, 0x00, 0x00, 0x00, 0x4e, 0x00, // ..9...R.......N.
0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, // ..?...;.......>.
0x03, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, // ..*...N.......8.
0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, // ........
0x56, 0x53, 0x48, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, // VSH............b
0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x02, // gfx_clear_depth.
0x01, 0x00, 0x00, 0x01, 0x00, 0x30, 0x03, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, // .....0.....#....
0x00, 0x07, 0x00, 0x08, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, // .....d..........
0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, // .............GLS
0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, // L.std.450.......
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, // .....main..../..
0x00, 0x32, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, // .2..............
0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main...
0x00, 0x05, 0x00, 0x04, 0x00, 0x16, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, // .........$Global
0x00, 0x06, 0x00, 0x08, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, // .............bgf
0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x00, 0x00, 0x00, // x_clear_depth...
0x00, 0x05, 0x00, 0x03, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // ................
0x00, 0x2f, 0x00, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, // ./...a_position.
0x00, 0x05, 0x00, 0x0a, 0x00, 0x32, 0x00, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, // .....2...@entryP
0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // ointOutput.gl_Po
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x16, 0x00, 0x00, // sition...H......
0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, // .....#.......G..
0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .........G......
0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .".......G......
0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x2f, 0x00, 0x00, // .!.......G.../..
0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x32, 0x00, 0x00, // .........G...2..
0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, // ................
0x00, 0x21, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, // .!..............
0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, // ..... ..........
0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, // ................
0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x11, 0x00, 0x00, // ................
0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x11, 0x00, 0x00, // . .......+......
0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0x16, 0x00, 0x00, // ................
0x00, 0x09, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... ..........
0x00, 0x16, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // .....;..........
0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x19, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. ..
0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, // .....+..........
0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... ..........
0x00, 0x06, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, // .....+..........
0x00, 0x00, 0x00, 0x80, 0x3f, 0x20, 0x00, 0x04, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ....? ..........
0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, // .....;......./..
0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x31, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ..... ...1......
0x00, 0x09, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x31, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, // .....;...1...2..
0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .....6..........
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, // ................
0x00, 0x3d, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, // .=.......0.../..
0x00, 0x41, 0x00, 0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // .A.......M......
0x00, 0x12, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, // .........=......
0x00, 0x4e, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, // .N...M...Q......
0x00, 0x4f, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, // .O...0.......Q..
0x00, 0x06, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .....P...0......
0x00, 0x50, 0x00, 0x07, 0x00, 0x09, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, // .P.......Q...O..
0x00, 0x50, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x04, // .P...N..........
0x00, 0x06, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x52, 0x00, 0x06, // .....U...P...R..
0x00, 0x09, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, // .....c...U...Q..
0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x32, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, // .....>...2...c..
0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x10, 0x00, // .....8.........
};
static const uint8_t vs_clear_dx9[175] =
static const uint8_t vs_clear_dx9[282] =
{
0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x03, // VSH.............
0xfe, 0xff, 0xfe, 0xff, 0x14, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, // ......CTAB....#.
0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, // ................
0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......vs_3_0.Mic
0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL
0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler
0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, // 10.1..Q.........
0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, // .?..............
0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................
0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................
0x24, 0x90, 0x00, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x15, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // $...@..........
0x56, 0x53, 0x48, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, // VSH............b
0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x02, // gfx_clear_depth.
0x01, 0x00, 0x00, 0x01, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x25, // ...............%
0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, // .CTAB....[......
0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, // .............T..
0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .0...........D..
0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // .....bgfx_clear_
0x64, 0x65, 0x70, 0x74, 0x68, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, // depth...........
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, // .........vs_3_0.
0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, // Microsoft (R) HL
0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, // SL Shader Compil
0x65, 0x72, 0x20, 0x36, 0x2e, 0x33, 0x2e, 0x39, 0x36, 0x30, 0x30, 0x2e, 0x31, 0x38, 0x36, 0x31, // er 6.3.9600.1861
0x31, 0x00, 0xab, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, // 1....Q..........
0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, // ?...............
0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................
0x80, 0x00, 0x00, 0x0f, 0xe0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0b, 0xe0, 0x00, 0x00, 0x24, // ...............$
0x90, 0x01, 0x00, 0x60, 0xa0, 0x01, 0x00, 0x25, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, // ...`...%........
0xe0, 0x00, 0x00, 0x00, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ..........
};
static const uint8_t vs_clear_dx11[388] =
static const uint8_t vs_clear_dx11[479] =
{
0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x44, 0x58, // VSH.......p...DX
0x42, 0x43, 0x35, 0x37, 0xf0, 0x90, 0x23, 0xc6, 0x3b, 0x7a, 0xd4, 0x66, 0x38, 0xf5, 0x51, 0x69, // BC57..#.;z.f8.Qi
0x19, 0xa8, 0x01, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, // ......p.......0.
0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x41, 0x6f, // ..........<...Ao
0x6e, 0x39, 0x78, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, 0x50, 0x00, // n9x...x.......P.
0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, // ..(.....$...$...
0x24, 0x00, 0x00, 0x00, 0x24, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // $...$...$.......
0xfe, 0xff, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, // ..Q..........?..
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................
0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, // ................
0xe4, 0x90, 0x00, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, // ................
0xaa, 0x90, 0x01, 0x00, 0x44, 0xa0, 0x01, 0x00, 0x14, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, // ....D.........SH
0x44, 0x52, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00, 0x5f, 0x00, // DRP...@......._.
0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, // ..r.......g....
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, // ..........6...r
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, // ......F.......6.
0x00, 0x05, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ... .......@....
0x80, 0x3f, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, // .?>...ISGN,.....
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...... .........
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x50, 0x4f, // ..............PO
0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, // SITION....OSGN,.
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... .....
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................
0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x00, 0x01, // ..SV_POSITION...
0x01, 0x00, 0x00, 0x00, // ....
0x56, 0x53, 0x48, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, // VSH............b
0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x02, // gfx_clear_depth.
0x00, 0x00, 0x00, 0x01, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x2e, 0xa9, 0xc9, // .........DXBC...
0x97, 0xf8, 0x17, 0xd7, 0x4e, 0xd1, 0x22, 0x2f, 0x75, 0x57, 0x9d, 0x14, 0x2f, 0x01, 0x00, 0x00, // ....N."/uW../...
0x00, 0xb0, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, // .........0......
0x00, 0x48, 0x01, 0x00, 0x00, 0x7c, 0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x90, 0x00, 0x00, // .H...|...Aon9...
0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, 0x5c, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, // .............4..
0x00, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, // ...$...0...0...$
0x00, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ...0............
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, // .........Q......
0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....?...........
0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x02, 0x00, 0x00, // ................
0x03, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0xe4, 0x90, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................
0x02, 0x00, 0x00, 0x03, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0c, // ................
0xc0, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x44, 0x80, 0x00, 0x00, 0x14, 0x80, 0xff, 0xff, 0x00, // .......D........
0x00, 0x53, 0x48, 0x44, 0x52, 0x78, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x1e, 0x00, 0x00, // .SHDRx...@......
0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .Y...F. ........
0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, // ._...2.......g..
0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .. ..........6..
0x05, 0x32, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, // .2 ......F......
0x00, 0x36, 0x00, 0x00, 0x06, 0x42, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, // .6...B ........
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x20, 0x10, // .........6.... .
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x3e, 0x00, 0x00, // ......@.....?>..
0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .ISGN,..........
0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // . ..............
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // .........POSITIO
0x4e, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // N....OSGN,......
0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ..... ..........
0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, // .............SV_
0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x00, 0x01, 0x01, 0x00, 0x10, 0x00, // POSITION.......
};
static const uint8_t vs_clear_mtl[504] =
static const uint8_t vs_clear_mtl[541] =
{
0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x01, 0x00, 0x00, 0x75, 0x73, // VSH...........us
0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me
0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput {
0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // . float3 a_posi
0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // tion [[attribute
0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, // (0)]];.};.struct
0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, // xlatMtlShaderOu
0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // tput {. float4
0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, // gl_Position [[po
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, // sition]];.};.str
0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // uct xlatMtlShade
0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, // rUniform {.};.ve
0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // rtex xlatMtlShad
0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // erOutput xlatMtl
0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // Main (xlatMtlSha
0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, // derInput _mtl_i
0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, // [[stage_in]], co
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // nstant xlatMtlSh
0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, // aderUniform& _mt
0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, // l_u [[buffer(0)]
0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // ]).{. xlatMtlSh
0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // aderOutput _mtl_
0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, // o;. float4 tmpv
0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // ar_1 = 0;. tmpv
0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, // ar_1.w = 1.0;.
0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, // tmpvar_1.xyz = _
0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // mtl_i.a_position
0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // ;. _mtl_o.gl_Po
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // sition = tmpvar_
0x31, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // 1;. return _mtl
0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _o;.}...
0x56, 0x53, 0x48, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, // VSH............b
0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x02, // gfx_clear_depth.
0x01, 0x00, 0x00, 0x01, 0x00, 0xee, 0x01, 0x00, 0x00, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, // .........#includ
0x65, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x3e, // e <metal_stdlib>
0x0a, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x3c, 0x73, 0x69, 0x6d, 0x64, 0x2f, // .#include <simd/
0x73, 0x69, 0x6d, 0x64, 0x2e, 0x68, 0x3e, 0x0a, 0x0a, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, // simd.h>..using n
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, // amespace metal;.
0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x0a, // .struct _Global.
0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, // {. float4 bgf
0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x3b, 0x0a, 0x7d, // x_clear_depth;.}
0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // ;..struct xlatMt
0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, // lMain_out.{.
0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, // float4 gl_Positi
0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, // on [[position]];
0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // .};..struct xlat
0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, // MtlMain_in.{.
0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // float3 a_positi
0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, // on [[attribute(0
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, // )]];.};..vertex
0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, // xlatMtlMain_out
0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x28, 0x78, 0x6c, 0x61, 0x74, // xlatMtlMain(xlat
0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x5b, 0x5b, // MtlMain_in in [[
0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, // stage_in]], cons
0x74, 0x61, 0x6e, 0x74, 0x20, 0x5f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x26, 0x20, 0x5f, 0x6d, // tant _Global& _m
0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, // tl_u [[buffer(0)
0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // ]]).{. xlatMt
0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x3d, 0x20, // lMain_out out =
0x7b, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, // {};. out.gl_P
0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // osition = float4
0x28, 0x69, 0x6e, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, // (in.a_position.x
0x79, 0x2c, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, // y, _mtl_u.bgfx_c
0x6c, 0x65, 0x61, 0x72, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x2e, 0x78, 0x2c, 0x20, 0x31, 0x2e, // lear_depth.x, 1.
0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6f, // 0);. return o
0x75, 0x74, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, 0x01, 0x01, 0x00, 0x10, 0x00, // ut;.}........
};
extern const uint8_t* vs_clear_pssl;
extern const uint32_t vs_clear_pssl_size;

Просмотреть файл

@ -7,7 +7,9 @@ $input a_position
#include "bgfx_shader.sh"
uniform vec4 bgfx_clear_depth;
void main()
{
gl_Position = vec4(a_position, 1.0);
gl_Position = vec4(a_position.xy, bgfx_clear_depth.x, 1.0);
}