ShaderToy-Chrome-Plugin icon indicating copy to clipboard operation
ShaderToy-Chrome-Plugin copied to clipboard

suggestion: loading textures

Open FabriceNeyret opened this issue 5 years ago • 6 comments

Seems like the "loadable textures are coming very soon" didn't progressed for many years and might persist so :-( There already exist plugins dedicated to load textures at least client-side, but your plugin is the very principle one, that many people have, with all the useful things. ;-) -> do you think you could add a button at the bottom of iChannel boxes to load a texture, either from a file or URL ?

rmmcal just experienced in https://www.shadertoy.com/view/tdGGzc the magic clickable javascript javascript: H=location.host;E=(H?window:opener);E.document.getElementById("tab1").click();E.gShaderToy.SetTexture(1,{mSrc:'https://i.imgur.com/Qp7qcmh.png',mType:'texture',mID:1,mSampler:{filter:'mipmap',wrap:'repeat',vflip:'true',srgb:'false',internal:'byte'}});if(!H)close(); doing that (but to long for the 255 chars long description field. besides the uglyness).

Thanks !

FabriceNeyret avatar Oct 10 '19 14:10 FabriceNeyret

To consider but only when the user will not be able to save Shader as a public when he changed the texture to custom one.

That would be to bypass the main rule of this extension :policeman: - the shaders are to work the same way for people with and without this extension.

However, I'm still not a proponent of this feature :thinking:

One more thing is worth noting. You can not use ANY texture, not only about the power of two, but about the server settings (HTTP Headers/CORS stuff) from which the images are to be taken.

patuwwy avatar Oct 10 '19 19:10 patuwwy

a custom texture already can't be saved: iq does test this ;-) . and the situation would be the same for all users either they have the extension or not: the channel would be blank or stubbed at load, and the user invited (in description or header) to download some URL texture ( as I did for geometry images encoding meshes, or rmmcal did with a complex init state of Conway life, or what we could do for volumes, scenes, fonts, etc). In addition to the cases where autonomous users just want to apply their own alternate data to some existing shader (as they already can for the webcam). The choice is currently painful copy-paste in console or ugly javascript link in description. A convenient button could just be added to this choice. ;-)

NB: I don't understand your last sentence: textures can be any size, and I don't understand the server setting things. Does work with imgur, for instance.

FabriceNeyret avatar Oct 10 '19 19:10 FabriceNeyret

Ok, I'll consider it. The webcam argument is really convincing.

If you can 'make' textures with webcam, why not make it easier.

patuwwy avatar Oct 11 '19 08:10 patuwwy

Sorry, closed by mistake

patuwwy avatar Oct 11 '19 08:10 patuwwy

thanks ! NB: IQ just said it will "think about it next week", but again probably with strong limitation. -> maybe good to not hurry code it as soon as this WE ;-p

FabriceNeyret avatar Oct 11 '19 09:10 FabriceNeyret

NB: What about https://chrome.google.com/webstore/detail/shadertoy-custom-texures/jgeibpcndpjboeebilehgbpkopkgkjda ?

patuwwy avatar Oct 14 '19 19:10 patuwwy