5#ifndef FLUTTER_IMPELLER_SCENE_MATERIAL_H_
6#define FLUTTER_IMPELLER_SCENE_MATERIAL_H_
14#include "impeller/scene/importer/scene_flatbuffers.h"
21struct SceneContextOptions;
25class PhysicallyBasedMaterial;
44 const fb::Material& material,
45 const std::vector<std::shared_ptr<Texture>>& textures);
47 static std::unique_ptr<UnlitMaterial>
MakeUnlit();
76 const fb::Material& material,
77 const std::vector<std::shared_ptr<Texture>>& textures);
95 std::shared_ptr<Texture> color_texture_;
101 const fb::Material& material,
102 const std::vector<std::shared_ptr<Texture>>& textures);
112 std::shared_ptr<Texture> metallic_roughness_texture);
131 std::shared_ptr<Texture> albedo_texture_;
132 std::shared_ptr<Texture> metallic_roughness_texture_;
133 std::shared_ptr<Texture> normal_texture_;
134 std::shared_ptr<Texture> occlusion_texture_;
136 std::shared_ptr<Texture> environment_map_;
Render passes encode render commands directed as one specific render target into an underlying comman...
static std::unique_ptr< Material > MakeFromFlatbuffer(const fb::Material &material, const std::vector< std::shared_ptr< Texture > > &textures)
Scalar vertex_color_weight_
void SetVertexColorWeight(Scalar weight)
virtual void BindToCommand(const SceneContext &scene_context, HostBuffer &buffer, RenderPass &pass) const =0
void SetStencilConfig(StencilConfig stencil_config)
void SetTranslucent(bool is_translucent)
SceneContextOptions GetContextOptions(const RenderPass &pass) const
static std::unique_ptr< PhysicallyBasedMaterial > MakePhysicallyBased()
virtual MaterialType GetMaterialType() const =0
StencilConfig stencil_config_
void SetBlendConfig(BlendConfig blend_config)
static std::unique_ptr< UnlitMaterial > MakeUnlit()
BlendConfig blend_config_
void SetEnvironmentMap(std::shared_ptr< Texture > environment_map)
void SetMetallicRoughnessTexture(std::shared_ptr< Texture > metallic_roughness_texture)
static std::unique_ptr< PhysicallyBasedMaterial > MakeFromFlatbuffer(const fb::Material &material, const std::vector< std::shared_ptr< Texture > > &textures)
MaterialType GetMaterialType() const override
void SetNormalTexture(std::shared_ptr< Texture > normal_texture)
void SetAlbedoTexture(std::shared_ptr< Texture > albedo_texture)
void SetOcclusionTexture(std::shared_ptr< Texture > occlusion_texture)
~PhysicallyBasedMaterial()
void SetRoughness(Scalar roughness)
void SetMetallic(Scalar metallic)
void BindToCommand(const SceneContext &scene_context, HostBuffer &buffer, RenderPass &pass) const override
void SetAlbedo(Color albedo)
static std::unique_ptr< UnlitMaterial > MakeFromFlatbuffer(const fb::Material &material, const std::vector< std::shared_ptr< Texture > > &textures)
MaterialType GetMaterialType() const override
void BindToCommand(const SceneContext &scene_context, HostBuffer &buffer, RenderPass &pass) const override
void SetColorTexture(std::shared_ptr< Texture > color_texture)
void SetColor(Color color)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
@ kAlways
Comparison test passes always passes.
@ kKeep
Don't modify the current stencil value.
static constexpr Color White()
BlendFactor source_alpha_factor
BlendFactor source_color_factor
BlendFactor destination_alpha_factor
BlendFactor destination_color_factor
StencilOperation operation