Looking for shaders for Zooming and Rotating the background

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I'm making a game with a target resolution of 960x540, and I want the ability to zoom out and rotate the screen.

    Now I know that zooming out and rotating with a shader to show the rest of the frame is pretty much impossible, and it would not show what's outside of the play area, so instead, I thought about making the application size 1920x1080 and using a shader to zoom into my target resolution so that I can recreate the effect of zooming out or rotating the screen in a way that actually would show a little bit of what's out of range with a shader.

    With that little backstory aside, I've found a large amount of zoom and lens shaders to resize the background, but I've pretty much found zero rotating shaders for the background, not a single one, I've been looking for days and I haven't found any (which surprises me considering how long this engine has existed for).

    I'd gladly appreciate it if someone could pass me a background rotation shader for dx11 that's anchored to the center of the screen so that I can achieve this desired effect.

    Please!!

  • I'm making a game with a target resolution of 960x540, and I want the ability to zoom out and rotate the screen.

    Now I know that zooming out and rotating with a shader to show the rest of the frame is pretty much impossible, and it would not show what's outside of the play area, so instead, I thought about making the application size 1920x1080 and using a shader to zoom into my target resolution so that I can recreate the effect of zooming out or rotating the screen in a way that actually would show a little bit of what's out of range with a shader.

    With that little backstory aside, I've found a large amount of zoom and lens shaders to resize the background, but I've pretty much found zero rotating shaders for the background, not a single one, I've been looking for days and I haven't found any (which surprises me considering how long this engine has existed for).

    I'd gladly appreciate it if someone could pass me a background rotation shader for dx11 that's anchored to the center of the screen so that I can achieve this desired effect.

    Please!!

    Not sure if this is what you are trying to do or not, but it has no shaders.

    You can do a bunch with this example. If you link a counter or use Internal Values. You can stop the zoom out at 1.0. This will be the original size of the graphic.
    You can also link Hotspots to it by doubling it and linking the rotation. This can be used for platforms that tilt.

    Please login to see this media element.

    LINK TO MFA: Please login to see this link.

    Edited once, last by VBEinc (April 30, 2023 at 5:39 AM).

  • Not sure if this is what you are trying to do or not, but it has no shaders.

    You can do a bunch with this example. If you link a counter or use Internal Values. You can stop the zoom out at 1.0. This will be the original size of the graphic.
    You can also link Hotspots to it by doubling it and linking the rotation. This can be used for platforms that tilt.

    LINK TO MFA: Please login to see this link.

    The example you linked is just rotating and scaling one object, which I assume is not quite what Peeblo is looking for. Scaling and rotating individual objects is very different from rotating and scaling every object in relation to one another.

    Ironically Peeblo, I've been working on a new project, and around two days ago I determined that I was going to try the EXACT SAME THING you just mentioned (Basically the same resolution and everything). I didn't look into what shaders were available because I assumed that I had it already, but after seeing this thread I looked through my shader library didn't have any luck finding one.

    With that said, I want to try this, so if a shader can't be found, I'm going to try to make my own. I can probably figure it out by referencing shaders that do sub-pixel positioning, scaling, and rotations, and if I get it working, I'll post it here.

    Edited once, last by gkinfinity (April 30, 2023 at 9:42 AM).

  • If push comes to shove, you could probably do it without a shader if you had to (other than the one you'll use to zoom in to your smaller resolution). I added the ability to my internal level editor to zoom out so that I can see a more macro view of the level. The principle is simple enough: you just shrink every object and reposition it proportionally. With the right maths, you could probably achieve this for rotation too. Once you rotate all of your objects, I assume you could use trigonometry to figure out where they all should go. For each object, I guess the 3 points (a) current location (b) desired location (c) centre of the screen would form a right angle triangle, so it would be a matter of applying the right trig functions to figure it all out. It would probably be tricky and tedious, but then making a new shader probably would be as well.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • The example you linked is just rotating and scaling one object, which I assume is not quite what Peeblo is looking for. Scaling and rotating individual objects is very different from rotating and scaling every object in relation to one another.

    Ironically Peeblo, I've been working on a new project, and around two days ago I determined that I was going to try the EXACT SAME THING you just mentioned (Basically the same resolution and everything). I didn't look into what shaders were available because I assumed that I had it already, but after seeing this thread I looked through my shader library didn't have any luck finding one.

    With that said, I want to try this, so if a shader can't be found, I'm going to try to make my own. I can probably figure it out by referencing shaders that do sub-pixel positioning, scaling, and rotations, and if I get it working, I'll post it here.

    You can link all objects to the demo. Which would rotate and scale them. Hopefully you find what you're looking for.
    If you do create your own. That would be awesome too.

  • I'd gladly appreciate it if someone could pass me a background rotation shader for dx11 that's anchored to the center of the screen so that I can achieve this desired effect.

    Please!!


    Here you go, I hope this works.
    I posted this in the #shaders channel on discord a long time ago
    Please login to see this link.

  • If push comes to shove, you could probably do it without a shader if you had to (other than the one you'll use to zoom in to your smaller resolution). I added the ability to my internal level editor to zoom out so that I can see a more macro view of the level. The principle is simple enough: you just shrink every object and reposition it proportionally. With the right maths, you could probably achieve this for rotation too. Once you rotate all of your objects, I assume you could use trigonometry to figure out where they all should go. For each object, I guess the 3 points (a) current location (b) desired location (c) centre of the screen would form a right angle triangle, so it would be a matter of applying the right trig functions to figure it all out. It would probably be tricky and tedious, but then making a new shader probably would be as well.

    Yeah, if you want to zoom out in your game this is definitely the way to go about it, but setting this up can be a real pain to deal with. Depending on the type of movement your objects use in your project, this can get really complex.

    With that said, I've seen Peeblo talking on Discord, and ButterMun provided a great example here, so it may not be needed anymore, but I created a custom Shader for my project and wanted to share it here. I also made an example MFA that I think a lot of people would appreciate checking out.

    Please login to see this attachment.

    Using the method Peeblo was talking about, you can have your game zoomed in to 2x or 3x scale normally, and zoom out to 1x scale for specific scenes.

  • Yeah, if you want to zoom out in your game this is definitely the way to go about it, but setting this up can be a real pain to deal with. Depending on the type of movement your objects use in your project, this can get really complex.

    As I mentioned, I only did this for my internal level editor. So movement of the pieces was very limited. Basically just panning the world with mouse-drag, and centering the world on the cursor when scrollwheel-zooming. I can confirm that even just this was a serious headache to get working properly!


    Quote

    With that said, I've seen Peeblo talking on Discord, and ButterMun provided a great example here, so it may not be needed anymore, but I created a custom Shader for my project and wanted to share it here. I also made an example MFA that I think a lot of people would appreciate checking out.

    Terrific example!

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

    Edited once, last by Volnaiskra (May 5, 2023 at 12:46 AM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!