Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Compatibility mode: provoking vertex differs between OpenGL and WebGPU #4489

@SenorBlanco

Description

@SenorBlanco

When the @interpolate(flat) attribute is applied to an interstage variable in WGSL, the rasterizer does not interpolate the value of that variable, and assigns a single value to all its pixels. The value assigned to all pixels is determined by the attributes of a single vertex, called the provoking vertex.

In OpenGL, the last vertex in each primitive is the provoking vertex (see OpenGL ES
Version 3.1
section 12.3, "Flatshading").

In all other APIs, including WebGPU, the first vertex in each primitive is the provoking vertex. Desktop OpenGL 4.0 has a glProvokingVertex to select the default, but OpenGL ES does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatWebGPU Compatibility ModewgslWebGPU Shading Language Issueswgsl resolvedResolved - waiting for a change to the WGSL specification

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions