Skip to content

Commit

Permalink
Update gpuweb: add GPUCanvasToneMappingMode
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois authored and toji committed Jul 11, 2024
1 parent 796a592 commit e901f2e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
17 changes: 15 additions & 2 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ type GPUCanvasAlphaMode =

| "opaque"
| "premultiplied";
type GPUCanvasToneMappingMode =

| "standard"
| "extended";
type GPUCompareFunction =

| "never"
Expand Down Expand Up @@ -635,13 +639,22 @@ interface GPUCanvasConfiguration {
* {@link GPUCanvasContext#getCurrentTexture} should be displayed with.
*/
colorSpace?: PredefinedColorSpace;
/**
* The tone mapping determines how the content of textures returned by
* {@link GPUCanvasContext#getCurrentTexture} are to be displayed.
*/
toneMapping?: GPUCanvasToneMapping;
/**
* Determines the effect that alpha values will have on the content of textures returned by
* {@link GPUCanvasContext#getCurrentTexture} when read, displayed, or used as an image source.
*/
alphaMode?: GPUCanvasAlphaMode;
}

interface GPUCanvasToneMapping {
mode?: GPUCanvasToneMappingMode;
}

interface GPUColorDict {
/**
* The red channel value.
Expand Down Expand Up @@ -1390,12 +1403,12 @@ interface GPUSamplerDescriptor
*/
addressModeW?: GPUAddressMode;
/**
* Specifies the sampling behavior when the sample footprint is smaller than or equal to one
* Specifies the sampling behavior when the sampled area is smaller than or equal to one
* texel.
*/
magFilter?: GPUFilterMode;
/**
* Specifies the sampling behavior when the sample footprint is larger than one texel.
* Specifies the sampling behavior when the sampled area is larger than one texel.
*/
minFilter?: GPUFilterMode;
/**
Expand Down
17 changes: 15 additions & 2 deletions generated/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ type GPUCanvasAlphaMode =

| "opaque"
| "premultiplied";
type GPUCanvasToneMappingMode =

| "standard"
| "extended";
type GPUCompareFunction =

| "never"
Expand Down Expand Up @@ -581,13 +585,22 @@ interface GPUCanvasConfiguration {
* {@link GPUCanvasContext#getCurrentTexture} should be displayed with.
*/
colorSpace?: PredefinedColorSpace;
/**
* The tone mapping determines how the content of textures returned by
* {@link GPUCanvasContext#getCurrentTexture} are to be displayed.
*/
toneMapping?: GPUCanvasToneMapping;
/**
* Determines the effect that alpha values will have on the content of textures returned by
* {@link GPUCanvasContext#getCurrentTexture} when read, displayed, or used as an image source.
*/
alphaMode?: GPUCanvasAlphaMode;
}

interface GPUCanvasToneMapping {
mode?: GPUCanvasToneMappingMode;
}

interface GPUColorDict {
/**
* The red channel value.
Expand Down Expand Up @@ -1349,12 +1362,12 @@ interface GPUSamplerDescriptor
*/
addressModeW?: GPUAddressMode;
/**
* Specifies the sampling behavior when the sample footprint is smaller than or equal to one
* Specifies the sampling behavior when the sampled area is smaller than or equal to one
* texel.
*/
magFilter?: GPUFilterMode;
/**
* Specifies the sampling behavior when the sample footprint is larger than one texel.
* Specifies the sampling behavior when the sampled area is larger than one texel.
*/
minFilter?: GPUFilterMode;
/**
Expand Down
2 changes: 1 addition & 1 deletion gpuweb

0 comments on commit e901f2e

Please sign in to comment.