Comments (13)
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.
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 :)
Edit: And somehow the uploaded image looks even worse for me...
from shader-toy.
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.
Wow, I have never seen these kinds of error messages. What system are you running on?
from shader-toy.
@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.
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.
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.
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.
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.
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.
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.
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.
Closing this since @yafacex didn't report any more issues.
from shader-toy.
Related Issues (20)
- iMouse.w behavior is different from Shadertoy
- Make available as web extension HOT 2
- Compilation Error with includes HOT 2
- Feature request: setting to start the shader paused HOT 5
- Feature request: leave the preview alone if compilation fails HOT 2
- Feature request: GLSL ES 3.0 Support HOT 1
- bug report on self-input-buffer and solution to it HOT 1
- Feature request: import from shadertoy url and from shadertoy export json HOT 2
- Frametime panel blocks the Controls panel
- Feature request: export as video HOT 7
- Feature request: breakpoint debug shaders HOT 1
- Feature request: reload texture when the image changes
- Recording w/ the framerate graph enabled errantly records the framerate graph and not the shader HOT 1
- Feature request: Export Frames as PNG for High-Resolution Video Creation HOT 1
- Add .reloadOnSave HOT 1
- can't run glslify example HOT 5
- Cant preview any shader HOT 1
- Compilation error when using #define HOT 1
- Weird Artifact on Custom Screenshot Resolutions
- The menu is displayed even for files other than .glsl.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shader-toy.