Skip to content

Commit

Permalink
Revive the WebGL backend
Browse files Browse the repository at this point in the history
Always declare the clip buffer when using
WEBGL_shader_pixel_local_storage. The spec requires the shader to explicitly declare every plane that has been enabled.

Also fix some bit-rot in path_fiddle.

Diffs=
e1b4a53ec Revive the WebGL backend (#7948)

Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
  • Loading branch information
csmartdalton and csmartdalton committed Aug 26, 2024
1 parent d16683e commit aa19296
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
813db58e71b442a83574745cf6cc29e5d885b403
e1b4a53ecb34d62e9d4160e3040803173c2233b0
4 changes: 2 additions & 2 deletions pls/path_fiddle/fiddle_context_gl.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "fiddle_context.hpp"

#ifndef RIVE_DESKTOP_GL
#ifdef RIVE_TOOLS_NO_GLFW

std::unique_ptr<FiddleContext> FiddleContext::MakeGLPLS() { return nullptr; }

Expand Down Expand Up @@ -109,7 +109,7 @@ class FiddleContextGL : public FiddleContext

float dpiScale(GLFWwindow*) const override
{
#ifdef __APPLE__
#if defined(__APPLE__) || defined(RIVE_WEBGL)
return 2;
#else
return 1;
Expand Down
2 changes: 1 addition & 1 deletion pls/renderer/shaders/draw_image_mesh.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ FRAG_STORAGE_BUFFER_BLOCK_END

PLS_BLOCK_BEGIN
PLS_DECL4F(COLOR_PLANE_IDX, colorBuffer);
#ifdef @ENABLE_CLIPPING
#if defined(@ENABLE_CLIPPING) || defined(@PLS_IMPL_ANGLE)
PLS_DECLUI(CLIP_PLANE_IDX, clipBuffer);
#endif
PLS_DECL4F(SCRATCH_COLOR_PLANE_IDX, scratchColorBuffer);
Expand Down
2 changes: 1 addition & 1 deletion pls/renderer/shaders/draw_path.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ INLINE half4 find_paint_color(float4 paint

PLS_BLOCK_BEGIN
PLS_DECL4F(COLOR_PLANE_IDX, colorBuffer);
#ifdef @ENABLE_CLIPPING
#if defined(@ENABLE_CLIPPING) || defined(@PLS_IMPL_ANGLE)
PLS_DECLUI(CLIP_PLANE_IDX, clipBuffer);
#endif
PLS_DECL4F(SCRATCH_COLOR_PLANE_IDX, scratchColorBuffer);
Expand Down

0 comments on commit aa19296

Please sign in to comment.