I want to display a videotexture on a sphere with a variable arc value. I am facing black or white seams at the edges of the sphere. Clamping the texture in the inspector removes the seams.
Seam without clampU or clampV:
No more seam with clampU and clampV enabled.
I enable clampU by setting wrapU to BABYLON.Constants.TEXTURE_WRAP_ADDRESSMODE but this is not working on a videotexture for me. Sadly I cant reproduce the seam on a playground but I have the playground where clampU is not enabled when I set wrapU. Here is the link: https://playground.babylonjs.com/#SQ5UC1#469
Am I setting the wrong variable to enable clampU?
Thanks for helping
For clamping, you should use the
WRAP_ADDRESSMODE is for wrapping.
I updated the PG but it looks like ClampU is still disabled on the videotexture…
You must set the value after the video is loaded:
Yes, thats working!
What is the reason for that? When I set warpU on normal textures I dont have to wait for the texture to be loaded.
That’s because the
wrapV properties are set to the “wrap” mode by default by the class after the video is loaded.
Okay, and why exactly does this happen? And is this documented somewhere?
That’s how the class is currently implemented, I can’t tell more
This PR will add some explanations about this:
Alright thank you very much
Seems like a bug compared to Texture ? @Evgeni_Popov did you look into the root cause ? I can if you want ?
I don’t know why we set the wrap mode to “wrap” (maybe there was a bug at some time, either on our side or in the (a) browser, that required we set this mode?), but in any case it would be a breaking change if we changed that…