mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	#7461 - Use three floats for defining vertex normal to render travel toolpaths. This fixes a crash on NVIDIA Quadro graphics cards when turning on travel moves visibility in preview.
This commit is contained in:
		
							parent
							
								
									0538363b2b
								
							
						
					
					
						commit
						cc2b8da6a4
					
				
					 2 changed files with 11 additions and 17 deletions
				
			
		|  | @ -2,18 +2,8 @@ | |||
| 
 | ||||
| varying vec3 eye_normal; | ||||
| 
 | ||||
| vec3 world_normal() | ||||
| { | ||||
|     // the world normal is always parallel to the world XY plane | ||||
|     // the x component is stored into gl_Vertex.w | ||||
|     float x = gl_Vertex.w; | ||||
|     float y = sqrt(1.0 - x * x); | ||||
|     return vec3(x, y, 0.0); | ||||
| } | ||||
| 
 | ||||
| void main() | ||||
| { | ||||
|     vec4 world_position = vec4(gl_Vertex.xyz, 1.0); | ||||
|     gl_Position = gl_ModelViewProjectionMatrix * world_position; | ||||
|     eye_normal = gl_NormalMatrix * world_normal();     | ||||
|     gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; | ||||
|     eye_normal = gl_NormalMatrix * gl_Normal; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 enricoturri1966
						enricoturri1966