Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

242
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda