DE EN FR ES IT CZ
Back Back to top

shaderZoom, question about shaders.

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  • #1, by ke4 13 years ago Quote
    Hi,

    could you please explain me how does this shaders works?
    I tried to do a simple zoom, at beginning of one of my scene, but i don't fully undestand.
    i tried shaderZoom(1.2, 3000, easeQuintOut or easeBounceInOut) according to wiki, but it's not working, its zoomed immediately without any delay, it is not centered to the center of screen, and i would like to use something simple like Linear or swing ease, where can i found what easing i can use? Thanks.
  • New to Visionaire Studio?

    Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.

    See the Indie Bundle Try it for free
  • #2, by afrlme 13 years ago Quote
    most of these can be used. Remember though that in VS the names are slightly different, so instead of easeInQuint it is easeQuintIn.

    ease > name > direction.

    shaderZoom just zooms into the current viewport position.

    shaderFollowCharacter will zoom into character position & follow him around the screen until you call stopFollow function, or whatever it is called - I forget.

    You have added the latest version of the shader toolkit as a definition script to your project?
  • #3, by ke4 13 years ago Quote
    Thanks for the link,
    yes, i added the latest one. Now i used this and it works how i wanted to:

    shaderViewport(1.2, 150, 50, 0, 3000, easeQuadInOut)

    But still don't understand why i had to set up x150 z50 for zoom to center (instead of 0,0 or 150, 150)
  • #4, by afrlme 13 years ago Quote
    Let's see...

    zoom, x, y, rotation, delay & easing no?

    The default viewport x,y value is 0,0 which is the top left corner of the image. So when you zoom in you need to pan the camera to make it zoom into part of screen you want. It doesn't zoom into the center. There's other issues too like the fact that shader camera can go past the game background image itself. The min value of x & y should be 0 & the max value of y should be scene height - game default resolution y & max x value should be scene width - game default resolution.x to prevent camera from going past boundaries.
  • #5, by ke4 13 years ago Quote
    Ah, okay :-)
  • #6, by afrlme 13 years ago Quote
    Actually it does zoom into center of viewport, well that's what Simon just told me. But I'm guessing you were wanting it to zoom into a specific spot which is why you added the offset values.
  • #7, by ke4 13 years ago Quote
    This is what zoom i wanted.