diff --git a/regression_tests/q3map2/degenerate_winding2/README.txt b/regression_tests/q3map2/degenerate_winding2/README.txt new file mode 100644 index 0000000..b36f2db --- /dev/null +++ b/regression_tests/q3map2/degenerate_winding2/README.txt @@ -0,0 +1,14 @@ +DESCRIPTION OF PROBLEM: +======================= + +The sample map contains a wedge brush. The tip (the sharp edge) of the wedge +is chopped off by 2 planes, leaving very narrow windings. Each of these 2 +narrow windings is less than 0.1 units tall. However, the wedge has height +exactly equal to 1/8 unit at the point where it is chopped. Therefore, +the two narrow sides caused by the chops are expected to be degenerate and the +top face of the wedge is expected to be unaffected. This should leave a +"hole" in the narrow part of the wedge. + +The hole isn't desirable but it's expected based on the logic in the code. +Still, if there is a hole in the brush, I consider this regression test to +be broken. diff --git a/regression_tests/q3map2/degenerate_winding2/maps/degenerate_winding2.map b/regression_tests/q3map2/degenerate_winding2/maps/degenerate_winding2.map new file mode 100644 index 0000000..3956965 --- /dev/null +++ b/regression_tests/q3map2/degenerate_winding2/maps/degenerate_winding2.map @@ -0,0 +1,14 @@ +// entity 0 +{ +"classname" "worldspawn" +// brush 0 +{ +( 7 0 0 ) ( 7 0 1 ) ( 7 64 1 ) radiant_regression_tests/green 0 0 0 0.500000 0.500000 0 0 0 +( 7 0 0 ) ( 7 64 0 ) ( -1 64 0 ) radiant_regression_tests/blue 0 0 0 0.500000 0.500000 0 0 0 +( 7 0 1 ) ( 7 0 0 ) ( -1 0 0 ) radiant_regression_tests/green 0 0 0 0.500000 0.500000 0 0 0 +( -1 64 0 ) ( 7 64 0 ) ( 7 64 1 ) radiant_regression_tests/green 0 0 0 0.500000 0.500000 0 0 0 +( 7 0 1 ) ( -1 0 0 ) ( -1 64 0 ) radiant_regression_tests/blue 0 0 0 0.500000 0.500000 0 0 0 +( -1 0 2 ) ( 0 0 0 ) ( 0 64 0 ) radiant_regression_tests/red 0 0 0 0.500000 0.500000 0 0 0 +( 1 0 2 ) ( -7 0 -13 ) ( -7 64 -13 ) radiant_regression_tests/red 0 0 0 0.500000 0.500000 0 0 0 +} +} diff --git a/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/blue.tga b/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/blue.tga new file mode 100644 index 0000000..f6ad38a Binary files /dev/null and b/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/blue.tga differ diff --git a/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/green.tga b/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/green.tga new file mode 100644 index 0000000..8f6d3a4 Binary files /dev/null and b/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/green.tga differ diff --git a/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/red.tga b/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/red.tga new file mode 100644 index 0000000..eec24b6 Binary files /dev/null and b/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/red.tga differ diff --git a/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/tile.tga b/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/tile.tga new file mode 100644 index 0000000..2154015 Binary files /dev/null and b/regression_tests/q3map2/degenerate_winding2/textures/radiant_regression_tests/tile.tga differ diff --git a/regression_tests/q3map2/degenerate_winding3/README.txt b/regression_tests/q3map2/degenerate_winding3/README.txt new file mode 100644 index 0000000..3aa08fc --- /dev/null +++ b/regression_tests/q3map2/degenerate_winding3/README.txt @@ -0,0 +1,18 @@ +DESCRIPTION OF PROBLEM: +======================= + +The sample map contains a wedge brush. The tip (the sharp edge) of the wedge +is chopped off by the YZ plane (side 5, or the last side, of the brush). +The height of the wedge where it is chopped is about 0.9. This makes it +barely smaller than DEGENERATE_EPSILON. So the face resulting from the chop +is probably degenerate, and that winding will be removed. I'm now wondering +what happens to the rest of the brush. 0.9 rounded to the nearest 1/8 unit +is 1/8, so the top face of the brush should get a slight raise, making the +"hole" even bigger. The sides will have degenerate edges near the chop, so +they will become triangles, creating open slivers in the sides. + +Although this behavior is a tad nasty, it is expected based on the way the +code is written. I want to make sure nothing really nasty happens. + +I consider this regression test to be broken if there is a "hole" in the brush, +and I consider this test to be very broken if something more drastic happens. diff --git a/regression_tests/q3map2/degenerate_winding3/maps/degenerate_winding3.map b/regression_tests/q3map2/degenerate_winding3/maps/degenerate_winding3.map new file mode 100644 index 0000000..418757d --- /dev/null +++ b/regression_tests/q3map2/degenerate_winding3/maps/degenerate_winding3.map @@ -0,0 +1,13 @@ +// entity 0 +{ +"classname" "worldspawn" +// brush 0 +{ +( 10 0 0 ) ( 10 0 1 ) ( 10 64 1 ) radiant_regression_tests/green 0 0 0 0.500000 0.500000 0 0 0 +( 10 0 0 ) ( 10 64 0 ) ( -1 64 0 ) radiant_regression_tests/blue 0 0 0 0.500000 0.500000 0 0 0 +( 10 0 1 ) ( 10 0 0 ) ( -1 0 0 ) radiant_regression_tests/green 0 0 0 0.500000 0.500000 0 0 0 +( -1 64 0 ) ( 10 64 0 ) ( 10 64 1 ) radiant_regression_tests/green 0 0 0 0.500000 0.500000 0 0 0 +( 10 0 1 ) ( -1 0 0 ) ( -1 64 0 ) radiant_regression_tests/blue 0 0 0 0.500000 0.500000 0 0 0 +( 0 0 1 ) ( 0 0 0 ) ( 0 64 0 ) radiant_regression_tests/red 0 0 0 0.500000 0.500000 0 0 0 +} +} diff --git a/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/blue.tga b/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/blue.tga new file mode 100644 index 0000000..f6ad38a Binary files /dev/null and b/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/blue.tga differ diff --git a/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/green.tga b/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/green.tga new file mode 100644 index 0000000..8f6d3a4 Binary files /dev/null and b/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/green.tga differ diff --git a/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/red.tga b/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/red.tga new file mode 100644 index 0000000..eec24b6 Binary files /dev/null and b/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/red.tga differ diff --git a/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/tile.tga b/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/tile.tga new file mode 100644 index 0000000..2154015 Binary files /dev/null and b/regression_tests/q3map2/degenerate_winding3/textures/radiant_regression_tests/tile.tga differ