# Custom Shader Textures sampling a texture and blending from a ShaderMaterial. ```{raw} html ▶ Run in browser ``` **Tags:** `3d` Demonstrates: - ShaderMaterial.set_texture() bound to the texture2D the shader declares - Separated texture + sampler declarations in the material's own group - transparent=True: an alpha-blended custom material over opaque geometry - A tiled floor receding to the horizon: the minified half of the mip chain - Rebinding a texture on a LIVE material: T swaps all three surfaces to a second image mid-frame, and the next frame samples it - The same scene rendering identically on the Vulkan and web backends Controls: A / D - Orbit camera T - Swap the texture every surface samples Escape - Quit Usage: uv run python examples/features/3d/custom_shader_texture.py uv run python examples/features/3d/custom_shader_texture.py --test ## Source ```{literalinclude} ../../examples/features/3d/custom_shader_texture.py :language: python :linenos: ```