Flash :: In An AGAL Vertex Shader, What Is The 'w' Component Used For In The Output Shader
Dec 29, 2011
I understand the 'xyz' components of a vertex's position, but what does 'w' do? Could it be left as the same constant value all the time?
Example:
mov op.xyz, va0.xyz
mov op.w vc0.w
View 1 Replies
Similar Posts:
Feb 5, 2012
Using the Molehill with Flash I wish to create a vertiex shader, to have one mesh transform into another, I have seen that it is possible with Flare, However I am unsure if that was using Stage3D, Can anyone give me any pointers in the use of shaders in AGAL as to how this might be done.
View 2 Replies
Jan 23, 2012
I've mostly seen examples where a Matrix3D object is passed as a vertex constant register in AS3 to the Context3D object. But never seen a matrix in any other types of registers (temporary or attribute).Would there be any way to copy a Matrix vertex constant to a temporary register, and then manipulate individual fields of that Matrix temporary register (ex:for the rotation), with other supplied values (vertex attributes or other constants)
View 2 Replies
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
Jun 10, 2011
so this the code with it i am able to mix several trackswith a Shader done in pixel bender.the problem here i don't know when the mixing is finish or all the sound reache their endto be able to save the bytearray into a file any Event or something like that
package
{
import flash.display.*;
[code].....
View 1 Replies
Nov 12, 2010
I want to make such effect: draggable semi-transparent object (let's call it 'plastic strip') over window with arbitrary objects. Plastic strip should be turbid, i.e. it blurs content under it (not blurred itself). What's the best way to do that with PixelBender shader on Flex?
View 1 Replies
May 2, 2011
I've been struggling to write a Phong shader for my Molehill project. The problem is that the light seems to shift or move when the camera rotates. So I've been investigating what could possibly be wrong, by basically comparing my shader with the Phong shader written in GLSL. There's one thing I found that is kind of weird. In GLSL the output position in the vertex shader is ModelViewProjectionMatrix * Vertex, ok that is just fine.
HOWEVER, in Molehill the ModelViewProjectionMatrix has to be transposed so that it will render the vertex correctly to the screen. In GLSL that is not necessary.
How did I find that out? I created the Matrix3D modelViewProjection, I applied the ModelView to that matrix and then the Projection matrix. I tried to give the vertex shader that matrix and it displayed nothing until I transposed the modelViewProjection.
In GLSL this is not necessary, I could just say output.position = projection * modelview * vertex and it would be displayed correctly, I don't need to do transpose(projection * modelview * vertex).
So.. I'm wondering if there's something that I am not seeing here or is this a special part of Molehill that we just have to follow? Or could it be a bug in Molehill? I will create a new post tonight with my Phong shader and hope that someone sees what I may be doing wrong. But this is confusing me a lot at the moment and would like to know why the matrix has to be transposed.
View 1 Replies
Oct 25, 2011
How would I go about making a 2d lighting shader, that only made the things near the player visible?
View 3 Replies
Oct 18, 2011
For example, I want to output red color in fragment shader.[code]...
View 1 Replies
Dec 20, 2011
I store a UV-coord from va1 to v1. In the frag shader, an interpolated texture coordinate now is available in v1 to sample. Are there connections under the hood, like semantics, to associate v1 with being the normal coordinates?Are fragments pushed to the fragment shader per triangle or once an entire mesh's geometry vertices are run through?In the vertex shader, let's say I multiply my modelview by my vertex's position. I then want to share my z-coord with the fragment shader for something else. I store the z-cord of the transformed vector into v3. Once I am in the fragment shader and I access v3 for the z-coord, is this the same z-coord I passed in or is this z-coordinate going to be altered by the perspective divide in between? I only ask as I want to clarify the "interpolating" behavior described when storing values in these registers.
View 1 Replies
Jan 18, 2012
If I encode all colors into one single float value (RGB) as:
//Each Channels are from 0 - 255
red << 16 | green << 8 | blue;
How can I retrieve those color channels back in AGAL? There doesn't seem to be any bitwise operators.
View 2 Replies
Mar 28, 2011
I'm trying to understand molehill and would like to multiple a vertex by two matrices, say:
output = theVertex * scaleMatrix * rotationMatrix
Im guessing my vertex shader would look something like:
"m44 vt0, va0, vc0
" +
"mul op, vt0, vc1
";
And i would set the matrices with
context3d.setProgramConstantsFromMatrix(Context3DProgramType.VERTEX, 0, scaleMatrix);
context3d.setProgramConstantsFromMatrix(Context3DProgramType.VERTEX, 1, rotationMatrix);
But its not working.Im aware that i could multiple the matrix before putting on the shader, but i am trying to understand AGAL.
View 1 Replies
Jan 17, 2012
If I make multiple draw calls for various Program3D instances, is there a way that I can reset or nullify the constants if I'm no longer using them in the next following Program3D assignment?
Is it even necessary that I do something like this?
//Nullify 'vc0' in the vertex shader:
context3D.setProgramConstantsFromVector("vertex", 0, null);
View 1 Replies
Apr 22, 2010
I am building a series of videos(MOV) that going to be played using Flash. So I have a TreeView component that gets populated from a well defined XML document that has all the video names as nodes. My use of this setup is to have the user select a link and the appropriate video comes up to play. I have a loader component also set up, but I want to link the TreeView's output (or user selection on TreeView) to the Loader, so that the corresponding video plays.
Can i call the video directly ? (Assuming its going to be a FLV4 file?). If I create the entire video in flash (create the product demo in flash) can i call the resulting swf ? Here's an update:
[Code]...
View 1 Replies
Apr 18, 2012
Is there a way to render multiple vertex buffers in AS3?Right now I have two objects which I want to render, but the only way I can think to do it is to concatenate the raw vertex data (of both objects) and then set that (concatenated) vector as the vertex buffer.I would prefer to do this as 2 separate vertex buffers, but I don't know how to render from more than one vertex buffer.
View 1 Replies
Jun 22, 2006
var nextY = 0;
var nextY2 = 18;
for (var count = 0; count < result_lv.typeCount; count++)
{
[code]....
The type count is correct but the information for the project is wrong.
View 1 Replies
Nov 20, 2009
I'm quite new to AS3 (coming from php/c#) and like it very much. My problem: trace doesn't output anything in the Output window anymore?!
View 2 Replies
Nov 20, 2009
I'm quite new to AS3 (coming from php/c#) and like it very much.My problem: trace doesn't output anything in the Output window anymore?!
View 3 Replies
Jul 22, 2005
I'm teaching myself ActionScript and the book I'm reading just got into input text capabilities. The book shows me how to link input text to a variable and output that text to the output window using trace. My question is: how can I display the text that the user input onto the actual movie. For example... if I wanted the visitor to type their name into the input text box and click Submit and then a phrase shows up with their name such as "Hold on Name, my site will be done soon." How do I reference that variable and have it actually display in my movie?
View 5 Replies
Mar 20, 2012
I was wondering if there was a way to get the sound from a FLVPlayback component and manipulate it with using a custom volume slider? Within my Actionscript I currently have this code which enables me to control the volume of a MP3:
import fl.events.SliderEvent;
var mysong = new music();
var myChannel:SoundChannel = new SoundChannel();
var myTransform = new SoundTransform();
myChannel = mysong.play(0,10);
[Code]...
But Instead of using the MP3 for sound, is there a way to use an FLV's sound instead?
View 1 Replies
Apr 13, 2011
I am trying to create my first real world Flex application. I will have a lot of different data entry / data view screens so I thought I would create many different components to deal with each different type of data that was being returned. I have a MXML application called Layout, and have component called "Navigator" which controls the menu, as well as a ViewStack called "MainContent".
I want the Navigator component to change the ViewStack on the Layout application to that of another Component (each Component is embedded within the Canvas of each ViewStack). I have a click handler on my Navigator which looks like this: Layout.ContentFrame.selectedChild=event.itemRenderer.data.clickValue; However it shows the error "Access of possibly undefined property ContentFrame through a reference with a static type Class." Is my approach a good way of doing it? I have attempted referencing it using FlexGlobals.Layout and topLevelApplication.Layout... neither of which work?[URL]
View 2 Replies
Jun 23, 2011
I have a component "child" which has a cancel button. Now this component is placed in a state called "newChildComp" I also have another component called "parent". In the parent component, i have a button that dispatches an event. Here is the event code:
[Code].....
so, basically,i am checking to see if the cancel button component in the Child component, while i am still in the parent Compoent, was clicked, if it was clicked, call the cancelButtonHandler. The problem is by the time the addNewChild handles the event, that cancel button was still null. My question is how do i solve this without using the itemCreationPolicy on the cancel button?
View 1 Replies
May 3, 2009
i've downloaded the text layout component from adobe site and i install it with extension manager but i didn't find the component in the flash component panel
View 5 Replies
May 5, 2010
I was wondering if there is any way to get an number output always in a two digit number, for example time:What my code does right now:
0:1
0:2
0:3
0:4
[code]....
View 2 Replies
May 26, 2011
Does anyone know if it is possible to randomize assets in Flash. Basically I am creating a flash based application which when the user hits a target button the preceeding screen should show a completely random asset (which would be an SWF), at the moment each button is simply tagged to a particular swf, although i need it to be more random than this?
View 1 Replies
Jul 21, 2011
I am trying to trace a fairly large 2d array (many thousands of elements) to copy in some other code. The code obviously takes a while to run but this doesn't matter to me since it's a one time thing. I used to be able to do this no problem in Flash CS5, but now Flash is truncating the text somewhere in the middle so I don't see all of it. Is there a way to disable this?
View 0 Replies
Sep 9, 2008
can I use PHP to create an XML file called AGConfig.xml on a server? AGConfig.xml is a file that is used by 2 different applications there is a config swf and a main app swf...initially you run the config swf which takes in MySQL Login information...and a event name.when you load the config swf all the fields are blank (whether or not the AGConfig.xml exists)...what I want to do is write an XML file on the server.I am wondering if its possible to do this using PHP? What I have found is that you can definitely save it to your local drive.but is it possible to output an XML file on a server? For example.my php file and flash app files are at www.somesite.com/test/ and if i run.[code]
View 3 Replies
Nov 5, 2010
i try to create my logo from flash
i use export function in gif format.
the output color is not same as what i saw at flash.
may i know why? below is the screenshot.
flash
output
View 5 Replies
Oct 17, 2006
If there's a way to disable the Output panel in Flash? I've tried turning off most of the Warnings section in the prefs, but apparently that doesn't affect the Output panel.
View 3 Replies
Oct 21, 2009
I want to allow a user to create a comic page layout in Flash which would allow them to upload JPEGs into the comic page layout then the Flash interface would allow them to move them around and add speach bubbles.
I would then like these to be uploaded to my web server and the whole thing converted to a JPEG. What would be involved to achieve this?
View 2 Replies