<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://berniebernie.fr/mediawiki-1.37.1/index.php?action=history&amp;feed=atom&amp;title=Vj</id>
	<title>Vj - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://berniebernie.fr/mediawiki-1.37.1/index.php?action=history&amp;feed=atom&amp;title=Vj"/>
	<link rel="alternate" type="text/html" href="https://berniebernie.fr/mediawiki-1.37.1/index.php?title=Vj&amp;action=history"/>
	<updated>2026-04-29T18:21:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://berniebernie.fr/mediawiki-1.37.1/index.php?title=Vj&amp;diff=269&amp;oldid=prev</id>
		<title>Bernie: /* Grab from */</title>
		<link rel="alternate" type="text/html" href="https://berniebernie.fr/mediawiki-1.37.1/index.php?title=Vj&amp;diff=269&amp;oldid=prev"/>
		<updated>2017-10-04T15:49:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Grab from&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===Grab from===&lt;br /&gt;
&lt;br /&gt;
* https://www.shadertoy.com/view/lsfcD7&lt;br /&gt;
&lt;br /&gt;
* https://www.shadertoy.com/view/4dcGW2 	@image en fragColor = rd; to remove ugly lighting&lt;br /&gt;
&lt;br /&gt;
* custom images in shadertoy: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
&lt;br /&gt;
A simple method to load custom image textures in Shadertoy!&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
The idea is to call directly the SetTexture function found in Shadertoy js code.&lt;br /&gt;
&lt;br /&gt;
Here is how to loads the three textures needed for this shader:&lt;br /&gt;
 - Open the javascript console of your browser:&lt;br /&gt;
				   Mac      /     Windows&lt;br /&gt;
	Chrome:  cmd + opt + J  /  ctrl + shift J&lt;br /&gt;
	Firefox: cmd + opt + K  /  ctrl + shift K&lt;br /&gt;
    IE:          na         /  F12   &lt;br /&gt;
&lt;br /&gt;
- Then copy the following lines in the console to load custom 2048x2048 textures:&lt;br /&gt;
&lt;br /&gt;
gShaderToy.SetTexture(0, {mSrc:&amp;#039;https://dl.dropboxusercontent.com/s/88u2uo8dxdmgzxo/world2.jpg?dl=0&amp;#039;, mType:&amp;#039;texture&amp;#039;, mID:1, mSampler:{ filter: &amp;#039;mipmap&amp;#039;, wrap: &amp;#039;repeat&amp;#039;, vflip:&amp;#039;true&amp;#039;, srgb:&amp;#039;false&amp;#039;, internal:&amp;#039;byte&amp;#039; }});&lt;br /&gt;
gShaderToy.SetTexture(1, {mSrc:&amp;#039;https://dl.dropboxusercontent.com/s/5rdhhnvnr5mochq/cloud2.jpg?dl=0&amp;#039;, mType:&amp;#039;texture&amp;#039;, mID:1, mSampler:{ filter: &amp;#039;mipmap&amp;#039;, wrap: &amp;#039;repeat&amp;#039;, vflip:&amp;#039;true&amp;#039;, srgb:&amp;#039;false&amp;#039;, internal:&amp;#039;byte&amp;#039; }});&lt;br /&gt;
gShaderToy.SetTexture(2, {mSrc:&amp;#039;https://dl.dropboxusercontent.com/s/ojl5zoxgbdn5w5s/light2.jpg?dl=0&amp;#039;, mType:&amp;#039;texture&amp;#039;, mID:1, mSampler:{ filter: &amp;#039;mipmap&amp;#039;, wrap: &amp;#039;repeat&amp;#039;, vflip:&amp;#039;true&amp;#039;, srgb:&amp;#039;false&amp;#039;, internal:&amp;#039;byte&amp;#039; }});&lt;br /&gt;
&lt;br /&gt;
- Or, the following lines for 1024x1024 textures:&lt;br /&gt;
&lt;br /&gt;
gShaderToy.SetTexture(0, {mSrc:&amp;#039;https://dl.dropboxusercontent.com/s/0j4q7p4x0upj40q/world1.jpg?dl=0&amp;#039;, mType:&amp;#039;texture&amp;#039;, mID:1, mSampler:{ filter: &amp;#039;mipmap&amp;#039;, wrap: &amp;#039;repeat&amp;#039;, vflip:&amp;#039;true&amp;#039;, srgb:&amp;#039;false&amp;#039;, internal:&amp;#039;byte&amp;#039; }});&lt;br /&gt;
gShaderToy.SetTexture(1, {mSrc:&amp;#039;https://dl.dropboxusercontent.com/s/26xr0l2ly68xgzh/cloud1.jpg?dl=0&amp;#039;, mType:&amp;#039;texture&amp;#039;, mID:1, mSampler:{ filter: &amp;#039;mipmap&amp;#039;, wrap: &amp;#039;repeat&amp;#039;, vflip:&amp;#039;true&amp;#039;, srgb:&amp;#039;false&amp;#039;, internal:&amp;#039;byte&amp;#039; }});&lt;br /&gt;
gShaderToy.SetTexture(2, {mSrc:&amp;#039;https://dl.dropboxusercontent.com/s/b67udjdsw4gzf99/light1.jpg?dl=0&amp;#039;, mType:&amp;#039;texture&amp;#039;, mID:1, mSampler:{ filter: &amp;#039;mipmap&amp;#039;, wrap: &amp;#039;repeat&amp;#039;, vflip:&amp;#039;true&amp;#039;, srgb:&amp;#039;false&amp;#039;, internal:&amp;#039;byte&amp;#039; }});&lt;br /&gt;
&lt;br /&gt;
- hit return to execute and load the textures.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using your own images:&lt;br /&gt;
 - The first argument of gShaderToy.SetTexture() is the iChannel index from 0 to 3&lt;br /&gt;
 - The second argument defines the url and additional parameters of the texture.&lt;br /&gt;
 - Your images must be hosted on a server (such as Dropbox) that allows direct link &lt;br /&gt;
   from a different domain in javascript. Otherwise, you will get an error message:&lt;br /&gt;
   &amp;quot;&amp;#039;example.com has been blocked from loading by Cross-Origin Resource Sharing policy&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bernie</name></author>
	</entry>
</feed>