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.
## 📋 Pull Request Information
**Original PR:** https://github.com/dscyrescotti/Memola/pull/46
**Author:** [@dscyrescotti](https://github.com/dscyrescotti)
**Created:** 6/18/2024
**Status:** ✅ Merged
**Merged:** 6/18/2024
**Merged by:** [@dscyrescotti](https://github.com/dscyrescotti)
**Base:** `main` ← **Head:** `feature/photo-background-render`
---
### 📝 Commits (3)
- [`efaf63b`](https://github.com/dscyrescotti/Memola/commit/efaf63b8824c60b7ff749508db715bde40be8c90) feat: embed eraser stroke into stroke texture
- [`e5f7bec`](https://github.com/dscyrescotti/Memola/commit/e5f7bec7754861d2232651b3b54f6849769ffa05) feat: add photo background render pass
- [`85f3519`](https://github.com/dscyrescotti/Memola/commit/85f3519b1481497c672c246d59117f1e22cce782) feat: generate quad texture programmatically
### 📊 Changes
**14 files changed** (+155 additions, -26 deletions)
<details>
<summary>View changed files</summary>
📝 `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)
</details>
### 📄 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.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 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.