User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: 3D Shader by Werbad Issues in DX9+

  1. #1
    Clicker Fusion 2.5 Developer
    SHINGEN's Avatar
    Join Date
    Apr 2015
    Location
    England
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question 3D Shader by Werbad Issues in DX9+

    3dShader Error.jpg

    Im trying to make a game similar to GTA1 and everything is going well but...
    when I change the display mode to DX 8/9/11 the 3d Shader doesnt seem to work

    3dShader Error 2.jpg

    It says DX9+ but it doesnt work? or am I doing something wrong?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,490
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    It's probably not you. I just tried the GTA building examples that I made years ago using Werbad's shader, which definitely DID work, but are now all broken. Clickteam must have changed something. Whatever they did, it seems to have broken the "Quad deform" shader that I made as well. In both cases, Fusion seems to display only one of the two triangles needed to draw a quad (curiously, it looks okay in the frame editor, but not at runtime).

    Shaders don't work in standard mode - you need to use at least DX9 for them to have any effect, and DX11 requires you to use specially converted shader files.

  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)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,157
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Hmm yeah, I've noticed this a while ago...
    Thought it would have something to do with the PS_3_0 which has a broken implementation, but I guess it's something else...
    Would be really cool if we get this fixed somehow

    Ah, one thing Sketchy / MuddyMole works for me...

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,384
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)
    @MuddyMole I've compared your Quad.mfa with a copy of MMF2 HWA from 2012 and CF 2.5 builds 291 and 293, no difference. Not surprising as AFAIK we didn't change anything it the DX9 engine.

    Maybe something was modified in DirectX itself in the meantime.

  5. #5
    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)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,157
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Here's a couple of examples of 3D Shader that seems broken, perhaps it can help identifying the issue...
    Attached files Attached files

  6. #6
    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)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,157
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Was this always like this?
    That's how it looks on MMF2...
    I'm sure Quad shader looks a lot better...



    But it's concerning that a shader with nothing really special broke.
    Makes me think if some of the stuff I've tried and didn't worked was because of the same issue.

    Edit: the math on this other examples seems better, but still got a few issues on MMF2...
    https://imgur.com/a/T2b8tml

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,490
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    That's strange...

    I've just had another look though.
    The latest version (which I decided to call "QuadPlus" for some reason) doesn't work - https://1drv.ms/u/s!Atq7cUIJ7uexhRbS...EV5XR?e=9t0HO7

    The two earlier versions - "Quad" (w/o lighting) and "QuadDeform" (w lighting) - ARE both still working.

    So, that would be an option for @SHINGEN to use instead of Werbad's shader (you use it differently, but it can produce exactly the same results)
    https://1drv.ms/u/s!Atq7cUIJ7uexhRJD...BGMj0?e=eV73XX

    I don't recall Werbad's shader being particularly complex though, so maybe it just needs tweaking somehow...

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,490
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NaitorStudios View Post
    Was this always like this?
    That's how it looks on MMF2...
    I'm sure Quad shader looks a lot better...



    But it's concerning that a shader with nothing really special broke.
    Makes me think if some of the stuff I've tried and didn't worked was because of the same issue.

    Edit: the math on this other examples seems better, but still got a few issues on MMF2...
    https://imgur.com/a/T2b8tml
    Nope. It's broken. The wall objects are being positioned and resized correctly, but that's not what the shader was for - the shader was to make the corners look right.

    Have a look at this example that I built as an .exe back when Werbad's shader still worked:
    https://1drv.ms/u/s!Atq7cUIJ7uexg2Sg...QgLfz?e=QYhNkU

    It still works fine for me, whereas the .mfa doesn't.

  9. #9
    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)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,157
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Really weird considering MMF2 isn't working correctly as well while the old built EXE behaves differently...

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,490
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Okay, soooo...
    I just tested Werbad's shader on its own, and it actually works fine.
    Which means that the problem is with the events - and I think I've found it!
    The issue is with passing integers as parameters that should be floats.

    Whenever there's expression to set a shader parameter, like this:
    ( ( Y Top( "Roof" ) - Min(Y Top( "Floor" ), Y Top( "Roof" )) ) + ( _Height( "Roof" ) * 50 ) ) / ( Max(Y Bottom( "Floor" ), Y Bottom( "Roof" )) - Min(Y Top( "Floor" ), Y Top( "Roof" )) )

    ...if you force Fusion to use floats (eg. replace "50" with "50.0"), it will work.

    This never used to be an issue, but apparently now is.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 18th October 2018, 06:07 AM
  2. Replies: 0
    Last Post: 7th October 2016, 04:07 AM
  3. looking for offset shader, underwater shader, etc
    By neorocker7 in forum Fusion 2.5
    Replies: 9
    Last Post: 18th May 2015, 02:03 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
  •