According to OpenGL - Textures threre are 4 modes, but Babylon does not support #define GL_CLAMP_TO_BORDER 0x812D <==== what I need #define GL_CLAMP_TO_EDGE 0x812F #define GL_MIRRORED_REPEAT 0x8370 #define GL_REPEAT 0x2901
On my OSM streeds are direction arrows.
The right one goes to the border and causes side effekts according to GL_CLAMP_TO_EDGE
(The left one needed a transparent 32 pixel border to be ok)
So I “manipulated” babylon.max.js, added TEXTURE_BORDER_ADDRESSMODE = 4 and
case Engine.TEXTURE_BORDER_ADDRESSMODE:
return 0x812D; // there is no _gl.CLAMP_TO_BORDER !!!
But now, I got Error: WebGL warning: texParameter: pname 0x2803: Invalid param 0x812d.
ThreeJS also does NOT support it.
If WebGL does support it, BJS schould do it too please.
I read in the web, using GL_CLAMP_TO_EDGE and set borderColor would do it to. But there is no borderColor in BJS, is there?
So the only thing we cold do is, to clarify the BJS documentation: CLAMP_ADDRESSMODE equals GL_CLAMP_TO_EDGE And GL_CLAMP_TO_BORDER is not supported in WebGL Vx.y
What about WebGPU? Looks like it is the same: enum GPUAddressMode { “clamp-to-edge” “repeat” “mirror-repeat” };
@Pryme8 Thank you for you inspiration. I think, I understand your code. But as I a totally amateur about shaders, a Playground may help me. Yet it’s not a BJS toppic any more. I will try to understand it, using CYOS …