Can't get RenderTexture to work with mask
See original GitHub issueHey, I’m trying in v4 to get a texture of a masked graphic by another graphic, using this piece of code:
const container = new PIXI.Container()
const item = getBaseGraphic()
const mask = getMaskGraphic()
item.mask = bites
container.addChild(item)
container.addChild(mask)
const renderTexture = PIXI.RenderTexture.create(256, 256)
renderer.render(container, renderTexture)
return renderTexture
The problem is the texture is empty as long as I apply a mask on item
. If I comment out the mask
assignment, I get the texture but without the mask - just the 2 graphics on top of each other.
I’m using the WebGLRenderer
.
Any idea what am I doing wrong?
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (5 by maintainers)
Top Results From Across the Web
Are sprite masks incompatible with Render Textures?
I've just noticed on a new project that Sprite Masks don't seem to work when the camera renders to a texture via a...
Read more >Unity Camera Target Texture Render Texture How To Get ...
Every texture I render out from the camera doesn't have masks working. I can see the whole version of every graphic on the...
Read more >Practical Use of Render Textures - The Knights of Unity
For simple water, I have created a shader using depth buffer to mask out noise textures on the edges of other objects. With...
Read more >Phaser 3 API Documentation - Class: RenderTexture
Note that under WebGL a FrameBuffer, which is what the Render Texture uses internally, cannot be anti-aliased. This means that when drawing objects...
Read more >Need some help with shaders and RenderTexture for a ...
I'd like to use UdonSharp, but can't get intellisense working in VS Code. ... for the canvas that takes the brush mask (RenderTexture...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @ShayDavidson, this should be fixed now on the dev branch 👍
Howdi,
What’s the status on this one? I’m experiencing the same problem while using rounded rect masks with holes in it in menu layouts (using th new holes API in v5), so I guess the workaround wouldn’t work for me…