used newly BindCameraUBO
This commit is contained in:
parent
074cb9cc19
commit
1207cb442a
@ -237,16 +237,7 @@ private:
|
|||||||
texture.color_sampler=CreateSampler(texture.color);
|
texture.color_sampler=CreateSampler(texture.color);
|
||||||
texture.normal_sampler=CreateSampler(texture.normal);
|
texture.normal_sampler=CreateSampler(texture.normal);
|
||||||
|
|
||||||
{
|
BindCameraUBO(sp_gbuffer.material_instance);
|
||||||
MaterialParameters *mp_global=sp_gbuffer.material_instance->GetMP(DescriptorSetsType::Global);
|
|
||||||
|
|
||||||
if(!mp_global)
|
|
||||||
return(false);
|
|
||||||
|
|
||||||
if(!mp_global->BindUBO("g_camera",GetCameraInfoBuffer()))return(false);
|
|
||||||
|
|
||||||
mp_global->Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
MaterialParameters *mp=sp_gbuffer.material_instance->GetMP(DescriptorSetsType::Value);
|
MaterialParameters *mp=sp_gbuffer.material_instance->GetMP(DescriptorSetsType::Value);
|
||||||
@ -259,16 +250,7 @@ private:
|
|||||||
mp->Update();
|
mp->Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
BindCameraUBO(sp_composition.material_instance);
|
||||||
MaterialParameters *mp_global=sp_composition.material_instance->GetMP(DescriptorSetsType::Global);
|
|
||||||
|
|
||||||
if(!mp_global)
|
|
||||||
return(false);
|
|
||||||
|
|
||||||
if(!mp_global->BindUBO("g_camera",GetCameraInfoBuffer()))return(false);
|
|
||||||
|
|
||||||
mp_global->Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
MaterialParameters *mp=sp_composition.material_instance->GetMP(DescriptorSetsType::Value);
|
MaterialParameters *mp=sp_composition.material_instance->GetMP(DescriptorSetsType::Value);
|
||||||
|
@ -367,6 +367,20 @@ public:
|
|||||||
return ubo_camera_info;
|
return ubo_camera_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BindCameraUBO(MaterialInstance *mi)
|
||||||
|
{
|
||||||
|
MaterialParameters *mp_global=mi->GetMP(DescriptorSetsType::Global);
|
||||||
|
|
||||||
|
if(!mp_global)
|
||||||
|
return(false);
|
||||||
|
|
||||||
|
if(!mp_global->BindUBO("g_camera",ubo_camera_info))return(false);
|
||||||
|
|
||||||
|
mp_global->Update();
|
||||||
|
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void BuildCommandBuffer(uint32_t index)=0;
|
virtual void BuildCommandBuffer(uint32_t index)=0;
|
||||||
|
|
||||||
inline bool isPush(enum class KeyboardButton kb)const{return key_status[size_t(kb)];}
|
inline bool isPush(enum class KeyboardButton kb)const{return key_status[size_t(kb)];}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user