Giter Club home page Giter Club logo

Comments (3)

gunrot avatar gunrot commented on May 13, 2024 1

Yes , simply change progress changing direction from 1.0 to 0.0 instead of 0.0 to 1.0. Or replace progress by myprogress in transition function and add float myprogress = 1.0 - progress; to the beginning of this function.

from gl-transitions.

IdontGetThePointOfMakingAAccountForThis avatar IdontGetThePointOfMakingAAccountForThis commented on May 13, 2024

Pretty sure it is more complicated than that.
The only progresses happening are

vec4 transition(vec2 op) { float uz = unzoom * 2.0*(0.5-distance(0.5, progress)); vec2 p = -uz*0.5+(1.0+uz) * op; vec2 fromP = xskew( (p - vec2(progress, 0.0)) / vec2(1.0-progress, 1.0), 1.0-mix(progress, 0.0, persp), 0.0 ); vec2 toP = xskew( p / vec2(progress, 1.0), mix(pow(progress, 0.0), 1.0, persp), 1.0

from gl-transitions.

IdontGetThePointOfMakingAAccountForThis avatar IdontGetThePointOfMakingAAccountForThis commented on May 13, 2024

Okay, I already nailed it on my own.

However! The intention of using the cube backwards was because I needed a transition in my editing software (Wondershare Filmora).

Since:

  1. the only directional transition moves the opposite way
  2. they didn't want to give me the OpenGL code of the directional transition;
  3. AND it was buried deep in the source code of Filmora)

I needed to prepare one of these transitions for the coding of my editing software.

Of course a hassle, along with trying out the cube transition and making the perspective flat to make it look like a directional transition.

But now I nailed it and I am extremely excited.

btw here is the modified code

precision mediump float;
#endif
float progress = PREFIX(global_time);
vec2 resolution = iResolution;

vec4 FUNCNAME (vec2 uv) {
  vec2 p = uv + progress * vec2(1.0, 1.0);
  vec2 f = fract(p);
  return mix(
    INPUT2(f),
    INPUT1(f),
    step(0.0, p.y) * step(p.y, 1.0) * step(0.0, p.x) * step(p.x, 1.0)
  );
}

But still, I would like to know the answer for other people who probably would have the same problem

from gl-transitions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.