I need to draw on the texture of a photodome from the texture coordinates corresponding to those pointed by the mouse. To do that I replace the texture generated by the Photodome constructor with a dynamic texture.
I almost managed to achieve what I wanted, the only problem is that when I set the dynamic texture to the dome, it is upside down.
I tried to play with parameters like “useDirectMapping” in the dome constructor, or the invertY parameter in the texture options, but either the texture is upside down, or it is the texture coordinates that are inverted (and thus the drawing gets inverted and does’nt follow the mouse anymore)
I feel like I could cheat with some math to “compensate” that effect, but I was hoping there would be a cleaner/simpler solution that I missed.
Here is a playground to illustrate the problem : Photodome drawing | Babylon.js Playground (babylonjs.com)
Thank you for your help !