Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7082893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:06:39+00:00 2026-05-28T07:06:39+00:00

I am doing shadow mapping using OpenGL. There is a z-fighting problem when comparing

  • 0

I am doing shadow mapping using OpenGL. There is a z-fighting problem when comparing the depth with the shadow map. I can solve the problem using glPolygonOffset. I know this function helps push(or pull) the polygon a little bit so that the z-fighting problem is solved.
But I have a question about the function glPolygonOffset. I do not know clearly why the slope of the polygon is related to the offset.

From here:

The factor parameter is required to ensure correct results for filled primitives that are nearly edge-on to the viewer. In this case, the difference between Z values for the same pixel generated by two coplanar primitives can be as great as the maximum Z slope in X or Y. This Z slope will be large for nearly edge-on primitives, and almost non-existent for face-on primitives. The factor parameter lets you add this type of variable difference into the resulting depth offset.

Here I do not know why “the difference between Z values for the same pixel generated by two coplanar primitives can be as great as the maximum Z slope in X or Y.”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:06:40+00:00Added an answer on May 28, 2026 at 7:06 am

    If the polygons have Z slope, then there’s a difference in the z-coordinate between the left and right edge of the pixel.

    So to put something in front, you have to make sure that it’s in front no matter where in the pixel the z-coordinate is calculated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone know how to get around this problem? I'm doing some custom button styling.
Doing an ajax get request works as expected using the following code: $.ajax({ type:
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
I know this is something I'm probably doing wrong, so please don't incinerate me
Whats the best way to add a user/group in linux using C++ is there
I am trying to achieve a gradient + text shadow effect in Chrome/Safari using
I have a NSImageView and want to add a shadow. I've tried doing it
Hai, I am doing one application, in that i want to provide the shadow
I know it doesn't exist, but is there a pure CSS version? Would like
Can I have an inset shadow along the bottom of a div only? I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.