User Tag List

Results 1 to 6 of 6

Thread: Perspective shader issue - incorrect distortion

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export Module
    Ramses's Avatar
    Join Date
    Jul 2006
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Perspective shader issue - incorrect distortion

    I noticed the perspective shader could use some improvement - maybe another version. It's most obvious when you try to distort a circle - see the examples. It would be nice if we could get a perspective shader that would distort that circle correctly. It should be more oval, not as pear shaped.

    Also, how difficult would it be to make one that allows you to set the position of all 4 corners?
    Attached thumbnails Attached thumbnails Click image for larger version. 

Name:	circle.jpg‎ 
Views:	92 
Size:	30.2 KB 
ID:	20825   Click image for larger version. 

Name:	circle_perspective.jpg‎ 
Views:	82 
Size:	35.7 KB 
ID:	20826  

  2. #2
    Clicker Fusion 2.5Install Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    TreyM's Avatar
    Join Date
    Apr 2011
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tend to just use the lens shader with a gradient as the texture. Though, to be fair, I haven't tried it on a circle.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export Module
    Ramses's Avatar
    Join Date
    Jul 2006
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The lens shader has the same issue unfortunately.

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,305
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Also, how difficult would it be to make one that allows you to set the position of all 4 corners?
    Impossible.

    This is as close as you're going to get:
    http://community.clickteam.com/threads/92958-Convex-Quadrilateral-pixel-shader
    ...but it still uses an affine transformation (rather than a perspective transformation, which is not possible within a shader), so you'll still have the same distortion. It's also right at the limit of what is possible in an MMF2/CF2.5 shader, so I will not be modifying it any further.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export Module
    Ramses's Avatar
    Join Date
    Jul 2006
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see. Thanks for the explanation. I wasn't sure what the limitations were.

  6. #6
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    Haha, back then I thought your shader does a perspective transformation! That's what I tried to implement back then, and failed. It's too bad we don't have such a shader. But this one guy made a vertex shader - I figure it might be possible, but hacky.

Similar Threads

  1. Perspective Object Issue when Building
    By koolbrosmk in forum Fusion 2.5
    Replies: 2
    Last Post: 21st June 2015, 02:48 AM
  2. Issue - contains an incorrect path
    By gigan_1994 in forum Fusion 2.5
    Replies: 0
    Last Post: 28th November 2014, 11:56 AM
  3. Issue with perspective.mfx
    By OfficialJT in forum Fusion 2.5
    Replies: 4
    Last Post: 25th June 2014, 06:47 PM
  4. Issue or not? Blur shader always looked like this?
    By Fuuriokun in forum Hardware Accelerated Runtime
    Replies: 7
    Last Post: 24th May 2013, 06:58 PM
  5. shader + Blend Coefficient Bug/Issue
    By NecroToad in forum Hardware Accelerated Runtime
    Replies: 4
    Last Post: 16th March 2012, 01: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
  •