3d texture from image

This commit is contained in:
2023-03-31 18:42:12 +02:00
parent 73e88916e9
commit 96f41ea6b3
4 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
<body>
<repa-shader id="demoshader" fs-input="fsinput" alpha mouse width=512 height=512>
<repa-texture src="avatar.png" name="tex_avatar" wrap="mirrored_repeat"></repa-texture>
<repa-texture t3d name="test3d" filter="nearest"></repa-texture>
<repa-texture t3d src="3dt.png" name="test3d" filter="linear" width=32 height=32 depth=32></repa-texture>
void main() {
vec2 uv = gl_FragCoord.xy / resolution.xy;
vec3 col = texture(tex_avatar, uv).rgb;
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB