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: https://jsfiddle.net/2gnupb0y/

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

3 Likes

Thanks a lot, this is exactly what I need!