Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 23c8be0

Browse filesBrowse files
committed
readme
1 parent 196668d commit 23c8be0
Copy full SHA for 23c8be0

File tree

Expand file treeCollapse file tree

1 file changed

+18
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+18
-0
lines changed
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ Textures can be used as a `sampler2D` in a shader by using the `<sd-texture />`
9898
* `name`: specify a name for the texture uniform (will default to `u_texture{index}`)
9999
* `webcam`: overrides `src` and tries to use webrtc webcam as texture source
100100
* `force-update`: forces a texture to always update (useful when using a canvas animation or animated gif as a texture)
101+
* `shadow-root`: selector identifying a shadow-root to use for the `src` property. (Useful when using one shader-doodle as an image source for another shader-doodle, for example.)
101102

102103
#### Examples
103104

@@ -169,6 +170,23 @@ Textures can be used as a `sampler2D` in a shader by using the `<sd-texture />`
169170
</script>
170171
```
171172

173+
##### Second Shader-Doodle
174+
```html
175+
<shader-doodle id="buffer0">
176+
<!-- your doodle here -->
177+
</shader-doodle>
178+
179+
<shader-doodle>
180+
<sd-texture shadow-root="#buffer0" src="canvas" name="buffer0_canvas"></sd-texture>
181+
<script type="x-shader/x-fragment">
182+
uniform sampler2D buffer0_canvas;
183+
184+
// use first doodle as an image here
185+
186+
</script>
187+
</shader-doodle>
188+
```
189+
172190
##### Camera:
173191
```html
174192
<shader-doodle>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.