User Tag List

Results 1 to 6 of 6

Thread: Pixel Shaders? HWA? Please someone shed some light...

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2012
    Location
    Miami, FL
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Pixel Shaders? HWA? Please someone shed some light...

    I've been been diligently looking through the Forum for topics relating to Pixel Shaders (refered to ps3, which i confused with the SONY PS3, v2) and HWA. It seems that at some point cross topics between what MMF and MFF2 take place, and one does NOT relate to the other. Forgive me ahead of time, as it seems I am perpetually confused and lost seeking answers to what sometimes seem simply solutions, and are not.

    To shed some light on me, I'm a Designer/Artist. Not a mathematician. Wish I was both, but reality is that my God given gifts and training have been spent, well, doing the art of design (no regrets here, much otherwise ). To you Sin and Cos make perfect sense, to me Photoshop and After Effects make sense.

    Ultimately, technology brings us both together, and thus, we learn to communicate. I love an expeditious and concise answer that draw me closer to to further researching the subject, on the right track, however, to often I'm derailed by my ignorance or the lack of tutorials and threads on the matter. En fin. The questions. (Pardon the ramble)

    Pixel shaders. Does MMF2 support them? If so, where do I get them? And how do I use them? Tutorials? Links?
    HWA. What is it? Does the Direct3D9 replace that in MMF2?

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,537
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    MMF2 can indeed use pixel shaders, but only in a HWA graphics mode renderer; HWA is short for "hardware accelerated". This is an option you can choose on an MMF2 project from its display properties; using Direct3d9 as the graphics renderer will open a few extra options on objects, layers, the frame, etc for display options. This graphics mode is generally only compatible with windows machines with graphics cards; DirectX is the windows graphics library- you can't use HWA graphics on a game for the iOS or java or flash runtimes, for example, since they use their own software renderers. So if you want HWA, you can (generally) only use it for .exe games. iOS, java, flash, etc all have their own extra graphics capabilities, some with their own HWA support, like Anaconda with GLSL instead of HLSL, but it won't work with the same hardcoded effects as in MMF2's HWA. Normally, MMF2 in its default mode will use a software renderer- meaning the code for drawing the graphics to the screen is all built into the .exe and when you run it, it will use default windows libraries and its own renderer to draw, so all the operations are done on your CPU (processer) and quite inefficient and slow

    Pixel shaders are an effect you can apply to a texture of a single object as it is being rendered to the screen. A pixel shader simply performs some operation once for every pixel on the texture, iterating through it as an array, but concurrently with the power of the systems graphics card, making it very fast compared to software rendering. There are two (main) different kinds of shaders used in computer graphics, Pixel Shaders and Vertex Shaders- MMF2 will only let you use custom pixel shaders, while vertex shaders are unsupported right now (it uses some hardcoded ones for things like rotations and scaling, but you can't use them dynamically). The Pixel Shaders in MMF2 have four kinds of input to them- parameters given through events, which are just numbers, usually floats, something like 0.0 to 1.0, then you can also pass image parameters- pathnames to images, which could be in virtual memory, as well as the texture of both the object (its animation) and the background behind it (everything that has been rendered before it, in its X/Y bounds). So using these, you can use the pixel shader to combine them in all sorts of ways. For example, a simple pixel shader might just invert a texture upside down vertically. Imagine it as something like this:

    X = X
    Y = -Y

    Now the pixel shader reads in each pixel in the texture- the texture being whatever animation the object is displaying- and sets the color of that pixel to the pixel flipped vertically from that one. As an end result, the image will be flipped upside down completely. You can do all sorts of creative things after that. For example, I wrote a pixel shader that will squeeze an image like its been pinched at its center;
    http://community.clickteam.com/showthread.php?t=58282
    All it does is for each pixel, look at the distance towards the middle of the image, then cut that distance, and use the closer pixel.



    To use an effect in MMF2, first make sure the graphcis mode is set to Direct3d9; its under the display properties for the application.
    Download the effects you want, and put them into your "effects" folder in MMF2. You can throw them in that folder or any subfolders.
    Now under any active object in the level or event editors, you can set its "effect" property. First you need to give it the shader you want, then give it the parameters you want

  3. #3
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2012
    Location
    Miami, FL
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Pixelthief,
    thanks for bringing up to speed on that. Here is my next question. I've seen several Shaders included in demo reels with some really cool lighting and other effects. Besides standard "overlay" effects, I've not come across anything "dynamic". Are there any examples (besides magnifying glass) that I could see? or any other members have something tangible that they would like to showcase?
    Thanks!

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,537
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Phi's Avatar
    Join Date
    Jan 2010
    Location
    England
    Posts
    1,822
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)

  6. #6
    Clicker Multimedia Fusion 2

    Join Date
    Feb 2012
    Location
    Miami, FL
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys.

Similar Threads

  1. Pixel Shaders examples
    By Sphax in forum Hardware Accelerated Runtime
    Replies: 116
    Last Post: 15th October 2016, 07:09 PM
  2. Pixel Shaders 3.0?
    By Algul in forum Hardware Accelerated Runtime
    Replies: 1
    Last Post: 11th January 2012, 12:02 PM
  3. How to get Sphax's Pixel Shaders into TGF2?
    By RayMarble in forum Hardware Accelerated Runtime
    Replies: 3
    Last Post: 2nd August 2010, 10:32 AM
  4. Pixel Shaders
    By Looki in forum Hardware Accelerated Runtime
    Replies: 9
    Last Post: 24th January 2009, 07:52 AM
  5. Load External Pixel shaders
    By MechatheSlag in forum Hardware Accelerated Runtime
    Replies: 5
    Last Post: 8th January 2009, 07:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •