Skip to content

Releases: mob-sakai/CompositeCanvasRenderer

1.0.0

06 Dec 06:10
Compare
Choose a tag to compare

1.0.0 (2023-12-06)

📝 Description

CompositeCanvasRenderer bakes multiple source graphics into a bake-buffer (RenderTexture) and renders it.

It also supports additional material modification, mesh modification, and baking effects, allowing you to enjoy effects that were challenging to implement with standard UI shaders, such as blur, soft outline, and soft shadow.

Key Features:

  • Bakes multiple source graphics into a RenderTexture as bake-buffer.
  • Utilizes the materials set on the source graphics during the baking process.
  • The bake-buffer is automatically baked as needed, or you can trigger manual baking with SetDirty().
  • Apply custom effects to the bake-buffer using a CommandBuffer after baking (as post-bake effect).
  • You can use custom materials for rendering the bake-buffer.

Let's enjoy a wide range of effects that were previously challenging to achieve with standard UI shaders!

Features

  • Efficiency: By combining multiple graphics into a bake-buffer, it reduces the number of draw calls and can significantly improve rendering performance.

  • Automated Baking: The bake-buffer is automatically generated as needed, simplifying the rendering process and reducing manual intervention.

  • Control: Users have the flexibility to manually trigger the baking process using SetDirty(), giving them control over when and how the graphics are baked.

  • Material Usage: It ensures that the materials set on the graphics are used during the baking process, maintaining visual consistency.

  • Post-Bake Effects: After baking, you can apply various effects to the bake buffer using a command buffer, allowing for additional visual enhancements or post-processing.

  • Built-in Effects: Several effects are available out of the box!

  • Custom Material Support: You can use custom materials for rendering the bake-buffer.

  • Foreground/Background Rendering: Supports both foreground and background rendering.

  • Color and Blend Mode: Allows you to change color modes and blend modes.

  • Quality and Performance Control: You can fine-tune quality and performance using the Down Sampling Rate parameter.

  • Perspective/Orthographic Rendering: Supports both perspective and orthographic rendering. In orthographic rendering (where relative position.z and relative rotation.xy are 0), baking is less frequent.

  • TextMeshPro Compatibility: Works seamlessly with TextMeshPro. <font> and <sprite> tags are supported, and it may also be compatible with other custom UI classes.

  • Editor Support: Enjoy a convenient editing experience with the ability to preview the bake buffer in the inspector and visualize the baking region in the scene view. You can also customize the behavior from the project settings.



🎮 Demo

WebGL Demo



⚙ Installation

This package requires Unity 2019.4 or later.

Install via OpenUPM

This package is available on OpenUPM package registry.
This is the preferred method of installation, as you can easily receive updates as they're released.

If you have openupm-cli installed, then run the following command in your project's directory:

openupm add com.coffee.composite-canvas-renderer

Install via UPM (using Git URL)

Navigate to your project's Packages folder and open the manifest.json file. Then add this package somewhere in the dependencies block:

{
  "dependencies": {
    "com.coffee.composite-canvas-renderer": "https://github.com/mob-sakai/CompositeCanvasRenderer.git?path=Packages/src",
    ...
  },
}

To update the package, change suffix #{version} to the target version.

  • e.g. "com.coffee.composite-canvas-renderer": "https://github.com/mob-sakai/CompositeCanvasRenderer.git?path=Packages/src#1.0.0",



Bug Fixes

  • bake-buffer is not displayed in inspector (6a5d5a2)
  • CompositeCanvasEffect has 'DisallowMultipleComponent' attribute (2ca5a91)
  • delayed extra callback (6cccbe4)
  • difficult to see when alpha is small (3c85252)
  • fix baking process (b7ce244)
  • fix compile error (9dc84e6)
  • fix typo 'extends' to 'extents' (6428cfe)
  • ignore disabled source graphics when baking (0812119)
  • material fix (374a933)
  • mesh error (2a6a316)
  • missing zw component when copying mesh (59215e2)
  • nested CanvasGroups make bake-buffer alpha smaller (f9eff35)
  • remove global cache (c33f2f6)
  • Remove unnecessary override property (3b01dff)
  • return intList (9394994)
  • rotation is ignored in orthographic mode. (9747fc1)
  • shared TextMeshPro material is not used (a94d4d0)
  • skip blur/cutoff phase if possible (c3379dd)
  • source graphics with scale.z = 0 will be not baked (c145db4)
  • support CanvasGroup.alpha for source graphic (5995eea)

Features

  • add 'bakingTrigger' option (automatic, manually, always, on enable) (d2f3d34)
  • add ignoreSelf and ignoreChildren options for source (2f8ccfb)
  • add blur effect (8d5df19)
  • add CompositeCanvasRenderer (acc0803)
  • add glow and bloom effects (4d4b441)
  • add group id to share the bake buffer (53f03a4)
  • add mirror effect (44df1cb)
  • add public 'orthographic' property (175eea9)
  • add relative mode (orthographic mode) (67aadba)
  • add shadow and outline effects (04c0f3f)
  • editor update (1a98bc4)
  • enable/disable culling for baking ([d2cb243](https...
Read more

1.0.0-preview.2

01 Dec 08:43
Compare
Choose a tag to compare
1.0.0-preview.2 Pre-release
Pre-release

1.0.0-preview.2 (2023-12-01)

Bug Fixes

  • bake-buffer is not displayed in inspector (6a5d5a2)
  • CompositeCanvasEffect has 'DisallowMultipleComponent' attribute (2ca5a91)
  • delayed extra callback (6cccbe4)
  • difficult to see when alpha is small (3c85252)
  • fix baking process (b7ce244)
  • fix compile error (9dc84e6)
  • fix typo 'extends' to 'extents' (6428cfe)
  • material fix (374a933)
  • mesh error (2a6a316)
  • missing zw component when copying mesh (59215e2)
  • nested CanvasGroups make bake-buffer alpha smaller (f9eff35)
  • remove global cache (c33f2f6)
  • Remove unnecessary override property (3b01dff)
  • return intList (9394994)
  • rotation is ignored in orthographic mode. (9747fc1)
  • shared TextMeshPro material is not used (a94d4d0)
  • skip blur/cutoff phase if possible (c3379dd)
  • source graphics with scale.z = 0 will be not baked (c145db4)
  • support CanvasGroup.alpha for source graphic (5995eea)

Features

  • add 'bakingTrigger' option (automatic, manually, always, on enable) (d2f3d34)
  • add ignoreSelf and ignoreChildren options for source (2f8ccfb)
  • add public 'orthographic' property (175eea9)
  • add relative mode (orthographic mode) (67aadba)
  • editor update (1a98bc4)
  • enable/disable culling for baking (d2cb243)
  • enable/disable upscaling buffer (e1008f2)
  • gizmo for orthographic baking (d5bed5a)
  • global culling (be0c648)
  • skip baking when ColorMask=0 (for masking) (5bc7064)
  • support IMeshModifier.ModifyMesh(Mesh) (39dedd7)
  • support Mask for baking (8015dcc)
  • TMP outline, glow, underlay support (e5abfa8)
  • TMP performance improve (cebe9fc)

1.0.0-preview.1

26 Oct 06:45
Compare
Choose a tag to compare
1.0.0-preview.1 Pre-release
Pre-release

1.0.0-preview.1 (2023-10-26)

Features