Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodes: Fix VideoTexture in WebGPUBackend & ColorSpaceNode revision #26261

Merged
merged 2 commits into from Jun 14, 2023

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Jun 14, 2023

Fixes: #26233

Description

Related: #26233 (comment)

@sunag sunag added this to the r154 milestone Jun 14, 2023
@Mugen87 Mugen87 merged commit e6f7c4e into mrdoob:dev Jun 14, 2023
18 checks passed
@sunag sunag deleted the dev-webgpu-video-color-space branch June 14, 2023 18:09
return builder.format( propertyName, nodeType, output );
let snippet = propertyName;

if ( builder.needsColorSpace( this.value ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should name this method something like needsForceLinear or needsConversionToLinear?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm.. Maybe needsColorConversionToLinear


export default ColorSpaceNode;

export const colorSpace = ( node, colorSpace ) => nodeObject( new ColorSpaceNode( null, nodeObject( node ) ).fromColorSpace( colorSpace ) );
export const linearToColorSpace = ( node, colorSpace ) => nodeObject( new ColorSpaceNode( getMethod( LinearSRGBColorSpace, colorSpace ), nodeObject( node ) ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just toColorSpace and fromColorSpace?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it's is not possible currently. We need to know what the source is to made the conversion properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebGPURenderer produces washed out colours compared to WebGL
3 participants