optimized name of values.

This commit is contained in:
2023-02-23 13:25:05 +08:00
parent e31a6cca13
commit a6b71a449e
18 changed files with 39 additions and 39 deletions

View File

@@ -98,7 +98,7 @@ private:
sky_mi=db->CreateMaterialInstance(sky_material);
if(!sky_mi)return(false);
if(!sky_mi->BindSampler(DescriptorSetType::Value,"tex" ,texture, sampler))return(false);
if(!sky_mi->BindImageSampler(DescriptorSetType::Value,"tex" ,texture, sampler))return(false);
sky_pipeline=CreatePipeline(sky_mi,InlinePipeline::Sky,Prim::Triangles);
if(!sky_pipeline)return(false);
@@ -111,7 +111,7 @@ private:
envmap_mi=db->CreateMaterialInstance(envmap_material);
if(!envmap_mi)return(false);
if(!envmap_mi->BindSampler(DescriptorSetType::Value,"EnvCubemap" ,texture, sampler))return(false);
if(!envmap_mi->BindImageSampler(DescriptorSetType::Value,"EnvCubemap" ,texture, sampler))return(false);
solid_pipeline=CreatePipeline(envmap_mi,InlinePipeline::Solid3D,Prim::Triangles);
}

View File

@@ -316,8 +316,8 @@ private:
if(!mp)
return(false);
mp->BindSampler("TexColor" ,texture.color, texture.color_sampler);
mp->BindSampler("TexNormal" ,texture.normal, texture.normal_sampler);
mp->BindImageSampler("TexColor" ,texture.color, texture.color_sampler);
mp->BindImageSampler("TexNormal" ,texture.normal, texture.normal_sampler);
mp->Update();
}
@@ -330,9 +330,9 @@ private:
return(false);
mp->BindUBO("lights",ubo_lights);
mp->BindSampler("GB_Color" ,gbuffer.rt->GetColorTexture((uint)GBufferAttachment::Color),gbuffer.sampler);
mp->BindSampler("GB_Normal" ,gbuffer.rt->GetColorTexture((uint)GBufferAttachment::Normal),gbuffer.sampler);
mp->BindSampler("GB_Depth" ,gbuffer.rt->GetDepthTexture(),gbuffer.sampler);
mp->BindImageSampler("GB_Color" ,gbuffer.rt->GetColorTexture((uint)GBufferAttachment::Color),gbuffer.sampler);
mp->BindImageSampler("GB_Normal" ,gbuffer.rt->GetColorTexture((uint)GBufferAttachment::Normal),gbuffer.sampler);
mp->BindImageSampler("GB_Depth" ,gbuffer.rt->GetDepthTexture(),gbuffer.sampler);
mp->Update();
}

View File

@@ -165,7 +165,7 @@ private:
sampler=db->CreateSampler();
if(!material_instance->BindSampler(DescriptorSetType::Value,"tex",tile_data->GetTexture(),sampler))return(false);
if(!material_instance->BindImageSampler(DescriptorSetType::Value,"tex",tile_data->GetTexture(),sampler))return(false);
return(true);
}

View File

@@ -54,7 +54,7 @@ private:
envmap_mi=db->CreateMaterialInstance(OS_TEXT("res/material/EnvEquirectangularMap"));
if(!envmap_mi)return(false);
if(!envmap_mi->BindSampler(DescriptorSetType::Value,"Envmap" ,texture, sampler))return(false);
if(!envmap_mi->BindImageSampler(DescriptorSetType::Value,"Envmap" ,texture, sampler))return(false);
}
solid_pipeline=CreatePipeline(envmap_mi,InlinePipeline::Solid3D,Prim::Triangles);

View File

@@ -134,8 +134,8 @@ private:
if(!mp_texture)
return(false);
mp_texture->BindSampler("TexColor" ,texture.color, texture.sampler);
mp_texture->BindSampler("TexNormal" ,texture.normal, texture.sampler);
mp_texture->BindImageSampler("TexColor" ,texture.color, texture.sampler);
mp_texture->BindImageSampler("TexNormal" ,texture.normal, texture.sampler);
}
}

View File

@@ -135,7 +135,7 @@ public:
cube.sampler=db->CreateSampler();
if(!cube.sampler)return(false);
if(!cube.material_instance->BindSampler(DescriptorSetType::Value,"tex",os.render_taget->GetColorTexture(),cube.sampler))
if(!cube.material_instance->BindImageSampler(DescriptorSetType::Value,"tex",os.render_taget->GetColorTexture(),cube.sampler))
return(false);
{

View File

@@ -59,7 +59,7 @@ private:
sampler=db->CreateSampler();
if(!material_instance->BindSampler(DescriptorSetType::Value,"tex",texture,sampler))return(false);
if(!material_instance->BindImageSampler(DescriptorSetType::Value,"tex",texture,sampler))return(false);
return(true);
}

View File

@@ -73,7 +73,7 @@ private:
sampler=db->CreateSampler();
if(!material_instance->BindSampler(DescriptorSetType::Value,"tex",texture,sampler))return(false);
if(!material_instance->BindImageSampler(DescriptorSetType::Value,"tex",texture,sampler))return(false);
return(true);
}