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 7512785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:58:49+00:00 2026-05-29T23:58:49+00:00

In pure AS3, I have a pixelbender and a large bitmap. The pixelbender is

  • 0

In pure AS3, I have a pixelbender and a large bitmap. The pixelbender is configurable with a distance parameter to affect only a small area of the bitmap. The problem is that the pixelbender is executing over the whole bitmap. What would be the best way to update only the effected region of the bitmap?

Given this config:

shader.data.image.input = referenceBitmap.bitmapData; // 300x200
shader.data.position = [150,100];
shader.data.distance = [20];

The following does not work:

new ShaderJob(shader, 
              bitmap.bitmapData.getPixels(
                  new Rectangle(particle.x -10, 
                            particle.y -10,
                            20,
                            20))).start();

I could make a temporary array to hold the computed values and then copy them back into the bitmapData array. Although I would like for the shader to update the bitmapData pixels directly and only on the affected area.

The following works, but the shader runs on the whole 300×200 bitmap:

new ShaderJob(shader, bitmap.bitmapData).start();

Any suggestions?

EDIT: a filter will not work as there are 3 input images

  • 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-05-29T23:58:51+00:00Added an answer on May 29, 2026 at 11:58 pm

    BitmapData allows you to use a function called applyfilter.

    Instead of trying to use a bitmapdata with a shaderJob you could alternately use the shader as a shaderFilter and apply the shaderfilter on the bitmapdata.

    shader = new Shader(fr.data);
    shaderFilter = new ShaderFilter();
    shaderFilter.shader = shader;
    

    Once you have your shaderFilter you could use applyFilter on your bitmapData. Something like :

    referenceBitmap.bitmapData.applyFilter(bitmap.bitmapData,new Rectangle(particle.x -10, 
                            particle.y -10,
                            20,
                            20),new Point(0,0),shaderFilter);
    

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had a custom MXML component, that I have converted to a pure AS3
I have a Pure AS3 app that I'm deploying to both iOS and Android.
I have a AIR for mobile pure AS3 project that saves a file on
I'm coding a website in pure AS3 using FlashDevelop and have an object that
I have a Pure AS3 mobile project that I'm developing in Flex 4.5, and
I have a pure Winapi application that needs a few new features. One of
I'm moving to a pure as3 environment into flex and I have a question
Im working with FlashDevelop and have two main projects, all pure AS3 projects. When
I'm working on a large-size dual AS3/Flex project (some parts are pure AS3, other
I've got a pure AS3 (no Flex) project that uses Flare to display and

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.