mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-01-14 05:03:24 +01:00
[PR #46] [MERGED] Exclude photo from erasing strokes #58
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dscyrescotti/Memola/pull/46
Author: @dscyrescotti
Created: 6/18/2024
Status: ✅ Merged
Merged: 6/18/2024
Merged by: @dscyrescotti
Base:
main← Head:feature/photo-background-render📝 Commits (3)
efaf63bfeat: embed eraser stroke into stroke texturee5f7becfeat: add photo background render pass85f3519feat: generate quad texture programmatically📊 Changes
14 files changed (+155 additions, -26 deletions)
View changed files
📝
Memola.xcodeproj/project.pbxproj(+4 -0)📝
Memola/Canvas/Core/PipelineStates.swift(+1 -1)📝
Memola/Canvas/Core/Renderer.swift(+7 -0)📝
Memola/Canvas/Core/Textures.swift(+23 -0)📝
Memola/Canvas/Elements/Geometries/Stroke/Core/Stroke.swift(+6 -2)📝
Memola/Canvas/RenderPasses/GraphicRenderPass.swift(+14 -18)➕
Memola/Canvas/RenderPasses/PhotoBackgroundRenderPass.swift(+57 -0)📝
Memola/Canvas/RenderPasses/PhotoRenderPass.swift(+1 -0)📝
Memola/Canvas/RenderPasses/StrokeRenderPass.swift(+9 -0)📝
Memola/Canvas/RenderPasses/ViewPortRenderPass.swift(+9 -0)📝
Memola/Canvas/Shaders/Stroke.metal(+18 -0)📝
Memola/Canvas/Tool/Pen/Core/PenStyle.swift(+3 -2)📝
Memola/Canvas/Tool/Pen/PenStyles/EraserPenStyle.swift(+2 -2)📝
Memola/Canvas/Tool/Pen/PenStyles/MarkerPenStyle.swift(+1 -1)📄 Description
Description
This PR ensures eraser strokes are applied to marker strokes excluding photo content. Initially, it is intended to implement using stencil testing but it doesn't work well as expected. So, the background layer is added underneath the main content layer so that even though the photos there are erased, the hallow portion will be filled with the content from background layer.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.