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. Thanks
Morphing in MoleHill using a vertex shader
326 Views Asked by ColinDavies At
2
There are 2 best solutions below
1
nicoptere
On
(maybe too late)
a morphing is "simply" a linear interpolation between 2 sets of positions.
assuming you have a first vertexBuffer VA0 representing the origins and a second vertexbuffer VA1 representing your destinations. you can store them in temporary registers:
"mov vt0 va0 \n" +//temp var, will hold the result
"mov vt1 va0 \n" +//start position
"mov vt2 va1 \n" +//destination
then you'll need a T value that you can pass as a constant like this:
context.setProgramConstantsFromVector( Context3DProgramType.VERTEX, id, constant );
if you pass something like
Vector.<Number>([ T, 0,0, 1 ])
with 0<=T<=1 as the constant and put it at id 0, the following code will transform (linearly inpterpolate) the output positions from the starting position to the end position.
//lerp
"sub vt0 vt2 vt1 \n" +
"mul vt0 vt0 vc0.x \n" +
"add vt0 vt0 va1 \n" +
then you need to project VT0 to get the correct output.
Related Questions in FLASH
- Failing write/read on RH850 with NOR flash
- Unique ID to transfer guest account data from Adobe AIR to Unity
- flashplayer_32_sa: SecurityError: Error #2028: Local-with-filesystem SWF file
- what is the simplest way and what applications to use in making an exe file that runs .swf file assetss
- Does a physical filesystem works only for a specific type of storage media?
- when I try to enable flash encryption in esp32, the bootloader size is large . But I'm unable to find bootloader field in partition table
- Manage FIFO implemented in a non-volatile flash NOR memory
- create a quiz with actionscript 3
- How to connect two x16 nor flash to nor flash controller?
- Looping in Adobe Flash Professional CS6
- AOSP flahed to android emulator
- How do I compile Flash app files with mxml and as extensions?
- Winbond W25Q01 (1G-BIT) Flash erases 256-bytes not 4K and fails write-read-verify after address 0x07000000
- On Pixel 7a Android AOSP
- Defer implementation of interface functions to child class
Related Questions in ACTIONSCRIPT-3
- [Actionscript]How to display the information inside an array of objects
- How to set a colour variable in JS
- When using INSERT OR REPLACE INTO in SQL is there any way to tell if a record was inserted as new or replaced in SQL for AS3?
- How to inject a bean in a view with Crux
- AS3 - Unable to resize Image width and height
- How do I move Pac-Man smoothly in AS3?
- Export Release Build is not working in Adobe Flash Builder, It does nothing on Finish button
- 1009 Error for a Character Skin Symbol in AS3
- Issue setting domain memory
- Implicit coercion of a value with static type Object to a possibly unrelated type Number
- Defer implementation of interface functions to child class
- Simple top 3 scores from an array to textfield
- Need ActionScript 3 coding for input boxes that will determine amount of color fill in a movieclip
- AS3 Caling MC on Parent Timeline from Child
- 2 error problems for simple music players
Related Questions in APACHE-FLEX
- How to Run flash applications in any browsers with out adding manual extensions in 2023
- Error: Infra Phase complete, 0/0 resources updated in 02 seconds
- How to replace HTMLLoader to display PDF inside air application
- Air desktop application CSS file and image url
- Flex conditional statement: set VGroup height according to Label Text
- D365 - Azure Devops - Git Repo - How to check the history of a file which is stored in separate folders in the Main branch
- How to access data from row in Grid while selecting it so that further it can be used in Text Field below in Adobe Flex (ActionScript)?
- Actionscript: Access of possibly undefined property id
- Adobe flex in 2021
- How i can add cron entry without time using chef
- Equivalent of parent parentDocument from flex
- Captive runtime packaging issue (Failed to load the AIR Runtime) under Catalina 10.15.7 with ADT
- Getting error while running curl command via chef
- How can I create a context menu on the fly in a textArea in AS3/AIR?
- Flex SDK installer fails to download https://github.com/swfobject/swfobject/archive/2.2.zip
Related Questions in SHADER
- How to use bitwise operators in GLSL
- Three.js how to determine if backfacing in a RawShaderMaterial that's double sided and transparent?
- UNITY_VERTEX_INPUT_INSTANCE_ID use in custom shader
- How to draw a WebGLTexture into another Canvas?
- How can I improve my brush on mobile with Unity slow touch interpretation problem?
- FrameBuffer texture reading black for each pixel WebGL
- Single WebGL 2.0 shader for multiple texture precisions
- How you can make a 3D mask in the UI so that it is displayed correctly. Unity
- Could I use multiple materials in Skybox?
- C++ DirectX compress 3D texture into 2D texture
- Enabling transparency on objects rendered to render texture makes them disappear completely on iOS - React Three Fiber
- i have a glslf file how do i convert that to rgb (primitive lua knowledge)
- Why unity do not include my shader to build but log them?
- Compiling vertex shader from vulkan tutorial with glslc gives error: linking multiple files in not supported yet
- Three.js using EffectComposer renderTarget texture is causing flickering / strobing
Related Questions in MOLEHILL
- How to use Matrix3D.appendTranslation()?
- AGAL: m44 instead of Matrix3D.append()
- AGAL: Calculating screen space position in fragment shader
- adobe molehill android setting
- Bad quality texture stage3D
- Why in AGAL have we a data32PerVertex with a max value of 64 in createVertexBuffer method?
- How to integrate Robotlegs with Molehill?
- Mixing different Program3Ds results in some objects not rendering
- Morphing in MoleHill using a vertex shader
- How to define projection matrix in stage3d without using perspectiveFieldOfViewLH method
- Apply Texture To Each Side Of Cube Independently?
- Different code for different versions of Flash Player
- Alternativa3D - Outlining 3D objects
- Getting started with stage3d in Flash CS5, and which framework to choose?
- How do you combine X, Y, and Z rotations in a model's local space (not global)?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The next version of pixel bender should support creating both 3d vertex and fragment shaders. A preview release should be available here