diff --git a/examples/54-s2h/cs_s2h_scatter.sc b/examples/54-s2h/cs_s2h_scatter.sc index 71b0b4505..b92099986 100644 --- a/examples/54-s2h/cs_s2h_scatter.sc +++ b/examples/54-s2h/cs_s2h_scatter.sc @@ -1,8 +1,6 @@ // Port of ShaderToHuman-bgfx/examples/Features/Scatter_example.hlsl. #include "bgfx_compute.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" -#include "s2h_scatter.hlsl" +#include "s2h/s2h_scatter.sh" IMAGE2D_WO(s_scatterColor, rgba8, 0); uniform vec4 u_s2hScatterSize; diff --git a/examples/54-s2h/fs_s2h.sc b/examples/54-s2h/fs_s2h.sc index 2c64e4c41..afa1d970b 100644 --- a/examples/54-s2h/fs_s2h.sc +++ b/examples/54-s2h/fs_s2h.sc @@ -1,10 +1,7 @@ $input v_color0, v_texcoord0 -// The S2H sources are shared with the HLSL integration; this adapter supplies -// shaderc-compatible definitions for the bgfx backends. #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" +#include "s2h/s2h.sh" void main() { diff --git a/examples/54-s2h/fs_s2h_2d.sc b/examples/54-s2h/fs_s2h_2d.sc index 8ea72832e..af0e61a62 100644 --- a/examples/54-s2h/fs_s2h_2d.sc +++ b/examples/54-s2h/fs_s2h_2d.sc @@ -2,8 +2,7 @@ $input v_color0, v_texcoord0 // Fragment-renderer port of ShaderToHuman-bgfx/examples/Features/2D_example.hlsl. #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" +#include "s2h/s2h.sh" uniform vec4 u_s2hTime; uniform vec4 u_s2hMouse; @@ -36,7 +35,7 @@ void drawBlendingExample(inout ContextGather _ui) vec3 color = s2h_indexToColor(uint(peelId)); vec2 center = vec2(sin(angle), cos(angle)) * 60.0f + vec2(105.0f, 450.0f); float alpha = saturate(2.0f - length(_ui.pxPos - center) / 25.0f); - overColor = lerp(overColor, color, alpha); + overColor = mix(overColor, color, alpha); underAccumulator.rgb += color * alpha * (1.0f - underAccumulator.a); underAccumulator.a = 1.0f - (1.0f - alpha) * (1.0f - underAccumulator.a); } @@ -111,5 +110,5 @@ void main() drawBlendingExample(ui); vec4 background = vec4(0.7f, 0.4f, 0.4f, 1.0f); - gl_FragColor = lerp(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); + gl_FragColor = mix(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); } diff --git a/examples/54-s2h/fs_s2h_3d.sc b/examples/54-s2h/fs_s2h_3d.sc index 7bc0eb0de..bb7f08186 100644 --- a/examples/54-s2h/fs_s2h_3d.sc +++ b/examples/54-s2h/fs_s2h_3d.sc @@ -2,9 +2,7 @@ $input v_color0, v_texcoord0 // Self-contained fragment-renderer port of Features/3D_example.hlsl. #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" -#include "s2h_3d.hlsl" +#include "s2h/s2h_3d.sh" uniform vec4 u_s2hTime; @@ -28,9 +26,7 @@ mat4 lookAt(vec3 _eye, vec3 _target, vec3 _up) vec3 zaxis = safeNormalize(_target - _eye); vec3 xaxis = safeNormalize(cross(_up, zaxis)); vec3 yaxis = cross(zaxis, xaxis); - // HLSL mat4 constructors receive rows, while GLSL mat4 constructors - // receive columns. s2h_drawBasis expects world-space basis vectors in the - // matrix columns, so only the HLSL path needs the transpose. + // HLSL mat4 constructors receive rows, GLSL receives columns. #if BGFX_SHADER_LANGUAGE_GLSL return mat4(vec4(xaxis, 0.0f), vec4(yaxis, 0.0f), vec4(zaxis, 0.0f), vec4(_eye, 1.0f)); #else @@ -73,7 +69,7 @@ void main() s2h_printFloat(ui, cameraPosition.y); s2h_printTxt(ui, _COMMA); s2h_printFloat(ui, cameraPosition.z); - vec3 color = lerp(vec3(0.0f, 0.0f, 0.0f), context.dstColor.rgb, context.dstColor.a); + vec3 color = mix(vec3(0.0f, 0.0f, 0.0f), context.dstColor.rgb, context.dstColor.a); color = color * (1.0f - ui.dstColor.a) + ui.dstColor.rgb; gl_FragColor = vec4(s2h_accurateLinearToSRGB(color), 1.0f); } diff --git a/examples/54-s2h/fs_s2h_arrow.sc b/examples/54-s2h/fs_s2h_arrow.sc index 8817e68e5..e4573032b 100644 --- a/examples/54-s2h/fs_s2h_arrow.sc +++ b/examples/54-s2h/fs_s2h_arrow.sc @@ -2,8 +2,7 @@ $input v_color0, v_texcoord0 // Port of ShaderToHuman-bgfx/examples/Features/2D_Arrow.hlsl. #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" +#include "s2h/s2h.sh" uniform vec4 u_s2hMouse; @@ -65,5 +64,5 @@ void main() s2h_drawArrow(ui, screenCenter, screenCenter + oppositeDirection * lineLength, vec4(1.0f, 0.0f, 0.0f, 1.0f), arrowHeadLength, arrowHeadWidth); vec4 background = vec4(0.5f, 0.5f, 0.5f, 1.0f); - gl_FragColor = lerp(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); + gl_FragColor = mix(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); } diff --git a/examples/54-s2h/fs_s2h_clear.sc b/examples/54-s2h/fs_s2h_clear.sc index 31755f920..9f6c4335e 100644 --- a/examples/54-s2h/fs_s2h_clear.sc +++ b/examples/54-s2h/fs_s2h_clear.sc @@ -2,9 +2,7 @@ $input v_color0, v_texcoord0 // Self-contained fragment-renderer port of Features/Clear_example.hlsl. #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" -#include "s2h_3d.hlsl" +#include "s2h/s2h_3d.sh" uniform vec4 u_s2hTime; diff --git a/examples/54-s2h/fs_s2h_coordinate_system.sc b/examples/54-s2h/fs_s2h_coordinate_system.sc index 1253943db..da2c25992 100644 --- a/examples/54-s2h/fs_s2h_coordinate_system.sc +++ b/examples/54-s2h/fs_s2h_coordinate_system.sc @@ -2,8 +2,7 @@ $input v_color0, v_texcoord0 // Port of ShaderToHuman-bgfx/examples/Features/2D_CoordinateSystem.hlsl. #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" +#include "s2h/s2h.sh" void main() { @@ -24,5 +23,5 @@ void main() s2h_printTxt(ui, _n, _a, _t, _e, _S, _y); s2h_printTxt(ui, _s, _t, _e, _m); - gl_FragColor = lerp(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); + gl_FragColor = mix(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); } diff --git a/examples/54-s2h/fs_s2h_debug_zoom.sc b/examples/54-s2h/fs_s2h_debug_zoom.sc index b8fe49df7..a07593a24 100644 --- a/examples/54-s2h/fs_s2h_debug_zoom.sc +++ b/examples/54-s2h/fs_s2h_debug_zoom.sc @@ -1,7 +1,7 @@ $input v_color0, v_texcoord0 #include "../common/common.sh" -#include "s2h_bgfx.sh" +#include "s2h/s2h_bgfx.sh" SAMPLER2D(s_quadPostColor, 0); uniform vec4 u_s2hMouse; @@ -17,10 +17,10 @@ void main() { vec2 sourcePixel = floor(mouse - vec2(8.0f, 8.0f) + panelLocal / 10.0f); color = texture2D(s_quadPostColor, (sourcePixel + 0.5f) / resolution).rgb; - vec2 cell = frac(panelLocal / 10.0f); + vec2 cell = fract(panelLocal / 10.0f); if (cell.x < 0.08f || cell.y < 0.08f) color = vec3(0.0f, 0.0f, 0.0f); } float crosshair = 1.0f - smoothstep(0.0f, 1.0f, min(abs(pixel.x - mouse.x), abs(pixel.y - mouse.y))); - color = lerp(color, vec3(1.0f, 1.0f, 1.0f), crosshair); + color = mix(color, vec3(1.0f, 1.0f, 1.0f), crosshair); gl_FragColor = vec4(color, 1.0f); } diff --git a/examples/54-s2h/fs_s2h_gather.sc b/examples/54-s2h/fs_s2h_gather.sc index 28c5ed93d..db062b05f 100644 --- a/examples/54-s2h/fs_s2h_gather.sc +++ b/examples/54-s2h/fs_s2h_gather.sc @@ -1,11 +1,9 @@ $input v_color0, v_texcoord0 // Port of ShaderToHuman-bgfx/examples/Features/Gather_example.hlsl. -// The original compute example stores its widget state in a UAV. This -// fullscreen version receives the same state from the ImGui host controls. +// Widget state comes from the ImGui host controls, not a UAV as in the original. #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" +#include "s2h/s2h.sh" uniform vec4 u_s2hTime; uniform vec4 u_s2hUiState; @@ -76,9 +74,7 @@ void main() vec3 sliderColor = u_s2hColor.rgb; #if BGFX_SHADER_LANGUAGE_WGSL - // shaderc's WGSL backend overflows its compiler stack when all of the - // nested S2H widget calls below are emitted together. Keep a compact, - // functional presentation for WebGPU; DX11 and GLSL use the full port. + // shaderc's WGSL backend overflows its compiler stack on the full port. s2h_printLF(ui); s2h_printLF(ui); s2h_printTxt(ui, _U, _I, _SPACE, _S, _t, _a); @@ -97,7 +93,7 @@ void main() s2h_printTxt(ui, _SPACE, _c, _h, _e, _c, _k); s2h_printLF(ui); s2h_printTxt(ui, _SPACE, _SPACE); - s2h_progress(ui, 5u, frac(u_s2hTime.x)); + s2h_progress(ui, 5u, fract(u_s2hTime.x)); s2h_printLF(ui); s2h_printTxt(ui, _SPACE, _SPACE); s2h_sliderFloat(ui, 8u, sliderAlpha, 0.0f, 1.0f); @@ -147,7 +143,7 @@ void main() s2h_printLF(ui); s2h_printLF(ui); s2h_printTxt(ui, _SPACE, _SPACE); - s2h_progress(ui, 5u, frac(u_s2hTime.x)); + s2h_progress(ui, 5u, fract(u_s2hTime.x)); s2h_printTxt(ui, _SPACE, _s, _2, _h, _UNDERSCORE, _p); s2h_printTxt(ui, _r, _o, _g, _r, _e, _s); s2h_printTxt(ui, _s); @@ -168,5 +164,5 @@ void main() #endif vec4 background = vec4(0.4f, 0.7f, 0.4f, 1.0f); - gl_FragColor = lerp(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); + gl_FragColor = mix(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); } diff --git a/examples/54-s2h/fs_s2h_generate_user_font.sc b/examples/54-s2h/fs_s2h_generate_user_font.sc index 79af0fe22..677d240ad 100644 --- a/examples/54-s2h/fs_s2h_generate_user_font.sc +++ b/examples/54-s2h/fs_s2h_generate_user_font.sc @@ -2,21 +2,20 @@ $input v_color0, v_texcoord0 // Port of ShaderToHuman-bgfx/examples/Features/GenUserFont_example.hlsl. #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" +#include "s2h/s2h.sh" uniform vec4 u_s2hTime; vec3 myMod(vec3 _x, vec3 _period) { - return frac(_x / _period) * _period; + return fract(_x / _period) * _period; } vec3 hsb2rgb(vec3 _color) { vec3 rgb = saturate(abs(myMod(_color.x * 6.0f + vec3(0.0f, 4.0f, 2.0f), vec3(6.0f, 6.0f, 6.0f)) - 3.0f) - 1.0f); rgb = rgb * rgb * (3.0f - 2.0f * rgb); - return _color.z * lerp(vec3(1.0f, 1.0f, 1.0f), rgb, _color.y); + return _color.z * mix(vec3(1.0f, 1.0f, 1.0f), rgb, _color.y); } void main() diff --git a/examples/54-s2h/fs_s2h_quadpost.sc b/examples/54-s2h/fs_s2h_quadpost.sc index 7092a7226..fabee7c9e 100644 --- a/examples/54-s2h/fs_s2h_quadpost.sc +++ b/examples/54-s2h/fs_s2h_quadpost.sc @@ -1,7 +1,7 @@ $input v_color0, v_texcoord0 #include "../common/common.sh" -#include "s2h_bgfx.sh" +#include "s2h/s2h_bgfx.sh" SAMPLER2D(s_quadPostColor, 0); uniform vec4 u_s2hMouse; @@ -13,6 +13,6 @@ void main() vec2 mouseUv = u_s2hMouse.xy / u_viewRect.zw; vec2 delta = uv - mouseUv; float highlight = 1.0f - smoothstep(0.02f, 0.025f, length(delta)); - color = lerp(color, vec3(1.0f, 1.0f, 0.0f), highlight); + color = mix(color, vec3(1.0f, 1.0f, 0.0f), highlight); gl_FragColor = vec4(color, 1.0f); } diff --git a/examples/54-s2h/fs_s2h_quadpost_scene.sc b/examples/54-s2h/fs_s2h_quadpost_scene.sc index ed64c33de..090c055ac 100644 --- a/examples/54-s2h/fs_s2h_quadpost_scene.sc +++ b/examples/54-s2h/fs_s2h_quadpost_scene.sc @@ -1,15 +1,15 @@ $input v_color0, v_texcoord0 #include "../common/common.sh" -#include "s2h_bgfx.sh" +#include "s2h/s2h_bgfx.sh" uniform vec4 u_s2hTime; void main() { vec2 uv = v_texcoord0; - float grid = step(0.96f, frac(uv.x * 10.0f)) + step(0.96f, frac(uv.y * 10.0f)); + float grid = step(0.96f, fract(uv.x * 10.0f)) + step(0.96f, fract(uv.y * 10.0f)); float wave = 0.5f + 0.5f * sin(u_s2hTime.x + uv.x * 8.0f + uv.y * 5.0f); - vec3 color = lerp(vec3(0.06f, 0.1f, 0.25f), vec3(0.9f, 0.25f, 0.1f), wave); - gl_FragColor = vec4(lerp(color, vec3(1.0f, 1.0f, 1.0f), grid), 1.0f); + vec3 color = mix(vec3(0.06f, 0.1f, 0.25f), vec3(0.9f, 0.25f, 0.1f), wave); + gl_FragColor = vec4(mix(color, vec3(1.0f, 1.0f, 1.0f), grid), 1.0f); } diff --git a/examples/54-s2h/fs_s2h_quadvsps.sc b/examples/54-s2h/fs_s2h_quadvsps.sc index 9b7b23f75..9404b67e4 100644 --- a/examples/54-s2h/fs_s2h_quadvsps.sc +++ b/examples/54-s2h/fs_s2h_quadvsps.sc @@ -1,8 +1,7 @@ $input v_color0, v_texcoord0 #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" +#include "s2h/s2h.sh" uniform vec4 u_s2hTime; uniform vec4 u_s2hMouse; @@ -11,7 +10,7 @@ void main() { vec2 edge = min(v_texcoord0, 1.0f - v_texcoord0); float border = 1.0f - smoothstep(0.008f, 0.018f, min(edge.x, edge.y)); - vec3 color = lerp(vec3(0.03f, 0.04f, 0.08f), vec3(1.0f, 0.0f, 1.0f), border * 0.4f); + vec3 color = mix(vec3(0.03f, 0.04f, 0.08f), vec3(1.0f, 0.0f, 1.0f), border * 0.4f); ContextGather ui; s2h_init(ui, s2h_getPixelCoord(gl_FragCoord.xy)); @@ -27,6 +26,6 @@ void main() s2h_printLF(ui); s2h_printTxt(ui, _t, _i, _m, _e, _COLON, _SPACE); s2h_printFloat(ui, u_s2hTime.x); - color = lerp(color, ui.dstColor.rgb, ui.dstColor.a); + color = mix(color, ui.dstColor.rgb, ui.dstColor.a); gl_FragColor = vec4(color, 1.0f); } diff --git a/examples/54-s2h/fs_s2h_screen.sc b/examples/54-s2h/fs_s2h_screen.sc index d24726894..4051e9a2b 100644 --- a/examples/54-s2h/fs_s2h_screen.sc +++ b/examples/54-s2h/fs_s2h_screen.sc @@ -2,8 +2,7 @@ $input v_color0, v_texcoord0 // Port of ShaderToHuman-bgfx/examples/HelloScreenVSPS/HelloWorldPS.hlsl. #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" +#include "s2h/s2h.sh" void main() { @@ -22,5 +21,5 @@ void main() s2h_drawSRGBRamp(ui, vec2(10.0f, 100.0f)); vec4 background = vec4(uv.x, uv.y, 0.0f, 1.0f); - gl_FragColor = lerp(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); + gl_FragColor = mix(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); } diff --git a/examples/54-s2h/fs_s2h_table.sc b/examples/54-s2h/fs_s2h_table.sc index 5a48f2f3c..d157fe872 100644 --- a/examples/54-s2h/fs_s2h_table.sc +++ b/examples/54-s2h/fs_s2h_table.sc @@ -2,8 +2,7 @@ $input v_color0, v_texcoord0 // Port of ShaderToHuman-bgfx/examples/Features/Table_example.hlsl. #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" +#include "s2h/s2h.sh" uniform vec4 u_s2hTime; @@ -102,5 +101,5 @@ void main() s2h_printTxt(ui, _y, _COLON, _SPACE); s2h_printFloat(ui, rangeY.x); s2h_printTxt(ui, _SPACE, _PERIOD, _PERIOD, _SPACE); s2h_printFloat(ui, rangeY.y); vec4 background = vec4(0.4f, 0.7f, 0.4f, 1.0f); - gl_FragColor = lerp(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); + gl_FragColor = mix(background, vec4(ui.dstColor.rgb, 1.0f), ui.dstColor.a); } diff --git a/examples/54-s2h/fs_s2h_use_user_font.sc b/examples/54-s2h/fs_s2h_use_user_font.sc index 85d5924b4..be5f43278 100644 --- a/examples/54-s2h/fs_s2h_use_user_font.sc +++ b/examples/54-s2h/fs_s2h_use_user_font.sc @@ -1,7 +1,7 @@ $input v_color0, v_texcoord0 #include "../common/common.sh" -#include "s2h_bgfx.sh" +#include "s2h/s2h_bgfx.sh" SAMPLER2D(s_quadPostColor, 0); diff --git a/examples/54-s2h/fs_s2h_zoom2d.sc b/examples/54-s2h/fs_s2h_zoom2d.sc index 6059db77f..e80cf9c1f 100644 --- a/examples/54-s2h/fs_s2h_zoom2d.sc +++ b/examples/54-s2h/fs_s2h_zoom2d.sc @@ -2,14 +2,13 @@ $input v_color0, v_texcoord0 // Adapted from ShaderToHuman-bgfx/examples/Zoom2D/Render.hlsl. #include "../common/common.sh" -#include "s2h_bgfx.sh" -#include "s2h.hlsl" +#include "s2h/s2h.sh" uniform vec4 u_s2hZoom; float grid(vec2 _position, float _scale) { - vec2 local = abs(frac(_position / 20.0f) - 0.5f); + vec2 local = abs(fract(_position / 20.0f) - 0.5f); float gridLine = 1.0f - smoothstep(0.46f, 0.50f, max(local.x, local.y)); return gridLine * saturate((_scale - 2.0f) / 6.0f); } @@ -21,7 +20,7 @@ void main() vec2 zoomedPixel = (pixel + u_s2hZoom.xy) * zoomScale; vec2 snappedPixel = floor(zoomedPixel) + 0.5f; vec3 color = vec3(0.01f, 0.01f, 0.10f); - color = lerp(color, vec3(0.22f, 0.25f, 0.35f), grid(zoomedPixel, zoomScale)); + color = mix(color, vec3(0.22f, 0.25f, 0.35f), grid(zoomedPixel, zoomScale)); ContextGather ui; s2h_init(ui, snappedPixel); @@ -32,7 +31,7 @@ void main() s2h_printTxt(ui, _c, _o, _o, _r, _d, _i); s2h_printTxt(ui, _n, _a, _t, _e, _S, _y); s2h_printTxt(ui, _s, _t, _e, _m); - color = lerp(color, ui.dstColor.rgb, ui.dstColor.a); + color = mix(color, ui.dstColor.rgb, ui.dstColor.a); ContextGather overlay; s2h_init(overlay, pixel); @@ -50,7 +49,7 @@ void main() s2h_printTxt(overlay, _r, _i, _g, _h, _t, _SPACE); s2h_printTxt(overlay, _M, _o, _u, _s, _e, _COLON); s2h_printTxt(overlay, _SPACE, _S, _c, _a, _l, _e); - color = lerp(color, overlay.dstColor.rgb, overlay.dstColor.a); + color = mix(color, overlay.dstColor.rgb, overlay.dstColor.a); gl_FragColor = vec4(color, 1.0f); } diff --git a/examples/54-s2h/s2h.cpp b/examples/54-s2h/s2h.cpp index d9407bcba..465804f27 100644 --- a/examples/54-s2h/s2h.cpp +++ b/examples/54-s2h/s2h.cpp @@ -121,34 +121,36 @@ public: { program = BGFX_INVALID_HANDLE; } - m_timeUniform = bgfx::createUniform("u_s2hTime", bgfx::UniformFreq::View, bgfx::UniformType::Vec4); - m_uiStateUniform = bgfx::createUniform("u_s2hUiState", bgfx::UniformFreq::View, bgfx::UniformType::Vec4); - m_colorUniform = bgfx::createUniform("u_s2hColor", bgfx::UniformFreq::View, bgfx::UniformType::Vec4); - m_mouseUniform = bgfx::createUniform("u_s2hMouse", bgfx::UniformFreq::View, bgfx::UniformType::Vec4); - m_zoomUniform = bgfx::createUniform("u_s2hZoom", bgfx::UniformFreq::View, bgfx::UniformType::Vec4); - m_program[0] = loadProgram("vs_s2h", "fs_s2h_3d"); - m_program[1] = loadProgram("vs_s2h", "fs_s2h_2d"); - m_program[2] = loadProgram("vs_s2h", "fs_s2h_gather"); - m_program[5] = loadProgram("vs_s2h", "fs_s2h_quadvsps"); - m_program[6] = loadProgram("vs_s2h", "fs_s2h_table"); - m_program[7] = loadProgram("vs_s2h", "fs_s2h_quadpost_scene"); - m_program[8] = loadProgram("vs_s2h", "fs_s2h_arrow"); - m_program[9] = loadProgram("vs_s2h", "fs_s2h_generate_user_font"); + m_timeUniform = bgfx::createUniform("u_s2hTime", bgfx::UniformFreq::Frame, bgfx::UniformType::Vec4); + m_uiStateUniform = bgfx::createUniform("u_s2hUiState", bgfx::UniformFreq::Frame, bgfx::UniformType::Vec4); + m_colorUniform = bgfx::createUniform("u_s2hColor", bgfx::UniformFreq::Frame, bgfx::UniformType::Vec4); + m_mouseUniform = bgfx::createUniform("u_s2hMouse", bgfx::UniformFreq::Frame, bgfx::UniformType::Vec4); + m_zoomUniform = bgfx::createUniform("u_s2hZoom", bgfx::UniformFreq::Frame, bgfx::UniformType::Vec4); + m_scatterSizeUniform = bgfx::createUniform("u_s2hScatterSize", bgfx::UniformFreq::Frame, bgfx::UniformType::Vec4); + m_quadPostSampler = bgfx::createUniform("s_quadPostColor", bgfx::UniformType::Sampler); + m_scatterSampler = bgfx::createUniform("s_scatterColor", bgfx::UniformType::Sampler); + + m_program[ 0] = loadProgram("vs_s2h", "fs_s2h_3d"); + m_program[ 1] = loadProgram("vs_s2h", "fs_s2h_2d"); + m_program[ 2] = loadProgram("vs_s2h", "fs_s2h_gather"); + m_program[ 5] = loadProgram("vs_s2h", "fs_s2h_quadvsps"); + m_program[ 6] = loadProgram("vs_s2h", "fs_s2h_table"); + m_program[ 7] = loadProgram("vs_s2h", "fs_s2h_quadpost_scene"); + m_program[ 8] = loadProgram("vs_s2h", "fs_s2h_arrow"); + m_program[ 9] = loadProgram("vs_s2h", "fs_s2h_generate_user_font"); m_program[11] = loadProgram("vs_s2h", "fs_s2h_coordinate_system"); m_program[12] = loadProgram("vs_s2h", "fs_s2h"); m_program[13] = loadProgram("vs_s2h", "fs_s2h_screen"); m_program[14] = loadProgram("vs_s2h", "fs_s2h_clear"); m_program[15] = loadProgram("vs_s2h", "fs_s2h_zoom2d"); - m_quadPostProgram = loadProgram("vs_s2h", "fs_s2h_quadpost"); - m_userFontProgram = loadProgram("vs_s2h", "fs_s2h_use_user_font"); - m_debugZoomProgram = loadProgram("vs_s2h", "fs_s2h_debug_zoom"); - m_scatterClearProgram = loadProgram("cs_s2h_scatter_clear", NULL); - m_scatterProgram = loadProgram("cs_s2h_scatter", NULL); + m_quadPostProgram = loadProgram("vs_s2h", "fs_s2h_quadpost"); + m_userFontProgram = loadProgram("vs_s2h", "fs_s2h_use_user_font"); + m_debugZoomProgram = loadProgram("vs_s2h", "fs_s2h_debug_zoom"); + m_scatterClearProgram = loadProgram("cs_s2h_scatter_clear", NULL); + m_scatterProgram = loadProgram("cs_s2h_scatter", NULL); m_scatterDisplayProgram = loadProgram("vs_s2h", "fs_s2h_scatter_display"); - m_quadPostSampler = bgfx::createUniform("s_quadPostColor", bgfx::UniformType::Sampler); - m_scatterSampler = bgfx::createUniform("s_scatterColor", bgfx::UniformType::Sampler); - m_scatterSizeUniform = bgfx::createUniform("u_s2hScatterSize", bgfx::UniformFreq::View, bgfx::UniformType::Vec4); + createQuadPostTarget(); createScatterTarget(); @@ -159,6 +161,7 @@ public: int shutdown() override { imguiDestroy(); + for (bgfx::ProgramHandle& program : m_program) { if (bgfx::isValid(program) ) @@ -166,6 +169,7 @@ public: bgfx::destroy(program); } } + bgfx::destroy(m_quadPostProgram); bgfx::destroy(m_userFontProgram); bgfx::destroy(m_debugZoomProgram); @@ -183,7 +187,9 @@ public: bgfx::destroy(m_colorUniform); bgfx::destroy(m_mouseUniform); bgfx::destroy(m_zoomUniform); + bgfx::shutdown(); + return 0; } @@ -201,6 +207,7 @@ public: showExampleDialog(this); drawSettings(); + if (2 == m_example) { updateGatherControls(); @@ -219,6 +226,7 @@ public: 0.0f, 0.0f, }; + const float uiState[] = { float(m_gatherRadio), @@ -226,6 +234,7 @@ public: m_gatherColor[3], 0.0f, }; + const float mouse[] = { float(m_mouseState.m_mx), @@ -233,6 +242,7 @@ public: m_gatherMouseDown ? 1.0f : 0.0f, 0.0f, }; + const float zoom[] = { m_zoomPan[0], @@ -240,18 +250,26 @@ public: m_zoomScale, 0.0f, }; + const bool originBottomLeft = bgfx::getCaps()->originBottomLeft; + + const float scatterSize[] = { float(m_width), float(m_height), originBottomLeft ? 1.0f : 0.0f, 0.0f }; + + bgfx::setFrameUniform(m_timeUniform, time); + bgfx::setFrameUniform(m_uiStateUniform, uiState); + bgfx::setFrameUniform(m_colorUniform, m_gatherColor); + bgfx::setFrameUniform(m_mouseUniform, mouse); + bgfx::setFrameUniform(m_zoomUniform, zoom); + bgfx::setFrameUniform(m_scatterSizeUniform, scatterSize); + if (4 == m_example) { - const float scatterSize[] = { float(m_width), float(m_height), originBottomLeft ? 1.0f : 0.0f, 0.0f }; const uint32_t dispatchWidth = (m_width + 7) / 8; const uint32_t dispatchHeight = (m_height + 7) / 8; - bgfx::setViewUniform(2, m_scatterSizeUniform, scatterSize); bgfx::setImage(0, m_scatterTexture, 0, bgfx::Access::Write, bgfx::TextureFormat::RGBA8); bgfx::dispatch(2, m_scatterClearProgram, uint16_t(dispatchWidth), uint16_t(dispatchHeight) ); - bgfx::setViewUniform(3, m_scatterSizeUniform, scatterSize); bgfx::setImage(0, m_scatterTexture, 0, bgfx::Access::Write, bgfx::TextureFormat::RGBA8); bgfx::dispatch(3, m_scatterProgram, 1, 1); @@ -265,12 +283,10 @@ public: bgfx::setViewFrameBuffer(0, m_quadPostFrameBuffer); bgfx::setViewRect(0, 0, 0, uint16_t(m_width), uint16_t(m_height) ); bgfx::setViewClear(0, BGFX_CLEAR_COLOR, 0x101018ff); - bgfx::setViewUniform(0, m_timeUniform, time); renderScreenSpaceQuad(0, 10 == m_example ? m_program[9] : m_program[7]); bgfx::setViewFrameBuffer(1, BGFX_INVALID_HANDLE); bgfx::setViewRect(1, 0, 0, uint16_t(m_width), uint16_t(m_height) ); - bgfx::setViewUniform(1, m_mouseUniform, mouse); bgfx::setTexture(0, m_quadPostSampler, m_quadPostTexture); renderScreenSpaceQuad(1, 7 == m_example ? m_quadPostProgram : (10 == m_example ? m_userFontProgram : m_debugZoomProgram), originBottomLeft); } @@ -278,11 +294,7 @@ public: { bgfx::setViewFrameBuffer(0, BGFX_INVALID_HANDLE); bgfx::setViewRect(0, 0, 0, uint16_t(m_width), uint16_t(m_height) ); - bgfx::setViewUniform(0, m_timeUniform, time); - bgfx::setViewUniform(0, m_uiStateUniform, uiState); - bgfx::setViewUniform(0, m_colorUniform, m_gatherColor); - bgfx::setViewUniform(0, m_mouseUniform, mouse); - bgfx::setViewUniform(0, m_zoomUniform, zoom); + bgfx::touch(0); renderScreenSpaceQuad(0, m_program[m_example]); } @@ -417,8 +429,9 @@ public: { const int32_t mouseX = m_mouseState.m_mx; const int32_t mouseY = m_mouseState.m_my; - const bool leftDown = m_mouseState.m_buttons[entry::MouseButton::Left]; + const bool leftDown = m_mouseState.m_buttons[entry::MouseButton::Left]; const bool rightDown = m_mouseState.m_buttons[entry::MouseButton::Right]; + if (ImGui::GetIO().WantCaptureMouse) { m_zoomLastMouseX = mouseX; @@ -450,6 +463,7 @@ public: uint32_t m_debug; uint32_t m_reset; int m_example = 0; + bgfx::ProgramHandle m_program[BX_COUNTOF(s_exampleNames)]; bgfx::ProgramHandle m_quadPostProgram; bgfx::ProgramHandle m_userFontProgram; @@ -458,17 +472,21 @@ public: bgfx::ProgramHandle m_scatterProgram; bgfx::ProgramHandle m_scatterDisplayProgram; bgfx::TextureHandle m_quadPostTexture; + bgfx::FrameBufferHandle m_quadPostFrameBuffer; - bgfx::UniformHandle m_quadPostSampler; bgfx::TextureHandle m_scatterTexture; + + bgfx::UniformHandle m_quadPostSampler; bgfx::UniformHandle m_scatterSampler; bgfx::UniformHandle m_scatterSizeUniform; - FrameTime m_frameTime; bgfx::UniformHandle m_timeUniform; bgfx::UniformHandle m_uiStateUniform; bgfx::UniformHandle m_colorUniform; bgfx::UniformHandle m_mouseUniform; bgfx::UniformHandle m_zoomUniform; + + FrameTime m_frameTime; + int m_gatherRadio = 0; bool m_gatherCheckbox = false; bool m_gatherMouseDown = false; diff --git a/examples/common/s2h.hlsl b/examples/common/s2h/s2h.hlsl similarity index 100% rename from examples/common/s2h.hlsl rename to examples/common/s2h/s2h.hlsl diff --git a/examples/common/s2h/s2h.sh b/examples/common/s2h/s2h.sh new file mode 100644 index 000000000..007389d41 --- /dev/null +++ b/examples/common/s2h/s2h.sh @@ -0,0 +1,6 @@ +// S2H core library. The .hlsl sources are shared unchanged with HLSL +// integrations, so this is the entry point a bgfx shader includes. + +#include "s2h/s2h_bgfx.sh" +#include "s2h/s2h.hlsl" + diff --git a/examples/common/s2h_3d.hlsl b/examples/common/s2h/s2h_3d.hlsl similarity index 100% rename from examples/common/s2h_3d.hlsl rename to examples/common/s2h/s2h_3d.hlsl diff --git a/examples/common/s2h/s2h_3d.sh b/examples/common/s2h/s2h_3d.sh new file mode 100644 index 000000000..cefef9e4c --- /dev/null +++ b/examples/common/s2h/s2h_3d.sh @@ -0,0 +1,5 @@ +// S2H 3D module. + +#include "s2h/s2h.sh" +#include "s2h/s2h_3d.hlsl" + diff --git a/examples/common/s2h/s2h_bgfx.sh b/examples/common/s2h/s2h_bgfx.sh new file mode 100644 index 000000000..ab4558890 --- /dev/null +++ b/examples/common/s2h/s2h_bgfx.sh @@ -0,0 +1,31 @@ +// S2H bgfx shaderc compatibility adapter. For the S2H library itself include +// s2h/s2h.sh, s2h/s2h_3d.sh or s2h/s2h_scatter.sh. + +#ifndef S2H_BGFX_INCLUDE +#define S2H_BGFX_INCLUDE + +#include + +#define S2H_BGFX 1 +#define S2H_LOOP LOOP + +// shaderc's generated HLSL does not permit asfloat() in a global const +// initializer. +#define S2H_FLT_MAX 1.0e30f + +#include "s2h/s2h_glsl.hlsl" + +// S2H uses a top-left pixel origin; bgfx_ndc.z is the OpenGL origin sign. +float2 s2h_getPixelCoord(float2 _fragmentCoord) +{ +#if BGFX_SHADER_LANGUAGE_GLSL + return float2( + _fragmentCoord.x + , mix(_fragmentCoord.y, u_viewRect.w - _fragmentCoord.y, 0.5f * (bgfx_ndc.z + 1.0f)) + ); +#else + return _fragmentCoord; +#endif // BGFX_SHADER_LANGUAGE_GLSL +} + +#endif // S2H_BGFX_INCLUDE diff --git a/examples/common/s2h_glsl.hlsl b/examples/common/s2h/s2h_glsl.hlsl similarity index 85% rename from examples/common/s2h_glsl.hlsl rename to examples/common/s2h/s2h_glsl.hlsl index 806149f45..6ff804ee2 100644 --- a/examples/common/s2h_glsl.hlsl +++ b/examples/common/s2h/s2h_glsl.hlsl @@ -14,32 +14,36 @@ #define float3x3 mat3 #define float4x4 mat4 #define lerp mix - // GLSL does not support static globals, while shaderc's non-GLSL targets - // need static const declarations for expressions such as _a = _A + 32u. - #if !defined(S2H_BGFX) || BGFX_SHADER_LANGUAGE_GLSL - #define static - #endif - #define rsqrt(_x) (1.0f / sqrt(_x)) - // bgfx provides its own mul macro. It must remain in control so matrix - // multiplication is translated correctly for every bgfx renderer. - #ifndef S2H_BGFX - #define mul(a,b) (a) * (b) - #endif - #if !defined(S2H_BGFX) || BGFX_SHADER_LANGUAGE_GLSL - #define atan2 atan - #endif + // GLSL does not support static globals, while shaderc's non-GLSL targets + // need static const declarations for expressions such as _a = _A + 32u. + #if !defined(S2H_BGFX) || BGFX_SHADER_LANGUAGE_GLSL + #define static + #endif + #define rsqrt(_x) (1.0f / sqrt(_x)) + // bgfx provides its own mul macro. It must remain in control so matrix + // multiplication is translated correctly for every bgfx renderer. + #ifndef S2H_BGFX + #define mul(a,b) (a) * (b) + #endif + // bgfx supplies atan2 on GLSL, and it is native everywhere else. + #ifndef S2H_BGFX + #define atan2 atan + #endif #define asuint floatBitsToUint #define asfloat uintBitsToFloat #endif #define sincos(x,s,c) {s=sin(x);c=cos(x);} -#define saturate(x) clamp(x,0.0f,1.0f) -// bgfx maps GLSL's fract() to HLSL's frac() for non-GLSL targets. Defining -// the inverse here on those targets creates a macro cycle that leaves fract() -// in generated DX11 HLSL. The alias is only needed when compiling GLSL. -#if !defined(S2H_BGFX) || BGFX_SHADER_LANGUAGE_GLSL - #define frac(x) fract(x) -#endif +// bgfx supplies saturate on GLSL, and it is native everywhere else. +#ifndef S2H_BGFX + #define saturate(x) clamp(x,0.0f,1.0f) +#endif +// bgfx maps GLSL's fract() to HLSL's frac() for non-GLSL targets. Defining +// the inverse here on those targets creates a macro cycle that leaves fract() +// in generated DX11 HLSL. The alias is only needed when compiling GLSL. +#if !defined(S2H_BGFX) || BGFX_SHADER_LANGUAGE_GLSL + #define frac(x) fract(x) +#endif #define groupshared shared #define WaveActiveSum subgroupAdd #define WaveGetLaneCount() gl_SubgroupSize diff --git a/examples/common/s2h_scatter.hlsl b/examples/common/s2h/s2h_scatter.hlsl similarity index 100% rename from examples/common/s2h_scatter.hlsl rename to examples/common/s2h/s2h_scatter.hlsl diff --git a/examples/common/s2h/s2h_scatter.sh b/examples/common/s2h/s2h_scatter.sh new file mode 100644 index 000000000..1b6a4da26 --- /dev/null +++ b/examples/common/s2h/s2h_scatter.sh @@ -0,0 +1,5 @@ +// S2H scatter module. + +#include "s2h/s2h.sh" +#include "s2h/s2h_scatter.hlsl" + diff --git a/examples/common/s2h_bgfx.sh b/examples/common/s2h_bgfx.sh deleted file mode 100644 index a5c5342f5..000000000 --- a/examples/common/s2h_bgfx.sh +++ /dev/null @@ -1,43 +0,0 @@ -////////////////////////////////////////////////////////////////////////// -// Shader To Human (S2H) - bgfx shaderc compatibility adapter // -////////////////////////////////////////////////////////////////////////// -// -// Include bgfx's common shader header before this adapter. It provides -// shaderc's portable mul() and LOOP macros used by S2H. -// -// #include "common.sh" -// #include "s2h_bgfx.sh" -// #include "s2h.hlsl" -// -// The S2H source files retain their HLSL extension so they can be shared -// unchanged with existing HLSL integrations. - -#ifndef S2H_BGFX_INCLUDE -#define S2H_BGFX_INCLUDE - -#define S2H_BGFX 1 -#define S2H_LOOP LOOP - -// shaderc's generated HLSL does not permit asfloat() in a global const -// initializer. This finite value is far beyond any practical scene depth and -// remains a literal expression on every shaderc backend. -#define S2H_FLT_MAX 1.0e30f - -#include "s2h_glsl.hlsl" - -// S2H examples use a top-left pixel origin to match their source tools and -// host mouse coordinates. u_viewRect is supplied by bgfx for every view; -// bgfx_ndc.z is the OpenGL origin sign (and is substituted by the GL renderer). -float2 s2h_getPixelCoord(float2 _fragmentCoord) -{ - #if BGFX_SHADER_LANGUAGE_GLSL - return float2( - _fragmentCoord.x - , mix(_fragmentCoord.y, u_viewRect.w - _fragmentCoord.y, 0.5f * (bgfx_ndc.z + 1.0f)) - ); - #else - return _fragmentCoord; - #endif // BGFX_SHADER_LANGUAGE_GLSL -} - -#endif // S2H_BGFX_INCLUDE diff --git a/examples/runtime/shaders/dxbc/cs_s2h_scatter.bin b/examples/runtime/shaders/dxbc/cs_s2h_scatter.bin index 0b200e6ff..8422f4305 100644 Binary files a/examples/runtime/shaders/dxbc/cs_s2h_scatter.bin and b/examples/runtime/shaders/dxbc/cs_s2h_scatter.bin differ diff --git a/examples/runtime/shaders/dxbc/cs_s2h_scatter_clear.bin b/examples/runtime/shaders/dxbc/cs_s2h_scatter_clear.bin index dc9ec6ddc..f89b4022b 100644 Binary files a/examples/runtime/shaders/dxbc/cs_s2h_scatter_clear.bin and b/examples/runtime/shaders/dxbc/cs_s2h_scatter_clear.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h.bin b/examples/runtime/shaders/dxbc/fs_s2h.bin index 9a72243b5..0527b06e6 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h.bin and b/examples/runtime/shaders/dxbc/fs_s2h.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_2d.bin b/examples/runtime/shaders/dxbc/fs_s2h_2d.bin index 0fbba7cb7..3271d2e8e 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_2d.bin and b/examples/runtime/shaders/dxbc/fs_s2h_2d.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_3d.bin b/examples/runtime/shaders/dxbc/fs_s2h_3d.bin index 037724274..834144e71 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_3d.bin and b/examples/runtime/shaders/dxbc/fs_s2h_3d.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_arrow.bin b/examples/runtime/shaders/dxbc/fs_s2h_arrow.bin index f01039cb5..7907e97ab 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_arrow.bin and b/examples/runtime/shaders/dxbc/fs_s2h_arrow.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_clear.bin b/examples/runtime/shaders/dxbc/fs_s2h_clear.bin index bd6abf8e1..94ce94e3f 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_clear.bin and b/examples/runtime/shaders/dxbc/fs_s2h_clear.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_coordinate_system.bin b/examples/runtime/shaders/dxbc/fs_s2h_coordinate_system.bin index d48102a11..01c6b145b 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_coordinate_system.bin and b/examples/runtime/shaders/dxbc/fs_s2h_coordinate_system.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_debug_zoom.bin b/examples/runtime/shaders/dxbc/fs_s2h_debug_zoom.bin index 7bf58b48c..d3720977f 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_debug_zoom.bin and b/examples/runtime/shaders/dxbc/fs_s2h_debug_zoom.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_gather.bin b/examples/runtime/shaders/dxbc/fs_s2h_gather.bin index 42da592f6..aa11ca335 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_gather.bin and b/examples/runtime/shaders/dxbc/fs_s2h_gather.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_generate_user_font.bin b/examples/runtime/shaders/dxbc/fs_s2h_generate_user_font.bin index 9393669f8..2d5892b0a 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_generate_user_font.bin and b/examples/runtime/shaders/dxbc/fs_s2h_generate_user_font.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_quadpost.bin b/examples/runtime/shaders/dxbc/fs_s2h_quadpost.bin index ed3287cee..b3a9fc6e0 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_quadpost.bin and b/examples/runtime/shaders/dxbc/fs_s2h_quadpost.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_quadpost_scene.bin b/examples/runtime/shaders/dxbc/fs_s2h_quadpost_scene.bin index 76cc32643..3112df8b4 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_quadpost_scene.bin and b/examples/runtime/shaders/dxbc/fs_s2h_quadpost_scene.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_quadvsps.bin b/examples/runtime/shaders/dxbc/fs_s2h_quadvsps.bin index 2ddf24a8e..c95e050e8 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_quadvsps.bin and b/examples/runtime/shaders/dxbc/fs_s2h_quadvsps.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_scatter_display.bin b/examples/runtime/shaders/dxbc/fs_s2h_scatter_display.bin index ec190afff..c1d261992 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_scatter_display.bin and b/examples/runtime/shaders/dxbc/fs_s2h_scatter_display.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_screen.bin b/examples/runtime/shaders/dxbc/fs_s2h_screen.bin index 06fa22068..dabd9a2fd 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_screen.bin and b/examples/runtime/shaders/dxbc/fs_s2h_screen.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_table.bin b/examples/runtime/shaders/dxbc/fs_s2h_table.bin index 50ff5bcfc..bced5702e 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_table.bin and b/examples/runtime/shaders/dxbc/fs_s2h_table.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_use_user_font.bin b/examples/runtime/shaders/dxbc/fs_s2h_use_user_font.bin index f2417db71..e4a533b23 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_use_user_font.bin and b/examples/runtime/shaders/dxbc/fs_s2h_use_user_font.bin differ diff --git a/examples/runtime/shaders/dxbc/fs_s2h_zoom2d.bin b/examples/runtime/shaders/dxbc/fs_s2h_zoom2d.bin index bda98f3f8..5cb190147 100644 Binary files a/examples/runtime/shaders/dxbc/fs_s2h_zoom2d.bin and b/examples/runtime/shaders/dxbc/fs_s2h_zoom2d.bin differ diff --git a/examples/runtime/shaders/dxbc/vs_s2h.bin b/examples/runtime/shaders/dxbc/vs_s2h.bin index b86bcea16..b1d55423e 100644 Binary files a/examples/runtime/shaders/dxbc/vs_s2h.bin and b/examples/runtime/shaders/dxbc/vs_s2h.bin differ diff --git a/examples/runtime/shaders/dxil/cs_s2h_scatter.bin b/examples/runtime/shaders/dxil/cs_s2h_scatter.bin index f2ea80520..be5354cd5 100644 Binary files a/examples/runtime/shaders/dxil/cs_s2h_scatter.bin and b/examples/runtime/shaders/dxil/cs_s2h_scatter.bin differ diff --git a/examples/runtime/shaders/dxil/cs_s2h_scatter_clear.bin b/examples/runtime/shaders/dxil/cs_s2h_scatter_clear.bin index 6d7f9a4ba..c4d04310e 100644 Binary files a/examples/runtime/shaders/dxil/cs_s2h_scatter_clear.bin and b/examples/runtime/shaders/dxil/cs_s2h_scatter_clear.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h.bin b/examples/runtime/shaders/dxil/fs_s2h.bin index 34d1732c6..86b14c55f 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h.bin and b/examples/runtime/shaders/dxil/fs_s2h.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_2d.bin b/examples/runtime/shaders/dxil/fs_s2h_2d.bin index 76f1a066f..ae89911a3 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_2d.bin and b/examples/runtime/shaders/dxil/fs_s2h_2d.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_3d.bin b/examples/runtime/shaders/dxil/fs_s2h_3d.bin index 8b5ac394e..f105f4d83 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_3d.bin and b/examples/runtime/shaders/dxil/fs_s2h_3d.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_arrow.bin b/examples/runtime/shaders/dxil/fs_s2h_arrow.bin index 52daf8496..df4afb3c5 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_arrow.bin and b/examples/runtime/shaders/dxil/fs_s2h_arrow.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_clear.bin b/examples/runtime/shaders/dxil/fs_s2h_clear.bin index a327b14ba..a3441a97f 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_clear.bin and b/examples/runtime/shaders/dxil/fs_s2h_clear.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_coordinate_system.bin b/examples/runtime/shaders/dxil/fs_s2h_coordinate_system.bin index 16f02bddf..b2cd5dabe 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_coordinate_system.bin and b/examples/runtime/shaders/dxil/fs_s2h_coordinate_system.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_debug_zoom.bin b/examples/runtime/shaders/dxil/fs_s2h_debug_zoom.bin index fedc69151..43078c584 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_debug_zoom.bin and b/examples/runtime/shaders/dxil/fs_s2h_debug_zoom.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_gather.bin b/examples/runtime/shaders/dxil/fs_s2h_gather.bin index 405da1529..a45d5f545 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_gather.bin and b/examples/runtime/shaders/dxil/fs_s2h_gather.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_generate_user_font.bin b/examples/runtime/shaders/dxil/fs_s2h_generate_user_font.bin index f7261b587..08c4bcc05 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_generate_user_font.bin and b/examples/runtime/shaders/dxil/fs_s2h_generate_user_font.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_quadpost.bin b/examples/runtime/shaders/dxil/fs_s2h_quadpost.bin index 1bfd8e2c7..ee7afa088 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_quadpost.bin and b/examples/runtime/shaders/dxil/fs_s2h_quadpost.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_quadpost_scene.bin b/examples/runtime/shaders/dxil/fs_s2h_quadpost_scene.bin index 589c2e052..589eeb46e 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_quadpost_scene.bin and b/examples/runtime/shaders/dxil/fs_s2h_quadpost_scene.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_quadvsps.bin b/examples/runtime/shaders/dxil/fs_s2h_quadvsps.bin index 9a1eddd40..f1844dac4 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_quadvsps.bin and b/examples/runtime/shaders/dxil/fs_s2h_quadvsps.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_scatter_display.bin b/examples/runtime/shaders/dxil/fs_s2h_scatter_display.bin index 58f94ed4d..275987a1d 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_scatter_display.bin and b/examples/runtime/shaders/dxil/fs_s2h_scatter_display.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_screen.bin b/examples/runtime/shaders/dxil/fs_s2h_screen.bin index 1d84489f1..29724e60b 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_screen.bin and b/examples/runtime/shaders/dxil/fs_s2h_screen.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_table.bin b/examples/runtime/shaders/dxil/fs_s2h_table.bin index 8d7f09f91..eb3d33822 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_table.bin and b/examples/runtime/shaders/dxil/fs_s2h_table.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_use_user_font.bin b/examples/runtime/shaders/dxil/fs_s2h_use_user_font.bin index 16ee815db..8b36a72b9 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_use_user_font.bin and b/examples/runtime/shaders/dxil/fs_s2h_use_user_font.bin differ diff --git a/examples/runtime/shaders/dxil/fs_s2h_zoom2d.bin b/examples/runtime/shaders/dxil/fs_s2h_zoom2d.bin index 40d7ea390..0dbc3bbe6 100644 Binary files a/examples/runtime/shaders/dxil/fs_s2h_zoom2d.bin and b/examples/runtime/shaders/dxil/fs_s2h_zoom2d.bin differ diff --git a/examples/runtime/shaders/dxil/vs_s2h.bin b/examples/runtime/shaders/dxil/vs_s2h.bin index b3ae63dc4..3934e3987 100644 Binary files a/examples/runtime/shaders/dxil/vs_s2h.bin and b/examples/runtime/shaders/dxil/vs_s2h.bin differ diff --git a/examples/runtime/shaders/essl/cs_s2h_scatter.bin b/examples/runtime/shaders/essl/cs_s2h_scatter.bin new file mode 100644 index 000000000..e40be8de8 Binary files /dev/null and b/examples/runtime/shaders/essl/cs_s2h_scatter.bin differ diff --git a/examples/runtime/shaders/essl/cs_s2h_scatter_clear.bin b/examples/runtime/shaders/essl/cs_s2h_scatter_clear.bin new file mode 100644 index 000000000..90f2beb37 Binary files /dev/null and b/examples/runtime/shaders/essl/cs_s2h_scatter_clear.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h.bin b/examples/runtime/shaders/essl/fs_s2h.bin index b3326c551..591cfb5f4 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h.bin and b/examples/runtime/shaders/essl/fs_s2h.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_2d.bin b/examples/runtime/shaders/essl/fs_s2h_2d.bin index 5b34a187f..8be50b50f 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_2d.bin and b/examples/runtime/shaders/essl/fs_s2h_2d.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_3d.bin b/examples/runtime/shaders/essl/fs_s2h_3d.bin index 9357cc373..2c14f7e32 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_3d.bin and b/examples/runtime/shaders/essl/fs_s2h_3d.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_arrow.bin b/examples/runtime/shaders/essl/fs_s2h_arrow.bin index 3f78ecc92..6b9575dca 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_arrow.bin and b/examples/runtime/shaders/essl/fs_s2h_arrow.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_clear.bin b/examples/runtime/shaders/essl/fs_s2h_clear.bin index 53135309a..79c8c5bd9 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_clear.bin and b/examples/runtime/shaders/essl/fs_s2h_clear.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_coordinate_system.bin b/examples/runtime/shaders/essl/fs_s2h_coordinate_system.bin index 3cecd1295..09fb35c71 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_coordinate_system.bin and b/examples/runtime/shaders/essl/fs_s2h_coordinate_system.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_debug_zoom.bin b/examples/runtime/shaders/essl/fs_s2h_debug_zoom.bin index cabbcc8f5..2d84c86c1 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_debug_zoom.bin and b/examples/runtime/shaders/essl/fs_s2h_debug_zoom.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_gather.bin b/examples/runtime/shaders/essl/fs_s2h_gather.bin index 3e0f41808..6172d9dc6 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_gather.bin and b/examples/runtime/shaders/essl/fs_s2h_gather.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_generate_user_font.bin b/examples/runtime/shaders/essl/fs_s2h_generate_user_font.bin index d226af315..957db283f 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_generate_user_font.bin and b/examples/runtime/shaders/essl/fs_s2h_generate_user_font.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_quadpost.bin b/examples/runtime/shaders/essl/fs_s2h_quadpost.bin index 3624ebf98..1fc030afa 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_quadpost.bin and b/examples/runtime/shaders/essl/fs_s2h_quadpost.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_quadpost_scene.bin b/examples/runtime/shaders/essl/fs_s2h_quadpost_scene.bin index 3cefeeebb..b4587b07f 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_quadpost_scene.bin and b/examples/runtime/shaders/essl/fs_s2h_quadpost_scene.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_quadvsps.bin b/examples/runtime/shaders/essl/fs_s2h_quadvsps.bin index 904f642a3..f61b2cc60 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_quadvsps.bin and b/examples/runtime/shaders/essl/fs_s2h_quadvsps.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_scatter_display.bin b/examples/runtime/shaders/essl/fs_s2h_scatter_display.bin index 520fd48a5..0dcc1c05c 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_scatter_display.bin and b/examples/runtime/shaders/essl/fs_s2h_scatter_display.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_screen.bin b/examples/runtime/shaders/essl/fs_s2h_screen.bin index 460c694ec..52e882155 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_screen.bin and b/examples/runtime/shaders/essl/fs_s2h_screen.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_table.bin b/examples/runtime/shaders/essl/fs_s2h_table.bin index 402121c7f..ab8616551 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_table.bin and b/examples/runtime/shaders/essl/fs_s2h_table.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_use_user_font.bin b/examples/runtime/shaders/essl/fs_s2h_use_user_font.bin index d1998ca21..eb00d64da 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_use_user_font.bin and b/examples/runtime/shaders/essl/fs_s2h_use_user_font.bin differ diff --git a/examples/runtime/shaders/essl/fs_s2h_zoom2d.bin b/examples/runtime/shaders/essl/fs_s2h_zoom2d.bin index 59395558f..98042d5a8 100644 Binary files a/examples/runtime/shaders/essl/fs_s2h_zoom2d.bin and b/examples/runtime/shaders/essl/fs_s2h_zoom2d.bin differ diff --git a/examples/runtime/shaders/essl/vs_s2h.bin b/examples/runtime/shaders/essl/vs_s2h.bin index 73c9a8768..1e9b2c401 100644 Binary files a/examples/runtime/shaders/essl/vs_s2h.bin and b/examples/runtime/shaders/essl/vs_s2h.bin differ diff --git a/examples/runtime/shaders/glsl/cs_s2h_scatter.bin b/examples/runtime/shaders/glsl/cs_s2h_scatter.bin index 983737df2..45c6e0019 100644 Binary files a/examples/runtime/shaders/glsl/cs_s2h_scatter.bin and b/examples/runtime/shaders/glsl/cs_s2h_scatter.bin differ diff --git a/examples/runtime/shaders/glsl/cs_s2h_scatter_clear.bin b/examples/runtime/shaders/glsl/cs_s2h_scatter_clear.bin index a3f35e1a8..e8fdbcd40 100644 Binary files a/examples/runtime/shaders/glsl/cs_s2h_scatter_clear.bin and b/examples/runtime/shaders/glsl/cs_s2h_scatter_clear.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h.bin b/examples/runtime/shaders/glsl/fs_s2h.bin index d2688306a..ff8e6cf79 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h.bin and b/examples/runtime/shaders/glsl/fs_s2h.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_2d.bin b/examples/runtime/shaders/glsl/fs_s2h_2d.bin index d6438dfbb..63f51f27c 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_2d.bin and b/examples/runtime/shaders/glsl/fs_s2h_2d.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_3d.bin b/examples/runtime/shaders/glsl/fs_s2h_3d.bin index c53dfaef9..8e67d431f 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_3d.bin and b/examples/runtime/shaders/glsl/fs_s2h_3d.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_arrow.bin b/examples/runtime/shaders/glsl/fs_s2h_arrow.bin index e89ad5205..b8acefd5e 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_arrow.bin and b/examples/runtime/shaders/glsl/fs_s2h_arrow.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_clear.bin b/examples/runtime/shaders/glsl/fs_s2h_clear.bin index 2f52a4e7a..4a1abc2ac 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_clear.bin and b/examples/runtime/shaders/glsl/fs_s2h_clear.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_coordinate_system.bin b/examples/runtime/shaders/glsl/fs_s2h_coordinate_system.bin index f4adbd841..55fc133c3 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_coordinate_system.bin and b/examples/runtime/shaders/glsl/fs_s2h_coordinate_system.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_debug_zoom.bin b/examples/runtime/shaders/glsl/fs_s2h_debug_zoom.bin index f8b13a713..eba055120 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_debug_zoom.bin and b/examples/runtime/shaders/glsl/fs_s2h_debug_zoom.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_gather.bin b/examples/runtime/shaders/glsl/fs_s2h_gather.bin index 8b203c924..e5da14329 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_gather.bin and b/examples/runtime/shaders/glsl/fs_s2h_gather.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_generate_user_font.bin b/examples/runtime/shaders/glsl/fs_s2h_generate_user_font.bin index ebc3070de..4a3dafb94 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_generate_user_font.bin and b/examples/runtime/shaders/glsl/fs_s2h_generate_user_font.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_quadpost.bin b/examples/runtime/shaders/glsl/fs_s2h_quadpost.bin index 33a48fa26..67c60b6d2 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_quadpost.bin and b/examples/runtime/shaders/glsl/fs_s2h_quadpost.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_quadpost_scene.bin b/examples/runtime/shaders/glsl/fs_s2h_quadpost_scene.bin index 0fe484cc5..169050004 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_quadpost_scene.bin and b/examples/runtime/shaders/glsl/fs_s2h_quadpost_scene.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_quadvsps.bin b/examples/runtime/shaders/glsl/fs_s2h_quadvsps.bin index 4686528f9..43a635367 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_quadvsps.bin and b/examples/runtime/shaders/glsl/fs_s2h_quadvsps.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_scatter_display.bin b/examples/runtime/shaders/glsl/fs_s2h_scatter_display.bin index d351e03e7..c6f340039 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_scatter_display.bin and b/examples/runtime/shaders/glsl/fs_s2h_scatter_display.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_screen.bin b/examples/runtime/shaders/glsl/fs_s2h_screen.bin index 5bd40a630..a65160a4e 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_screen.bin and b/examples/runtime/shaders/glsl/fs_s2h_screen.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_table.bin b/examples/runtime/shaders/glsl/fs_s2h_table.bin index a9736d96c..5f7d2f89f 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_table.bin and b/examples/runtime/shaders/glsl/fs_s2h_table.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_use_user_font.bin b/examples/runtime/shaders/glsl/fs_s2h_use_user_font.bin index 6f329c00b..b74dacabf 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_use_user_font.bin and b/examples/runtime/shaders/glsl/fs_s2h_use_user_font.bin differ diff --git a/examples/runtime/shaders/glsl/fs_s2h_zoom2d.bin b/examples/runtime/shaders/glsl/fs_s2h_zoom2d.bin index 9706695cc..114922717 100644 Binary files a/examples/runtime/shaders/glsl/fs_s2h_zoom2d.bin and b/examples/runtime/shaders/glsl/fs_s2h_zoom2d.bin differ diff --git a/examples/runtime/shaders/glsl/vs_s2h.bin b/examples/runtime/shaders/glsl/vs_s2h.bin index 73c9a8768..1e9b2c401 100644 Binary files a/examples/runtime/shaders/glsl/vs_s2h.bin and b/examples/runtime/shaders/glsl/vs_s2h.bin differ diff --git a/examples/runtime/shaders/metal/cs_s2h_scatter.bin b/examples/runtime/shaders/metal/cs_s2h_scatter.bin new file mode 100644 index 000000000..afbb75fd5 Binary files /dev/null and b/examples/runtime/shaders/metal/cs_s2h_scatter.bin differ diff --git a/examples/runtime/shaders/metal/cs_s2h_scatter_clear.bin b/examples/runtime/shaders/metal/cs_s2h_scatter_clear.bin new file mode 100644 index 000000000..4be51c06b Binary files /dev/null and b/examples/runtime/shaders/metal/cs_s2h_scatter_clear.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h.bin b/examples/runtime/shaders/metal/fs_s2h.bin new file mode 100644 index 000000000..01e6100b1 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_2d.bin b/examples/runtime/shaders/metal/fs_s2h_2d.bin new file mode 100644 index 000000000..b0c2ddaa5 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_2d.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_3d.bin b/examples/runtime/shaders/metal/fs_s2h_3d.bin new file mode 100644 index 000000000..69d109699 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_3d.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_arrow.bin b/examples/runtime/shaders/metal/fs_s2h_arrow.bin new file mode 100644 index 000000000..7df11dbc8 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_arrow.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_clear.bin b/examples/runtime/shaders/metal/fs_s2h_clear.bin new file mode 100644 index 000000000..36b4c0473 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_clear.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_coordinate_system.bin b/examples/runtime/shaders/metal/fs_s2h_coordinate_system.bin new file mode 100644 index 000000000..0f2df64ed Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_coordinate_system.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_debug_zoom.bin b/examples/runtime/shaders/metal/fs_s2h_debug_zoom.bin new file mode 100644 index 000000000..250f21b61 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_debug_zoom.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_gather.bin b/examples/runtime/shaders/metal/fs_s2h_gather.bin new file mode 100644 index 000000000..8ceb5eee0 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_gather.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_generate_user_font.bin b/examples/runtime/shaders/metal/fs_s2h_generate_user_font.bin new file mode 100644 index 000000000..55450d142 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_generate_user_font.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_quadpost.bin b/examples/runtime/shaders/metal/fs_s2h_quadpost.bin new file mode 100644 index 000000000..4f913d214 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_quadpost.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_quadpost_scene.bin b/examples/runtime/shaders/metal/fs_s2h_quadpost_scene.bin new file mode 100644 index 000000000..d6bb7290d Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_quadpost_scene.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_quadvsps.bin b/examples/runtime/shaders/metal/fs_s2h_quadvsps.bin new file mode 100644 index 000000000..096fdf189 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_quadvsps.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_scatter_display.bin b/examples/runtime/shaders/metal/fs_s2h_scatter_display.bin new file mode 100644 index 000000000..b14801841 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_scatter_display.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_screen.bin b/examples/runtime/shaders/metal/fs_s2h_screen.bin new file mode 100644 index 000000000..cb92d44e4 Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_screen.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_table.bin b/examples/runtime/shaders/metal/fs_s2h_table.bin new file mode 100644 index 000000000..bd794168d Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_table.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_use_user_font.bin b/examples/runtime/shaders/metal/fs_s2h_use_user_font.bin new file mode 100644 index 000000000..12539386f Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_use_user_font.bin differ diff --git a/examples/runtime/shaders/metal/fs_s2h_zoom2d.bin b/examples/runtime/shaders/metal/fs_s2h_zoom2d.bin new file mode 100644 index 000000000..465f9e80f Binary files /dev/null and b/examples/runtime/shaders/metal/fs_s2h_zoom2d.bin differ diff --git a/examples/runtime/shaders/metal/vs_s2h.bin b/examples/runtime/shaders/metal/vs_s2h.bin new file mode 100644 index 000000000..60037f468 Binary files /dev/null and b/examples/runtime/shaders/metal/vs_s2h.bin differ diff --git a/examples/runtime/shaders/spirv/cs_s2h_scatter.bin b/examples/runtime/shaders/spirv/cs_s2h_scatter.bin index d9e979ca4..5021150dd 100644 Binary files a/examples/runtime/shaders/spirv/cs_s2h_scatter.bin and b/examples/runtime/shaders/spirv/cs_s2h_scatter.bin differ diff --git a/examples/runtime/shaders/spirv/cs_s2h_scatter_clear.bin b/examples/runtime/shaders/spirv/cs_s2h_scatter_clear.bin index a33246090..aa5f9c61e 100644 Binary files a/examples/runtime/shaders/spirv/cs_s2h_scatter_clear.bin and b/examples/runtime/shaders/spirv/cs_s2h_scatter_clear.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h.bin b/examples/runtime/shaders/spirv/fs_s2h.bin index ad971cf1a..2ca156cab 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h.bin and b/examples/runtime/shaders/spirv/fs_s2h.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_2d.bin b/examples/runtime/shaders/spirv/fs_s2h_2d.bin index 577b32586..aa0195d36 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_2d.bin and b/examples/runtime/shaders/spirv/fs_s2h_2d.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_3d.bin b/examples/runtime/shaders/spirv/fs_s2h_3d.bin index 00f783a9d..270ca2698 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_3d.bin and b/examples/runtime/shaders/spirv/fs_s2h_3d.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_arrow.bin b/examples/runtime/shaders/spirv/fs_s2h_arrow.bin index ae5282164..f45206039 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_arrow.bin and b/examples/runtime/shaders/spirv/fs_s2h_arrow.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_clear.bin b/examples/runtime/shaders/spirv/fs_s2h_clear.bin index 6074ae065..f12767b3d 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_clear.bin and b/examples/runtime/shaders/spirv/fs_s2h_clear.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_coordinate_system.bin b/examples/runtime/shaders/spirv/fs_s2h_coordinate_system.bin index c3351e99a..86f521c72 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_coordinate_system.bin and b/examples/runtime/shaders/spirv/fs_s2h_coordinate_system.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_debug_zoom.bin b/examples/runtime/shaders/spirv/fs_s2h_debug_zoom.bin index 4ae19494d..c188aa5f7 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_debug_zoom.bin and b/examples/runtime/shaders/spirv/fs_s2h_debug_zoom.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_gather.bin b/examples/runtime/shaders/spirv/fs_s2h_gather.bin index 1e2791899..0a727663f 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_gather.bin and b/examples/runtime/shaders/spirv/fs_s2h_gather.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_generate_user_font.bin b/examples/runtime/shaders/spirv/fs_s2h_generate_user_font.bin index c4f0ad27b..d32e907ce 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_generate_user_font.bin and b/examples/runtime/shaders/spirv/fs_s2h_generate_user_font.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_quadpost.bin b/examples/runtime/shaders/spirv/fs_s2h_quadpost.bin index 0eb0592fa..f2babbdb4 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_quadpost.bin and b/examples/runtime/shaders/spirv/fs_s2h_quadpost.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_quadpost_scene.bin b/examples/runtime/shaders/spirv/fs_s2h_quadpost_scene.bin index 3eea89b62..c8e5a4e79 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_quadpost_scene.bin and b/examples/runtime/shaders/spirv/fs_s2h_quadpost_scene.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_quadvsps.bin b/examples/runtime/shaders/spirv/fs_s2h_quadvsps.bin index 81a9118a5..826efb7a3 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_quadvsps.bin and b/examples/runtime/shaders/spirv/fs_s2h_quadvsps.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_scatter_display.bin b/examples/runtime/shaders/spirv/fs_s2h_scatter_display.bin index 47a7be680..2d51661bc 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_scatter_display.bin and b/examples/runtime/shaders/spirv/fs_s2h_scatter_display.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_screen.bin b/examples/runtime/shaders/spirv/fs_s2h_screen.bin index 6db2cc6e0..f7b871ffd 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_screen.bin and b/examples/runtime/shaders/spirv/fs_s2h_screen.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_table.bin b/examples/runtime/shaders/spirv/fs_s2h_table.bin index af960bf09..7687d9861 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_table.bin and b/examples/runtime/shaders/spirv/fs_s2h_table.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_use_user_font.bin b/examples/runtime/shaders/spirv/fs_s2h_use_user_font.bin index 4e200c17c..ad64d6b82 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_use_user_font.bin and b/examples/runtime/shaders/spirv/fs_s2h_use_user_font.bin differ diff --git a/examples/runtime/shaders/spirv/fs_s2h_zoom2d.bin b/examples/runtime/shaders/spirv/fs_s2h_zoom2d.bin index 153347918..2818d3147 100644 Binary files a/examples/runtime/shaders/spirv/fs_s2h_zoom2d.bin and b/examples/runtime/shaders/spirv/fs_s2h_zoom2d.bin differ diff --git a/examples/runtime/shaders/spirv/vs_s2h.bin b/examples/runtime/shaders/spirv/vs_s2h.bin index 94f6c0e3b..e67a7311c 100644 Binary files a/examples/runtime/shaders/spirv/vs_s2h.bin and b/examples/runtime/shaders/spirv/vs_s2h.bin differ diff --git a/examples/runtime/shaders/wgsl/cs_s2h_scatter.bin b/examples/runtime/shaders/wgsl/cs_s2h_scatter.bin index e809e7b39..78077b1e7 100644 Binary files a/examples/runtime/shaders/wgsl/cs_s2h_scatter.bin and b/examples/runtime/shaders/wgsl/cs_s2h_scatter.bin differ diff --git a/examples/runtime/shaders/wgsl/cs_s2h_scatter_clear.bin b/examples/runtime/shaders/wgsl/cs_s2h_scatter_clear.bin index 4eb981316..708acaa42 100644 Binary files a/examples/runtime/shaders/wgsl/cs_s2h_scatter_clear.bin and b/examples/runtime/shaders/wgsl/cs_s2h_scatter_clear.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h.bin b/examples/runtime/shaders/wgsl/fs_s2h.bin index 62b60deb6..e137f524f 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h.bin and b/examples/runtime/shaders/wgsl/fs_s2h.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_2d.bin b/examples/runtime/shaders/wgsl/fs_s2h_2d.bin index 7127d0d14..3649e05e1 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_2d.bin and b/examples/runtime/shaders/wgsl/fs_s2h_2d.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_3d.bin b/examples/runtime/shaders/wgsl/fs_s2h_3d.bin index b29665737..3b9b64734 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_3d.bin and b/examples/runtime/shaders/wgsl/fs_s2h_3d.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_arrow.bin b/examples/runtime/shaders/wgsl/fs_s2h_arrow.bin index 85d657617..ffcbd1ab9 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_arrow.bin and b/examples/runtime/shaders/wgsl/fs_s2h_arrow.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_clear.bin b/examples/runtime/shaders/wgsl/fs_s2h_clear.bin index 5399d38ff..c5818bf6f 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_clear.bin and b/examples/runtime/shaders/wgsl/fs_s2h_clear.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_coordinate_system.bin b/examples/runtime/shaders/wgsl/fs_s2h_coordinate_system.bin index d39937cde..d938c0eb6 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_coordinate_system.bin and b/examples/runtime/shaders/wgsl/fs_s2h_coordinate_system.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_debug_zoom.bin b/examples/runtime/shaders/wgsl/fs_s2h_debug_zoom.bin index 01740dbb0..5c98efa57 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_debug_zoom.bin and b/examples/runtime/shaders/wgsl/fs_s2h_debug_zoom.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_gather.bin b/examples/runtime/shaders/wgsl/fs_s2h_gather.bin index 5c35154c8..6b125ce9d 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_gather.bin and b/examples/runtime/shaders/wgsl/fs_s2h_gather.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_generate_user_font.bin b/examples/runtime/shaders/wgsl/fs_s2h_generate_user_font.bin index 2e95ec8f7..36dc01987 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_generate_user_font.bin and b/examples/runtime/shaders/wgsl/fs_s2h_generate_user_font.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_quadpost.bin b/examples/runtime/shaders/wgsl/fs_s2h_quadpost.bin index d87b53ee6..f4895fa4e 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_quadpost.bin and b/examples/runtime/shaders/wgsl/fs_s2h_quadpost.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_quadpost_scene.bin b/examples/runtime/shaders/wgsl/fs_s2h_quadpost_scene.bin index 8c8df8db9..24f3cf566 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_quadpost_scene.bin and b/examples/runtime/shaders/wgsl/fs_s2h_quadpost_scene.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_quadvsps.bin b/examples/runtime/shaders/wgsl/fs_s2h_quadvsps.bin index fa083fd2a..79af47847 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_quadvsps.bin and b/examples/runtime/shaders/wgsl/fs_s2h_quadvsps.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_scatter_display.bin b/examples/runtime/shaders/wgsl/fs_s2h_scatter_display.bin index 0500128cc..4fb9b2b04 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_scatter_display.bin and b/examples/runtime/shaders/wgsl/fs_s2h_scatter_display.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_screen.bin b/examples/runtime/shaders/wgsl/fs_s2h_screen.bin index 48cb61f92..66fb83847 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_screen.bin and b/examples/runtime/shaders/wgsl/fs_s2h_screen.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_table.bin b/examples/runtime/shaders/wgsl/fs_s2h_table.bin index 47a69be01..4761b32b1 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_table.bin and b/examples/runtime/shaders/wgsl/fs_s2h_table.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_use_user_font.bin b/examples/runtime/shaders/wgsl/fs_s2h_use_user_font.bin index e1fc9a798..07a877a30 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_use_user_font.bin and b/examples/runtime/shaders/wgsl/fs_s2h_use_user_font.bin differ diff --git a/examples/runtime/shaders/wgsl/fs_s2h_zoom2d.bin b/examples/runtime/shaders/wgsl/fs_s2h_zoom2d.bin index c3ee3d041..917a908cd 100644 Binary files a/examples/runtime/shaders/wgsl/fs_s2h_zoom2d.bin and b/examples/runtime/shaders/wgsl/fs_s2h_zoom2d.bin differ diff --git a/examples/runtime/shaders/wgsl/vs_s2h.bin b/examples/runtime/shaders/wgsl/vs_s2h.bin index 0c0ef42d7..6320c1cff 100644 Binary files a/examples/runtime/shaders/wgsl/vs_s2h.bin and b/examples/runtime/shaders/wgsl/vs_s2h.bin differ