I remember that we had to embed shaders into html like so:
<script id="fragmentShader" type="x-shader/x-vertex"> </script>
<script id="vertexShader" type="x-shader/x-vertex"></script>
For me this isnt ideal. Of course I could create shader files and use PHP to include them but I dont want that either.
Is there any alternatives to use shaders in HTML without third party tools?
The shader code has to be available somehow to the WebGL code, so there is no magic here. Some alternatives are:
wasm
file. In this case the shader sources will be hidden inside the wasm
file and will be processed directly by the browser.