Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When an OpenGL primitive moves placing one vertex outside the window, suddenly the color or texture mapping is incorrect. Whats going on?

0
Posted

When an OpenGL primitive moves placing one vertex outside the window, suddenly the color or texture mapping is incorrect. Whats going on?

0

There are two potential causes for this. When a primitive lies partially outside the window, it often crosses the view volume boundary. OpenGL must clip any primitive that crosses the view volume boundary. To clip a primitive, OpenGL must interpolate the color values, so they’re correct at the new clip vertex. This interpolation is perspective correct. However, when a primitive is rasterized, the color values are often generated using linear interpolation in window space, which isn’t perspective correct. The difference in generated color values means that for any given barycentric coordinate location on a filled primitive, the color values may be different depending on whether the primitive is clipped. If the color values generated during rasterization were perspective correct, this problem wouldn’t exist. For some OpenGL implementations, texture coordinates generated during rasterization aren’t perspective correct. However, you can usually make them perspective correct by calling glHi

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123