mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 05:33:00 +00:00 
			
		
		
		
	Fix z-fighting on bold printout borders.
- Changed page background to render as one quad, instead of two halves. - Set page background to a z-offset that is between zeroth (potentially bold border) and subsequent background pages. Bold borders were at the same z-offset before.
This commit is contained in:
		 Toad-Dev
					Toad-Dev
				
			
				
					committed by
					
						 Jonathan Coates
						Jonathan Coates
					
				
			
			
				
	
			
			
			 Jonathan Coates
						Jonathan Coates
					
				
			
						parent
						
							d967730085
						
					
				
				
					commit
					51c3a9d8af
				
			| @@ -115,8 +115,11 @@ public final class PrintoutRenderer | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         // Left half | ||||
|         drawTexture( transform, buffer, x, y, z, X_FOLD_SIZE * 2, 0, X_SIZE / 2.0f, Y_SIZE, light ); | ||||
|         // Current page background: Z-offset is interleaved between the "zeroth" left/right page and the first | ||||
|         // left/right page, so that the "bold" border can be drawn over the edge where appropriate. | ||||
|         drawTexture( transform, buffer, x, y, z - 1e-3f * 0.5f, X_FOLD_SIZE * 2, 0, X_SIZE, Y_SIZE, light ); | ||||
| 
 | ||||
|         // Left pages | ||||
|         for( int n = 0; n <= leftPages; n++ ) | ||||
|         { | ||||
|             drawTexture( transform, buffer, | ||||
| @@ -127,8 +130,7 @@ public final class PrintoutRenderer | ||||
|             ); | ||||
|         } | ||||
| 
 | ||||
|         // Right half | ||||
|         drawTexture( transform, buffer, x + X_SIZE / 2.0f, y, z, X_FOLD_SIZE * 2 + X_SIZE / 2.0f, 0, X_SIZE / 2.0f, Y_SIZE, light ); | ||||
|         // Right pages | ||||
|         for( int n = 0; n <= rightPages; n++ ) | ||||
|         { | ||||
|             drawTexture( transform, buffer, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user