mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Follow-up of 9abebe5fbe - Modified shader gouraud_light_instanced.vs to be more Intel's cards friendly
				
					
				
			This commit is contained in:
		
							parent
							
								
									08487835a9
								
							
						
					
					
						commit
						554aa70edc
					
				
					 1 changed files with 1 additions and 3 deletions
				
			
		| 
						 | 
					@ -34,9 +34,7 @@ void main()
 | 
				
			||||||
    float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
 | 
					    float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
 | 
					    intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
 | 
				
			||||||
	float width = 1.5 * i_scales.x;
 | 
					    vec4 world_position = vec4(v_position * vec3(vec2(1.5 * i_scales.x), 1.5 * i_scales.y) + i_offset - vec3(0.0, 0.0, 0.5 * i_scales.y), 1.0);
 | 
				
			||||||
	float height = 1.5 * i_scales.y;
 | 
					 | 
				
			||||||
    vec4 world_position = vec4(v_position * vec3(vec2(width), height) + i_offset - vec3(0.0, 0.0, 0.5 * i_scales.y), 1.0);
 | 
					 | 
				
			||||||
    vec3 eye_position = (gl_ModelViewMatrix * world_position).xyz;
 | 
					    vec3 eye_position = (gl_ModelViewMatrix * world_position).xyz;
 | 
				
			||||||
    intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(eye_position), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
 | 
					    intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(eye_position), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue