Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

241
Vistas
WebGL - culling mesh and hide the border

I have the following problem in WebGL. I 'm drawing a a simple mesh with a border in the 3D space with the culling activated.

gl.frontFace(gl.CCW);
gl.enable(gl.CULL_FACE);
gl.cullFace(gl.FRONT)

If the camera is set in front of the mesh, it is correcly visualized with the border FrontView

But if the camere is set back the mesh the border does not disappear BackView

The internal part of the mesh is draw as triangles

gl.drawElements(gl.TRIANGLES, indexBuffer.numberOfItems, gl.UNSIGNED_SHORT, 0);        

while the border as LINE_STRIP

gl.drawElements(gl.LINE_STRIP, borderIndex.numberOfItems, gl.UNSIGNED_SHORT, 0);        

Is there any option for lines to have the same behavior of the mesh without using normals in the shader?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

While triangles have an inherent front and back face based on their winding order lines don't have that so they're not affected by hardware culling.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda