Announcement

Collapse
No announcement yet.

Z-Fighting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Z-Fighting

    Any way to fix this in GLPRO? I read somewhere that using gl_ztrick 1 would help but nope.
    e|------------------------0---------------
    B|---------------0^1----------------1----
    G|---------------2------2------0^2-------
    D|---------------2-------2--2-------------
    A|---------------0------------------------
    E|----------------------------------------

  • #2
    There is no way to fix that in GLPRO. It isn't something that can be controlled by a cvar, it is a deficiency in the GLQuake engine code.

    I implemented a z-fighting fix in my work on the ProQuake engine, but it looks like the Z-fighting fix in ezQuake is even better.
    Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

    So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

    Comment


    • #3
      It's a problem in the map really. A brush entity (door, lift) shares a face with a world brush, and you have a mess.

      Open the map in an editor, correct the problem, recompile.
      Scout's Journey
      Rune of Earth Magic

      Comment


      • #4
        For me this worked best in Qrack, might be ported to proQuake....etc..

        Code:
        void GL_PolygonOffset (int offset)
        {
        	if (offset > 0)
        	{
        		glEnable (GL_POLYGON_OFFSET_FILL);
        		glEnable (GL_POLYGON_OFFSET_LINE);
        		glPolygonOffset(1, offset);
        	}
        	else if (offset < 0)
        	{
        		glEnable (GL_POLYGON_OFFSET_FILL);
        		glEnable (GL_POLYGON_OFFSET_LINE);
        		glPolygonOffset(-1, offset);
        	}
        	else
        	{
        		glDisable (GL_POLYGON_OFFSET_FILL);
        		glDisable (GL_POLYGON_OFFSET_LINE);
        	}
        }
        ____________________________

        ***PROQUAKE 3.50***
        in void R_DrawBrushModel (entity_t *ent)

        Code:
        	// draw the polygon
        		if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
        			(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON)))
        		{
                                GL_PolygonOffset(1);//<<<<<<<<<<<<<<<<<<<<<<<<
        			if (gl_texsort.value)
        				R_RenderBrushPoly (psurf);
        			else
        				R_DrawSequentialPoly (psurf);
                                GL_PolygonOffset(0);//<<<<<<<<<<<<<<<<<<<<<<<<
        		}
        Side note: Solecord can we extend the limit of the "[code/code]" window so they don't have to scroll left/right??


        Alt side note: surfer girl is hot!
        www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

        Comment


        • #5
          Thanks for that code Rook. I used a different z-fighting fix, one I believe I borrowed from unofficial glquake113.exe; it did reduce the flicker to zero but you still saw the plane of the entity.

          The fix you used looks MUCH nicer.
          Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

          So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

          Comment


          • #6
            surfergirl is also white as snow

            Comment


            • #7
              purity is bliss c*s...
              www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

              Comment


              • #8
                Originally posted by Baker View Post
                Thanks for that code Rook. I used a different z-fighting fix, one I believe I borrowed from unofficial glquake113.exe; it did reduce the flicker to zero but you still saw the plane of the entity.

                The fix you used looks MUCH nicer.
                untested in pq3.5 as in Qrack, I place the offset func before/after it renders the texture chains, yet are not in pq...
                ezQuake offsets polygons globally which screws up ALL textures, yet the z-fight is plats/doors/lifts vs bsp textures not thinks like decals, particles, entity textures...
                www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

                Comment

                Working...
                X