#include <material.h>
Definition at line 73 of file material.h.
◆ ~UnlitMaterial()
impeller::scene::UnlitMaterial::~UnlitMaterial |
( |
| ) |
|
|
default |
◆ BindToCommand()
Implements impeller::scene::Material.
Definition at line 110 of file material.cc.
112 {
113
114 UnlitFragmentShader::FragInfo
info;
117 UnlitFragmentShader::BindFragInfo(pass,
buffer.EmplaceUniform(
info));
118
119
120 SamplerDescriptor sampler_descriptor;
121 sampler_descriptor.label = "Trilinear";
125 UnlitFragmentShader::BindBaseColorTexture(
126 pass,
127 color_texture_ ? color_texture_ : scene_context.GetPlaceholderTexture(),
128 scene_context.
GetContext()->GetSamplerLibrary()->GetSampler(
129 sampler_descriptor));
130}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Scalar vertex_color_weight_
static const uint8_t buffer[]
SK_API GrDirectContext * GetContext(const SkImage *src)
◆ GetMaterialType()
MaterialType impeller::scene::UnlitMaterial::GetMaterialType |
( |
| ) |
const |
|
overridevirtual |
◆ MakeFromFlatbuffer()
std::unique_ptr< UnlitMaterial > impeller::scene::UnlitMaterial::MakeFromFlatbuffer |
( |
const fb::Material & |
material, |
|
|
const std::vector< std::shared_ptr< Texture > > & |
textures |
|
) |
| |
|
static |
UnlitMaterial
Definition at line 71 of file material.cc.
73 {
74 if (material.type() != fb::MaterialType::kUnlit) {
75 VALIDATION_LOG <<
"Cannot unpack unlit material because the ipscene "
76 "material type is not unlit.";
77 return nullptr;
78 }
79
81
82 if (material.base_color_factor()) {
84 }
85
86 if (material.base_color_texture() >= 0 &&
87 material.base_color_texture() <
static_cast<int32_t
>(
textures.size())) {
89 }
90
92}
static std::unique_ptr< UnlitMaterial > MakeUnlit()
std::vector< std::shared_ptr< FakeTexture > > textures
Color ToColor(const fb::Color &c)
◆ SetColor()
void impeller::scene::UnlitMaterial::SetColor |
( |
Color |
color | ) |
|
◆ SetColorTexture()
void impeller::scene::UnlitMaterial::SetColorTexture |
( |
std::shared_ptr< Texture > |
color_texture | ) |
|
Definition at line 100 of file material.cc.
100 {
101 color_texture_ = std::move(color_texture);
102}
The documentation for this class was generated from the following files: