Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Clarify behavior of out-of-gamut canvas#4476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kainino0x merged 4 commits intogpuweb:mainfromkainino0x:premultiplied-nit
Apr 12, 2024

Conversation

@kainino0x
Copy link
Contributor

@kainino0xkainino0x commentedJan 31, 2024
edited
Loading

It's OK if out-of-gamut intermediate values are written to the canvas, it only matters what's there when it gets presented.

Also move the existing explanation of the undefined behavior to a note,and expand it with an example.

It's OK if out-of-gamut intermediate values are written to the canvas,it only matters what's there when it gets presented.
@kainino0xkainino0x added the copyeditingPure editorial stuff (copyediting, *.bs file syntax, etc.) labelJan 31, 2024
@kainino0xkainino0x added this to theMilestone 0 milestoneJan 31, 2024
@kainino0x
Copy link
ContributorAuthor

@jimblandy revised, PTAL

@github-actions
Copy link
Contributor

github-actionsbot commentedMar 11, 2024
edited
Loading

spec/index.bs Outdated
{{GPUCanvasAlphaMode/"premultiplied"}}, {{PredefinedColorSpace/"srgb"}},
{{GPUTextureFormat/"rgba8unorm"}} canvas, the color `[0.51, 0, 0, 0.5]` represents
<code><a funcdef>color</a>(srgb 1.02 0 0 / 0.5)</code>,
however upon presentation it could be internally unpremultiplied before color
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It's probably not actually likely that a browser would unpremultiply like this, as basically everything prefers to operate in premultiplied space. I don't think this is the only case under which bad things would happen. It was the easiest to explain, but could it mislead people to believe this is actually a likely scenario?

The example is not critical, but it's very helpful to demonstrate what we're talking about. Maybe it would be possible to show other examples as well of hypothetical compositing+display pipelines?

@kainino0x
Copy link
ContributorAuthor

I thought about this further, and I think there are some cases that this doesn't allow that we need to allow. I'm going to tentatively close this and open a new PR that does that.

@kainino0xkainino0x reopened thisMar 18, 2024
@kainino0x
Copy link
ContributorAuthor

It's OK if out-of-gamut intermediate values are written to the canvas, it only matters what's there when it gets presented.

Actually, we still need to fix this. I will still open another PR that both reduces the undefined behaviors and expands the examples.

@kainino0x
Copy link
ContributorAuthor

Actually, we still need to fix this. I will still open another PR that both reduces the undefined behaviors and expands the examples.

Opened draft#4526.

@kainino0x
Copy link
ContributorAuthor

kainino0x commentedMar 19, 2024
edited
Loading

(This PR is ready for review though. PTAL)

@ccameron-chromium
Copy link
Contributor

The change makes sense to me.

@kainino0xkainino0x requested a review fromtojiApril 11, 2024 02:21
Copy link
Member

@tojitoji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM, especially if@ccameron-chromium is comfortable with it.

@kainino0xkainino0x merged commit8bb5ca9 intogpuweb:mainApr 12, 2024
@kainino0xkainino0x deleted the premultiplied-nit branchApril 12, 2024 05:27
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tojitojitoji approved these changes

@jimblandyjimblandyAwaiting requested review from jimblandy

Assignees

No one assigned

Labels

copyeditingPure editorial stuff (copyediting, *.bs file syntax, etc.)

Projects

None yet

Milestone

Milestone 0

Development

Successfully merging this pull request may close these issues.

3 participants

@kainino0x@ccameron-chromium@toji

[8]ページ先頭

©2009-2025 Movatter.jp