Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!