Struct truck_rendimpl::PolygonState [−][src]
pub struct PolygonState {
pub matrix: Matrix4,
pub material: Material,
pub texture: Option<Arc<Texture>>,
pub backface_culling: bool,
}Expand description
Configures of instances.
Fields
matrix: Matrix4instance matrix
material: Materialmaterial of instance
texture: Option<Arc<Texture>>texture of instance
backface_culling: boolIf this parameter is true, the backface culling will be activated.
Implementations
Creates a UNIFORM buffer of instance matrix.
The bind group provided by the instances holds this uniform buffer.
Shader Examples
layout(set = 1, binding = 0) uniform ModelMatrix {
mat4 uniform_matrix;
};Creates a UNIFORM buffer of material.
The bind group provided by the instances holds this uniform buffer.
Shader Examples
layout(set = 1, binding = 1) uniform Material {
vec4 albedo;
float roughness;
float reflectance;
float ambient_ratio;
};Creates texture view and sampler of the instance’s texture image.
The bind group provided by the instances holds this uniform buffer.
Shader Examples
layout(set = 1, binding = 2) uniform texture2D texture_view;
layout(set = 1, binding = 3) uniform sampler texture_sampler;Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for PolygonState
impl Send for PolygonState
impl Sync for PolygonState
impl Unpin for PolygonState
impl !UnwindSafe for PolygonState
Blanket Implementations
Mutably borrows from an owned value. Read more