Ric wrote: ↑Sun 15 Jun 2025, 11:15
Shadow mapping is not difficult...
This
article describes it as "not
that hard" but requiring "a lot of background knowledge" which I simply don't have! DirectX tutorials are unfortunately not directly relevant to
BBC BASIC for SDL 2.0, since they are Windows-only, unless you fancy adapting them to OpenGL/WebGL.
I'm also conscious that the average BBC BASIC user isn't going to be able to, or to want to, write shader code themselves so any approach which requires that degree of understanding isn't going to be widely relevant.
If it was feasible to create a 'shadow library' which hides the complexity behind a friendly wrapper that's another matter.
I have looked at the teapot code and i dont think this approach would be possible, because one would have to calculate if the light was underground or behind the main "sunlight"
I based my comment on you wanting to "make it go dark underground" which sounds like it would be easy to achieve with directional lighting, but probably the effect you are after is more subtle than that would produce.