 |
Flutter Impeller
|
|
Go to the documentation of this file.
13 #include "impeller/scene/importer/scene_flatbuffers.h"
20 struct SceneContextOptions;
24 class PhysicallyBasedMaterial;
43 const fb::Material& material,
44 const std::vector<std::shared_ptr<Texture>>& textures);
46 static std::unique_ptr<UnlitMaterial>
MakeUnlit();
75 const fb::Material& material,
76 const std::vector<std::shared_ptr<Texture>>& textures);
90 Command& command)
const override;
94 std::shared_ptr<Texture> color_texture_;
100 const fb::Material& material,
101 const std::vector<std::shared_ptr<Texture>>& textures);
111 std::shared_ptr<Texture> metallic_roughness_texture);
123 Command& command)
const override;
130 std::shared_ptr<Texture> albedo_texture_;
131 std::shared_ptr<Texture> metallic_roughness_texture_;
132 std::shared_ptr<Texture> normal_texture_;
133 std::shared_ptr<Texture> occlusion_texture_;
135 std::shared_ptr<Texture> environment_map_;
An object used to specify work to the GPU along with references to resources the GPU will used when d...
void SetEnvironmentMap(std::shared_ptr< Texture > environment_map)
virtual MaterialType GetMaterialType() const =0
void SetMetallic(Scalar metallic)
void SetMetallicRoughnessTexture(std::shared_ptr< Texture > metallic_roughness_texture)
void SetAlbedo(Color albedo)
void SetColorTexture(std::shared_ptr< Texture > color_texture)
static std::unique_ptr< PhysicallyBasedMaterial > MakePhysicallyBased()
BlendFactor destination_alpha_factor
void SetBlendConfig(BlendConfig blend_config)
BlendConfig blend_config_
SceneContextOptions GetContextOptions(const RenderPass &pass) const
virtual void BindToCommand(const SceneContext &scene_context, HostBuffer &buffer, Command &command) const =0
MaterialType GetMaterialType() const override
void BindToCommand(const SceneContext &scene_context, HostBuffer &buffer, Command &command) const override
BlendFactor source_color_factor
@ kKeep
Don't modify the current stencil value.
StencilOperation operation
BlendFactor source_alpha_factor
void SetVertexColorWeight(Scalar weight)
void SetColor(Color color)
void SetStencilConfig(StencilConfig stencil_config)
void SetNormalTexture(std::shared_ptr< Texture > normal_texture)
static constexpr Color White()
void BindToCommand(const SceneContext &scene_context, HostBuffer &buffer, Command &command) const override
BlendFactor destination_color_factor
static std::unique_ptr< UnlitMaterial > MakeFromFlatbuffer(const fb::Material &material, const std::vector< std::shared_ptr< Texture >> &textures)
void SetOcclusionTexture(std::shared_ptr< Texture > occlusion_texture)
MaterialType GetMaterialType() const override
static std::unique_ptr< Material > MakeFromFlatbuffer(const fb::Material &material, const std::vector< std::shared_ptr< Texture >> &textures)
Render passes encode render commands directed as one specific render target into an underlying comman...
void SetRoughness(Scalar roughness)
@ kAlways
Comparison test passes always passes.
static std::unique_ptr< UnlitMaterial > MakeUnlit()
void SetAlbedoTexture(std::shared_ptr< Texture > albedo_texture)
Scalar vertex_color_weight_
~PhysicallyBasedMaterial()
static std::unique_ptr< PhysicallyBasedMaterial > MakeFromFlatbuffer(const fb::Material &material, const std::vector< std::shared_ptr< Texture >> &textures)
StencilConfig stencil_config_
void SetTranslucent(bool is_translucent)