Подключение атласа теней
This commit is contained in:
		
							parent
							
								
									50137824a9
								
							
						
					
					
						commit
						8fb738acb1
					
				@ -180,7 +180,7 @@ int main(void)
 | 
			
		||||
    lightShader.load(GL_VERTEX_SHADER, "shaders/quad.vert");
 | 
			
		||||
    lightShader.load(GL_FRAGMENT_SHADER, "shaders/lighting.frag");
 | 
			
		||||
    lightShader.link();
 | 
			
		||||
    const char* gtextures_shader_names[]  = {"gPosition", "gNormal", "gDiffuseP", "gAmbientSpecular", "sunShadowDepth"};
 | 
			
		||||
    const char* gtextures_shader_names[]  = {"gPosition", "gNormal", "gDiffuseP", "gAmbientSpecular", "sunShadowDepth", "pointShadowDepth"};
 | 
			
		||||
    lightShader.bindTextures(gtextures_shader_names, sizeof(gtextures_shader_names)/sizeof(const char*));
 | 
			
		||||
    // Загрузка данных о границах каскадов
 | 
			
		||||
    glUniform1fv(lightShader.getUniformLoc("camera_cascade_distances"), CAMERA_CASCADE_COUNT, &camera_cascade_distances[1]);
 | 
			
		||||
@ -398,6 +398,7 @@ int main(void)
 | 
			
		||||
        gAmbientSpecular.use();
 | 
			
		||||
        // Подключаем текстуры теней
 | 
			
		||||
        sunShadowDepth.use();
 | 
			
		||||
        pointShadowDepth.use();
 | 
			
		||||
        // Рендерим прямоугольник с расчетом освещения
 | 
			
		||||
        quadModel.render();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user