little codes

This commit is contained in:
2024-03-06 13:54:05 +08:00
parent dc3d7b7792
commit c355f96f9b
4 changed files with 50 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
// BlinnPhong direction light
// BlinnPhong direction light
#include"VulkanAppFramework.h"
#include<hgl/filesystem/FileSystem.h>
@@ -64,6 +64,9 @@ private:
mtl_sun_light=db->LoadMaterial("Std3D/BlinnPhong/SunLightPureColor",&cfg);
if(!mtl_sun_light)return(false);
mtl_sun_light->BindUBO(DescriptorSetType::Global,"sun",sun_data,sizeof(sun_data)); //恢复SUN.UBO或是使用内嵌SUN定义也行
//恢复SUN.UBO的意义是让引擎支持读取外部UBO配置文件
mi_sphere=db->CreateMaterialInstance(mtl_sun_light);
if(!mi_sphere)return(false);