ReadonlyThe material to be used for rendering. The base color texture will be bound to this material.
The texture to be used as the base color texture for rendering.
Optionalsampler: SamplerOptional custom sampler for texture sampling. If not provided, a default linear sampler with clamp-to-edge wrapping will be used.
A configured RenderPass instance with the texture properly bound to the material.
const material = new Material();
const texture = new Texture2D();
const renderPass = RenderPassHelper.createScreenDrawRenderPassWithBaseColorTexture(material, texture);
// With custom sampler
const customSampler = new Sampler({ magFilter: TextureParameter.Nearest });
const renderPassWithCustomSampler = RenderPassHelper.createScreenDrawRenderPassWithBaseColorTexture(
material,
texture,
customSampler
);
Creates a RenderPass for full-screen rendering with a base color texture. This method automatically sets up texture sampling with linear filtering and clamp-to-edge wrapping. A default sampler is created and cached for reuse if no custom sampler is provided.