Giter Site home page Giter Site logo

Comments (6)

patriciogonzalezvivo avatar patriciogonzalezvivo commented on May 18, 2024

Hi @riccardoscalco, I think I know where the problem originates... what happen if you change the size of the viewport?

Yesterday I detect a bug on GlslCanvas where doesn't render shader with no animation. The lack of u_time or u_mouse usually triggers a flag where the shader is only rendered when something change... and not constantly. I will take a look to that today

from glsleditor.

riccardoscalco avatar riccardoscalco commented on May 18, 2024

Probably your intuition is correct, this code works as expected:

#ifdef GL_ES
precision mediump float;
#endif

uniform vec2 u_resolution;
uniform float u_time;

void main() {
    vec2 st = gl_FragCoord.xy/u_resolution;
    gl_FragColor = vec4(st, 1.0, u_time);
}

There is no hurry on my side, thanks for the effort.

from glsleditor.

harry-isaac avatar harry-isaac commented on May 18, 2024

Hey, just wanted to +1 this and say I'm experiencing the issue too. A quick work around I realized, as you mentioned, is to add u_time somewhere. Doesn't even need to be in code, can be in a comment. So for now I'm just adding it to the top of my shaders like this:

//u_time

#ifdef GL_ES
precision mediump float;
#endif

uniform vec2 u_resolution;
uniform float u_time;

void main() {
    vec2 st = gl_FragCoord.xy/u_resolution;
    gl_FragColor = vec4(st, 0.0, 1.0);
}

from glsleditor.

patriciogonzalezvivo avatar patriciogonzalezvivo commented on May 18, 2024

Hi! sorry for this regression. I'll work on it

from glsleditor.

patriciogonzalezvivo avatar patriciogonzalezvivo commented on May 18, 2024

Ok... I think now is fixed @harryslotwiner @riccardoscalco could you give it a try?

from glsleditor.

riccardoscalco avatar riccardoscalco commented on May 18, 2024

@patriciogonzalezvivo I confirm, it works. Thanks!

from glsleditor.

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.