Recent

Author Topic: [SOLVED] Polygon Culling in NDC Space and in Window Space  (Read 5018 times)

wp

  • Hero Member
  • *****
  • Posts: 13622
Re: [SOLVED] Polygon Culling in NDC Space and in Window Space
« Reply #15 on: August 24, 2023, 01:18:07 pm »
Normalization is just "scaling", this would not affect the sign.
It will. When the first triangle is oriented towards the camera, while the second triangle is oriented away from the camera, the projected sum can be positive or negative depending on the length and direction of the normal vectors. When the vectors are not normalized the length of the normal vector will also depend on the size of the triangles, not only on the direction of the vector. It could be that a quad is warped and distorted so much that a small first triangle is oriented perfectly normal to the viewing direction, and the other triangle is large and points slightly away from the camera, so that the sum becomes negative. Therefore the quad would not be drawn although the overall result might be better to display it. Such a case, btw, indicates that it might be better to render on the basis of triangles. Or are your quads always flat?

Key-Real

  • Sr. Member
  • ****
  • Posts: 413
Re: [SOLVED] Polygon Culling in NDC Space and in Window Space
« Reply #16 on: August 24, 2023, 01:37:02 pm »
A Convex Polygon is always "Flat" :)
other wise it would be a concave one
« Last Edit: August 24, 2023, 01:44:40 pm by Key-Real »

Key-Real

  • Sr. Member
  • ****
  • Posts: 413
Re: [SOLVED] Polygon Culling in NDC Space and in Window Space
« Reply #17 on: August 24, 2023, 04:58:24 pm »
UPS, I had the dot product Error!

its not dot3   it  is a standard dot4 multiplication.

sorry.

! I edited my post from above !

so everything works now

« Last Edit: August 24, 2023, 05:14:57 pm by Key-Real »

 

TinyPortal © 2005-2018