Skip to content

Make view property of GPURenderPassColorAttachment optional or accept null/undefined #134

Description

@4DLaCode

Currently it seems that there is no way to make the following code from "WebGPU Samples" work. They have disabled the strict setting which is not ideal.

https://webgpu.github.io/webgpu-samples/samples/rotatingCube

`
const renderPassDescriptor: GPURenderPassDescriptor = {
colorAttachments: [
{
view: undefined, // Assigned later

    clearValue: { r: 0.5, g: 0.5, b: 0.5, a: 1.0 },
    loadOp: 'clear',
    storeOp: 'store',
  },
],

//...
};
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions