ActionScript 3.0 :: Convert RGB Channels To Between 0-1 For Pixel Bender?

Nov 20, 2010

Simple question here, lets say you have a color in RGB, white:255, 255, 255Pixel bender needs values between 0-1 not 0-255.So white = 1, 1, 1What about:134, 132, 123I dont know how to work it out.

View 3 Replies


Similar Posts:


Flash Pixel Bender To Access IOS API?

Apr 7, 2011

Working on a Flash iOS app and I need to utilize a couple Apple APIs. I was thinking, would it be possible to write Pixel Bender classes to access their API? If so, could someone provide a small example to get started? Or is there a different / better approach for this?

View 1 Replies

Actionscript 3 :: Does The Pixel Bender With Flash Would Use The GPU

Jul 20, 2011

I write a Pixel Bender kernal for my flash.I know that the pbk would run in another thread.But when I run my swf, the GPU usage shows 0%.I want to know does the Pixel Bender with Flash would use the GPU.

View 2 Replies

ActionScript 3.0 :: Pixel Bender And ByteArrays?

Nov 7, 2011

I'm doing a flashlight in pixel bender and works great. I pass, as parameters, the center of the flashlight.Now, I want to have more than one flashlights (n value).I don't think so I can use Arrays in Pixel Bender, so I thought about ByteArrays but I don't know how to use it in Pixel Bender.

View 2 Replies

Flash :: Create A Filter In Pixel Bender?

Aug 4, 2010

create a filter in Pixel Bender for AS3 to make this effect in the right side in this image:

[URL]

View 2 Replies

Flash :: Use Pixel Bender Within An FP9 Wrapper File?

Oct 6, 2010

We create Flash games which are embedded within third party wrapper SWF files, which are exported for FP9.

If I create an FP10 SWF which uses Pixel Bender classes (Shader, ShaderData), when I run them in an FP9 wrapper within an FP10 player, an error is thrown

VerifyError: Error #1014: Class flash.display::Shader could not be found.

Is there any way to get access to these FP10 classes - or does the version of the outermost wrapper determine what's available to child SWFs? Is this something to do with applicationDomain?

View 2 Replies

Loads A Pixel Bender Filter And Applies It To An Image?

Sep 7, 2009

I came upon a really nice class that loads a pixel bender filter and applies it to an image,  but so far havent really managed to call it to from within a different  flash application.

[Code]...

View 3 Replies

Flash :: Professional - What Relationship Between Cs4 And Pixel Bender Toolkit 2

Dec 14, 2010

I want to know relationship between flash cs4 and Pixel Bender Toolkit 2. Now I use Pixel Bender Toolkit 2 to make some effect,and use File->Export Filter for flash player,then it will creat a .pbj file. I don't know how flash cs4 use .pbj file? I use google to search it,but I don't find answer. Anyone could give me detail example about flash cs4 use .pbj file?

View 1 Replies

Flash :: Save ByteArray Generated By Pixel Bender?

Jul 16, 2010

I am building a Flash Application which will allow a user to mix two mp3 files and send the mixed result to our server.

Using Pixel Bender I am already able to create a mix:

public class Mixer
{
[Embed(source="mix.pbj", mimeType="application/octet-stream")]
protected var NewFilter:Class;

[Code].....

Not sure if the event.byteArray can be transformed to an mp3 file? Ideally we'd send the mp3 to our server for uploading.

View 1 Replies

Actionscript 3 :: Drawing - Recreate Such Effect Using Pixel Bender?

Jan 30, 2011

Effect is generally in mostly vertical with slight horizontal offsets looks like: often used by paintors in sky painting like here

View 1 Replies

Flash :: Turn Off Color Ranges In Pixel Bender?

Feb 23, 2011

What is the best way to turn turn off (using PixelBender) colors that fall within a certain range. For example, turn off all colors between 0x0000FF and 0x00FFFF. This has to work in Flash.

View 2 Replies

ActionScript 3.0 :: Pixel Bender Custom Blend Mode

Dec 5, 2008

I am trying to create a custom blend mode much like the blur blend in Windows Vista, where all the of the contents in the windows behind the one on top are blurred. (I hope you understand what I mean.) I would like to accomplish this using a pixel bender effect, naturally. Unfortunately I can't get any kind of blurring (or for that matter, any image distortion at all) to work when I use a pbj file as a blend mode. These kinds of effects work fine as a filter, and seem to work fine in the toolkit as well, but don't seem to work at all in flash as a blend mode. it seems that flash doesn't allow you to sample any points except the current x and y that it is working on when used as a blend.[code]

View 3 Replies

ActionScript 3.0 :: Changing Pixel Bender Values At Runtime?

Sep 30, 2009

I've being playing around with a pixel bender tutorial from hereI implement the filter like this

Code:
var shader:Shader = new Shader(new KernelClass() as ByteArray);
var filter:ShaderFilter = new ShaderFilter(shader);

[code]........

View 1 Replies

ActionScript 3.0 :: Pixel Bender Parameter Not Showing Up In Flash?

Dec 2, 2009

I am writing a pixel bender filter to be used in Flash. When I run the kernel in Pixel Bender I can see and change all my parameters (float and float2), but once exported to a .pbj and embedded in Flash I get a "TypeError: Error #1010: A term is undefined and has no properties.". I have run a loop tracing the shader data and it does not show that the parameters are there I change the version number for each export and I am surely embedding the latest version.

View 0 Replies

IDE :: Pixel Bender Filter / Works In Builder But Not Player

Jul 26, 2009

Does anyone know why this code won't work in Flash Player 10, yet it does in the Pixel Bender Toolkit?The output is that there is no change to the movieclip I attach it to.I have verified that I can get other pixel bender filters to work.I can even do other things like force outPixel's channels to specific values.[code]

View 2 Replies

ActionScript 3 :: Pixel Bender Chroma Keying Code For Flex 3

Mar 27, 2010

Where I can find a good chroma keying pixel bender code example. Or How to write such a code in pixel bender. Or a create pixel bender tutorial to create a chroma keying filter. How to get it in flex 3.

View 2 Replies

Actionscript 3 :: Pixel Bender Shaders With Multiple Outputs In Flash?

Mar 30, 2010

According to the pixel bender specs a shader can have one or more outputs. The pixel bender toolkit, whose "export to flash" option tends to be preety strict about the flash specific do's and dont's, would even compile such a shader without complaints.

However actionscript's shader related classes seem to be geared toward single output shaders. Is there any way to have multiple shader outputs in flash?

View 1 Replies

Actionscript 3 :: Flash Pixel Bender Filters A Widely Used Feature?

Jun 20, 2011

I haven't seen many Flash games on facebook or other applications really utilize it yet (or appear to utilize it).

Are there some good professional examples of its use?

Is pixel bender just too slow for practical use on today's web hardware? I read that Flash will fallback to interpreted mode on older Macs (PowerPC), for example, but is that a deal killer?

View 2 Replies

Flex :: Stretch Out The Movie Clip After Applying Some Pixel Bender Filter?

Nov 12, 2009

How to stretch out the movie clip to twice its width and height after applying some Pixel Bender filter? I have some object with video on it (for ex 512 by 512) I apply a Pixel Bender Filter on it. Now I want to stretch the result (for ex to 1024 by 1024). How to stretch it?So my point is 1) Render the result of effect2) Stretch out the result

View 2 Replies

Actionscript 3 :: Flash Pixel Bender: Number Crunching For Audio Processing

Nov 10, 2010

I've seen some example of using a Pixel Bender for mixing two tracks together (per shader passes). However, would it be technically possible to write a Pixel Bender kernel that could do this?

[Code]...

View 1 Replies

Actionscript 3 :: Get Pixel Bender Shader 'inputSize' Parameter Working In Flash?

Jun 20, 2011

Here's a snippet of a pixel bender shader that I'm using in Flash:

parameter float2 srcSize
<
parameterType: "inputSize";
inputSizeName: "src";
>;
input image4 src;

The width and height of the source image are filled in correctly in the Pixel Bender Toolkit, but when I run this shader as a filter in Flash Player 10, the srcSize value is not automatically filled in.

View 2 Replies

Flex :: Why Pixel Bender Filter Behaves Differently In Toolkit Than In Air Application

Dec 8, 2011

I've tried this simpler filter with same Air code as below:

<languageVersion : 1.0;>
kernel NewFilter
< namespace : "Your Namespace";
vendor : "Your Vendor";

[code]....

Changing HUE_MAX slider in app (binded to MAX_RANGE parameter of filter), it doesn't filter out HUE values smoothly, but instead thresholds at HUE_MAX=59.9, where at lower values looks like no filter is applyed, and at HUE_MAX=299.9 where between 60 and 299.9 looks like this: [URL]

View 3 Replies

Flash :: Converting Code To Pixel Bender Code?

Jul 9, 2010

I'm looking for some help converting as3 code to pixelbender code in an attempt to improve the performance of my application. This as3 code goes as follows. I scan through the Number values of a bytearray in chunks. Lets say this chunk lenght was 100 numbers I read 2 numbers (left and right) and try find the maximum values. The numbers in my bytearray are PCM data so there is millions of them and this code can often take a long time to execute, especially on a low spec machine.

The whole aim of this is to render a waveform as quickly as possible. I know very little about pixel bender. I can basically make a new file and create a shaderJob of it in flash but I'm really uncertain how to approach this...

[Code]...

View 1 Replies

ActionScript 2.0 :: Convert String Length To Pixel Based Value?

Jan 14, 2002

I can obtain the number of characters in a string using the 'length' action script command. However, I need to know the pixel width of this 'length'?

View 1 Replies

ActionScript 3.0 :: Convert Bitmap Into Sprite Pixel At A Time?

Nov 21, 2010

I'm making a game where the player moves around a map, where the player can walk and where they can't is decided by the color of the pixel they are trying to move onto, which I get using the Bitmap.getPixel method.

What I'd like to do though is when the map image is loaded process it into a sprite or something which I can then use the DisplayObject.hitTest methods on. So I have an array of colors whcih the user can walk on, is there way I could go through each pixel and build something that would let me do that?

View 4 Replies

Java :: Convert Pixel Location To Latitude/longitude & Vise Versa?

Aug 10, 2011

I need to convert latitude longitude values into pixel positions as well as do the opposite. I've found many solutions to go from lat/lng->pixel, but can't find anything on the reverse.

A couple of notes:

The map is a fixed size, no zooming, no tiles. I don't need anything super accurate, its not important. Preferably mercator projection, but not required. I'm not actually display the result. (Any 2D projection) I can't rely on any web based API's, ie: no Google Maps

A solution in almost any programming language would be fine, as long as it doesn't rely on any platform specific APIs.

This is an example of going from lat/lng->pixel:

var y = Math.round(((-1 * lat) + 90) * (this.MAP_HEIGHT / 180));
var x = Math.round((lng + 180) * (this.MAP_WIDTH / 360));

View 1 Replies

Flex :: Comparing Bitmap Data In AS3 Pixel For Pixel

Mar 30, 2010

I am looking for a fairly simple image comparison method in AS3. I have taken an image from a web cam (with no subject) passed it in to bitmap data, then a second image is taken (this time with a subject) to compare this data, from these two images I would like to create a mask from the pixels that match on both bitmaps. I have been scratching my head for a while, and I am not really making any progress. Could any one point me in the right direction for pixel comparison method, something like getPixel32()

View 2 Replies

ActionScript 3.0 :: Get Pixel-by-pixel Bitmap Data?

Nov 23, 2009

I have a 100x100px image. I want to get 1 pixel vertical line from x- 1 to 100. How can I do that?

View 7 Replies

ActionScript 3.0 :: Merge Two Alpha Channels?

May 4, 2010

What is the best way to merge two alpha channels? What I want to do is, given channel values, use the value which is greater.

I tried using .merge(), but it appears to only blend channels with a linear value between current and destination value.

I looked into .draw(), which would work well using a blendmode like LIGHTEN, but it doesn't allow drawing per channel so I can't target the alpha channel only. The ALPHA blendmode didn't seem to do anything when used with .draw(), and ERASE gives an unwanted hard edge.

I also looked into .copyChannel(), but it doesn't allow any blending logic, merely copying a rectangular region from one BitmapData to another.

View 5 Replies

ActionScript 3.0 :: Disable Sound In All Channels?

Aug 26, 2011

I am using an application which load games as an external swf file(total 10 games). When I click on the game icon it loads the game and also the sounds related to that game.

But when I close the game in that app, ideally it should also stop the sound for that game. It happens for few games, but for some games the sound still plays in the background even if the game is closed.I have used

import flash.media.SoundMixer;
SoundMixer.stopAll();

In some games the sound is embedded in the game swf file and in some games sound is called from the external mp3 files.Is there a way in which if i close the game. ie any game , the sound should stop.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved