mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	 95e4ab9460
			
		
	
	
		95e4ab9460
		
	
	
	
	
		
			
			Object disappearance was caused by calling glPolygonOffset for rendered triangles in the multi-material painting gizmo to resolve z-fighting between painted triangles and contours around selected areas using seed/bucket fill.
		
			
				
	
	
		
			11 lines
		
	
	
	
		
			333 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			333 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| #version 110
 | |
| 
 | |
| const float EPSILON = 0.0001;
 | |
| 
 | |
| void main()
 | |
| {
 | |
|     gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
 | |
|     // Values inside depth buffer for fragments of the contour of a selected area are offset
 | |
|     // by small epsilon to solve z-fighting between painted triangles and contour lines.
 | |
|     gl_FragDepth = gl_FragCoord.z - EPSILON;
 | |
| }
 |