Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8488487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:33:01+00:00 2026-06-10T21:33:01+00:00

I am working on a 2D AS3 project, where the different layers are rendered

  • 0

I am working on a 2D AS3 project, where the different layers are rendered via Stage3D, in a single drawTriangles() call, as a single mesh.
(if you are familiar with the BunnyMark GPUSprite mini render engine, that will give you an idea: http://www.bytearray.org/?p=4074)

What I would like is to draw one of these entire ‘render layers’, with an overall alpha transparency value, that would apply to ALL triangles drawn, adding to their own alpha values.

IE I am not looking to change the alpha by using textures with alpha transparency or via having to go through setting each triangle separately to have the same alpha: I want a master switch that would affect the alpha value of everything that is drawn? ( something computationally cheap)

Is this possible? Perhaps via a Shader, or a setProgramConstantsFromVector command?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:33:03+00:00Added an answer on June 10, 2026 at 9:33 pm

    Well you could render your layer to a texture, then you could put this texture on the stage with the alpha you want, this way your whole layer would have the same alpha!

    You can do this in two ways, the first way is to render it to a texture, and display that texture with Stage3D and create a shader that adjusts the alpha.

    The second way is rendering it to a bitmapData, and displaying it on the normal stage. I’ll give an example for this way:

    var bmd:BitmapData = new BitmapData(renderWidth, renderHeight, true, 0);
    var bit:Bitmap = new Bitmap(bmd);
    bit.alpha = 0.5;
    addChild(bit);
    
    //In your render loop at the beginning
    context3D.renderToBitmapData(bmd);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a working AS3 project and it compiles fine to a SWF. I
I'm working on a large-size dual AS3/Flex project (some parts are pure AS3, other
I'm working on an AS3 project whereby an element needs to expand (downward) on
I'm working on a AS3/AIR based project, I'm using FDT5 as main tool, but
I have been working on Flash AS3 project. I am designing a 3D system.
I'm working on a project, written in AS3. I'm using the Google Maps API
I'm working on an AS3 project that must load a lot of external files;
I have a Flash/AS3 project I am trying to add a call back on,
Working on a project in AS3 I require to stream a few files for
I'm working on this Flash project done with AS3 and for some reason the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.