AbstractCreate a new RenderBehavior (auto init, create pipeline and render).
The vertex shader in WGSL (source code in string)
The fragment shader in WGSL (source code in string)
The type of primitive to be constructed from the vertex inputs (topology, strip index, cull mode).
The descriptor of the layout for the bind group
Optionalbuffers: Iterable<null | GPUVertexBufferLayout, any, any>The layout of the vertex buffer transmitted to the vertex shader or undefined if no buffer is needed
OptionaltargetBlend: GPUBlendStateThe blend state to use for the pipeline
Protected_bindProtected_mvpProtected_pipelineProtected_renderProtectedasyncProtectedCalled when the rendering is ready (device is available).
Detach this behavior from the GameObject it is attached to.
The GameObject to detach this behavior from.
ProtectedobserveProtectedObserve a LogicBehavior and call the observer function when the data changes.
ProtectedonProtectedonRender the object to the screen. Pipeline and MVP uniform are set by RenderEngine.
The render pass to render to
Like onEnable, but should only be for internal use, so some non-abstact direct behaviors could expose attachedOn to the user.
The GameObject this behavior is attached to.
ProtectedtickProtectedCalled every frame. Override this method to add custom behavior.
The time in seconds since the last frame.
An object that can be rendered to the WebGPU screen. Create the pipeline for rendering and set up the bind group layout.