Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Clear portion of RenderTarget — Gideros Forum

Clear portion of RenderTarget

antixantix Member
edited October 2015 in General questions
Hey all. Is it possible to clear an irregular portion of a RenderTarget?

I have drawn a small blue triangle (using a shape) to the RT. I now want to clear the area of the RT only where the triangle is (so I can see layers under it) but I don't seem to be able to figure it out.

If I draw the triangle using a black pen, then there is a black triangle on the RT.

Any ideas anyone?

Comments

  • hgy29hgy29 Maintainer
    Did you try to draw with transparent colour, and adequate blending mode ? Not sure wether gideros allows this or not...
  • @hgy29 - I tried using alpha but each time I draw a triangle that way, the area in the RT just gets darker. If I keep redrawing the triangle over and over with alpha, eventually the triangles area in the RT is just solid black, not transparent.

    Shapes can't use any other blendmodes except SOLID, NONE, and TEXTURE.

    I am thinking this is a limitation of RenderTargets maybe.
  • piepie Member
    edited October 2015
    @antix check if this is what you need
    maybe you are confusing shape fill style and blending modes, ok it's a square, not a triangle :D

    edit: sorry, wrong attachment: this one uses rt
    zip
    zip
    SpotLightShapeRT.zip
    46K
  • look at the screendump I attached you will see a bunch of black sectors. I want these to be not solid.

    Since I'm using shapes and other trickery I think my only option now is to recode everything and make each sector into a sprite. That way I can just make them visible, invisible, or tint them how they need to be.
    Untitled.jpg
    1024 x 576 - 252K
Sign In or Register to comment.