User Tag List

Results 1 to 4 of 4

Thread: HLSL effect - set float4 parameter from event editor?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Firefly 3D Module (Steam)
    Cazra's Avatar
    Join Date
    Dec 2021
    Location
    Tennessee, USA
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question HLSL effect - set float4 parameter from event editor?

    Is there a way to set a float4-type parameter for an HLSL effect shader from the Event Editor? I've got a color parameter that I'd like to set programmatically, but in the Event Editor, I can only set a float parameter or an image parameter.

  2. #2
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    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)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,129
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Technically you can if you calculate the RGBA value yourself.
    Here's an example: GetRGBA.mfa
    And the shader for testing the mfa above in case you don't have it: SimpleFillWithAlpha.zip

    The RGBA value might look really odd, cause it's probably getting past the integer limit, but the shader can interpret it.

  3. #3
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    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)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,129
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Another way of doing it is just selecting the color as usual from the color dialog and on the next action adding ALPHA (0 to 255) * 256 * 256 * 256 to the color parameter.

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Firefly 3D Module (Steam)
    Cazra's Avatar
    Join Date
    Dec 2021
    Location
    Tennessee, USA
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NaitorStudios View Post
    Technically you can if you calculate the RGBA value yourself.
    Here's an example: GetRGBA.mfa
    And the shader for testing the mfa above in case you don't have it: SimpleFillWithAlpha.zip

    The RGBA value might look really odd, cause it's probably getting past the integer limit, but the shader can interpret it.
    Oh, cool. Thanks!

Similar Threads

  1. Changing shader effect through parameter
    By AndyBazooka in forum Fusion 2.5
    Replies: 2
    Last Post: 8th October 2018, 09:01 PM
  2. Setting effect parameter via C++
    By ricko_max in forum Extension Developers Lobby
    Replies: 5
    Last Post: 23rd November 2017, 02:51 AM
  3. Trying to set effect parameter with floats..
    By Storsorgen in forum Fusion 2.5
    Replies: 1
    Last Post: 2nd August 2016, 04:50 PM
  4. Color mask, blend effect and parameter
    By faber in forum Fusion 2.5
    Replies: 4
    Last Post: 19th August 2015, 03:37 PM
  5. Restore effect parameter defaults at runtime?
    By Nobuyuki in forum Hardware Accelerated Runtime
    Replies: 3
    Last Post: 14th March 2011, 07:56 AM

Posting Permissions

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