Skip to content

Commit

Permalink
potential fix for #86: also apply multisampling to boundary in order …
Browse files Browse the repository at this point in the history
…to *disable* multisampling properly. Unclear yet why outline only always needs multisampling
  • Loading branch information
haraldsteinlechner committed Nov 2, 2021
1 parent f2ea2d9 commit b51c8a6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 5.1.18

- disabled multisampling for text outline - fix for https://github.com/aardvark-platform/aardvark.rendering/issues/86

### 5.1.17
- fixed package dependeny to FSharp.Data.Adaptive
- [Vulkan] fixed package dependency to GLSLangSharp
Expand Down
20 changes: 18 additions & 2 deletions src/Aardvark.Rendering.Text/SceneGraph.fs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,14 @@ module Sg =
let pass = scope.RenderPass
let pass = if pass = RenderPass.main then RenderPass.shapes else pass

shapes.RasterizerState.Multisample <- AVal.map2 (fun a f -> not f || a) aa fill

let multisample =
(aa, fill) ||> AVal.map2 (fun a f ->
// @krauthaufen - why always multisampling when outline only?
not f || a
)

shapes.RasterizerState.Multisample <- multisample
shapes.RenderPass <- if pass = RenderPass.main then RenderPass.shapes else pass
shapes.BlendState.Mode <- AVal.constant BlendMode.Blend
shapes.VertexAttributes <- cache.VertexBuffers
Expand Down Expand Up @@ -364,7 +371,15 @@ module Sg =

let pass = scope.RenderPass
let pass = if pass = RenderPass.main then RenderPass.shapes else pass
shapes.RasterizerState.Multisample <- AVal.map2 (fun a f -> not f || a) aa fill


let multisample =
(aa, fill) ||> AVal.map2 (fun a f ->
// @krauthaufen - why always multisampling when outline only?
not f || a
)

shapes.RasterizerState.Multisample <- multisample
shapes.RenderPass <- pass
shapes.BlendState.Mode <- AVal.constant BlendMode.Blend
shapes.VertexAttributes <- cache.VertexBuffers
Expand All @@ -376,6 +391,7 @@ module Sg =
//shapes.WriteBuffers <- Some (Set.ofList [DefaultSemantic.Colors])

let boundary = RenderObject.ofScope scope
boundary.RasterizerState.Multisample <- multisample
boundary.RenderPass <- pass
boundary.BlendState.Mode <- AVal.constant BlendMode.Blend
boundary.VertexAttributes <- cache.VertexBuffers
Expand Down

0 comments on commit b51c8a6

Please sign in to comment.