Giter Club home page Giter Club logo

Comments (13)

Malacath-92 avatar Malacath-92 commented on May 28, 2024

If you want to feedback into the same buffer use the "target" self. Also if you are on the newest version I would suggest you to use the more standard syntax
#iChannel0 "file:\\self"
The way you are doing it is deprecated and will be removed eventually. Presumably in version 1.0

Edit: We should probably consider fixing your way of defining the file itself rather than naming self

from shader-toy.

Malacath-92 avatar Malacath-92 commented on May 28, 2024

I tested your shader locally using the above line of code. The result is as expected, compared to the online version. But I noticed that the screenshot function seems to not handle this shader very well, so that is a new todo :)
shadertoy

Edit: And somehow the uploaded image looks even worse for me...

from shader-toy.

yafacex avatar yafacex commented on May 28, 2024

I have tried what you suggest.But still not work.(Vscode Version 1.35.1)In Developer console.I see errors as below:

(node:5684) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
ERR Method not implemented.: Error: Method not implemented.
at GLSLLintingProvider.provideCodeActions (C:\Users\Administrator.vscode\extensions\cadenas.vscode-glsllint-0.0.5\out\src\features\glsllintProvider.js:89:15)

from shader-toy.

Malacath-92 avatar Malacath-92 commented on May 28, 2024

Wow, I have never seen these kinds of error messages. What system are you running on?

from shader-toy.

Malacath-92 avatar Malacath-92 commented on May 28, 2024

@yafacex Are you sure this is our issue? I just realized the path specified is part of the glsllint extension. Try disabling that extension and see if it works then.
If it does, try reenabling it and wrapping your channel definitions inside and ifdef like so:

#ifdef SHADER_TOY
#iChannel0 "file://self"
#endif

from shader-toy.

yafacex avatar yafacex commented on May 28, 2024

Still not work(Windows7 Vscode 1.35.1).I tried another https://www.shadertoy.com/view/llBBRz . It just ouputs blank white.I got some openGL errors.
bufferA2.glsl.txt

[Embedded Page] [.Offscreen-For-WebGL-00000000058694B0]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawArrays: framebuffer incomplete
workbench.main.js:3551 [Embedded Page] [.Offscreen-For-WebGL-00000000058694B0]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
workbench.main.js:3551 [Embedded Page] THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.

from shader-toy.

yafacex avatar yafacex commented on May 28, 2024

Still not work(Windows7 Vscode 1.35.1).I tried another https://www.shadertoy.com/view/llBBRz . It just ouputs blank white.I got some openGL errors.
bufferA2.glsl.txt

[Embedded Page] [.Offscreen-For-WebGL-00000000058694B0]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawArrays: framebuffer incomplete
workbench.main.js:3551 [Embedded Page] [.Offscreen-For-WebGL-00000000058694B0]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
workbench.main.js:3551 [Embedded Page] THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.

I tried a simple one .It also outputs these errors,but result is right.I will test more later...

from shader-toy.

Malacath-92 avatar Malacath-92 commented on May 28, 2024

I tried another https://www.shadertoy.com/view/llBBRz

This outputs plain white for me on the online version as well. So I'm not too surprised.

The other problems are only warnings. I can look into them, but they shouldn't cause these issues.

from shader-toy.

yafacex avatar yafacex commented on May 28, 2024

I'm sorry for that.I put three examples here in zip file : main1.glsl , main2.glsl, main3.glsl. All use buffer feature.Only main1.glsl works fine.The shadertoy link address is at top of the each file.Maybe I write something wrong?
shadertoy.zip

from shader-toy.

Malacath-92 avatar Malacath-92 commented on May 28, 2024

The third shader is only a problem of us having the first frame on iFrame == 1 instead of iFrame == 0, if you thus rewrite the shader to test against that instead of iFrame < 1 it will work.
The second shader requires the same treatment, but it also seems to proc a bug in the extension, I will take a good look at that.

from shader-toy.

Malacath-92 avatar Malacath-92 commented on May 28, 2024

With the second example, some of the inputs are wrong, i.e. not corresponding to the same shaders as they do on the online version, which you can fix yourself.
Then the noise texture used for some randomness in the particles is missing, which causes some unexpected behavior, so for the time being I just disabled that line.
Most importantly though, the extension bugs out on circular dependencies of, which afaik happened here only because of the first point I mentioned. But a fix is incoming.

from shader-toy.

Malacath-92 avatar Malacath-92 commented on May 28, 2024

Thanks for opening this issue @yafacex
Those were some of the most complex shaders this extension has seen in my testing, so it helped a lot 😃

from shader-toy.

Malacath-92 avatar Malacath-92 commented on May 28, 2024

Closing this since @yafacex didn't report any more issues.

from shader-toy.

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.