Loading cubemap into a shader

For my raymarching shader, I want to load a cube map directly into the shader to do my light calculations.
Does anyone have an example for me, unfortunately, I can only find cube map examples where the map is loaded in threejs and not passed into the shader as a texture?

Thanks

I’ve developed a simple custom skybox material that shows how to use a cube map in a shader: Edit fiddle - JSFiddle - Code Playground

Nothing fancy, you just have to pick the correct uniform type.

4 Likes

Thanks a lot, this is exactly what I need!