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

WebGPU: Mix Two CubeMaps #24059

Merged
merged 4 commits into from
May 15, 2022
Merged

WebGPU: Mix Two CubeMaps #24059

merged 4 commits into from
May 15, 2022

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented May 14, 2022

Related issue: #24038

Description

This example must be used to test NodeMaterial using individual environment maps together on IBL context.

This contribution is funded by Googe via Igalia

@sunag sunag added this to the r141 milestone May 14, 2022
@Mugen87
Copy link
Collaborator

Mugen87 commented May 14, 2022

Examples looks great! I just get the following issue in the browser console:

1 warning(s) generated while compiling the shader:
:123:88 warning: 'dpdy' must only be called from uniform control flow
nodeVar11 = ( ( ( f32( isFront ) * 2.0 ) - 1.0 ) * inverseSqrt( max( dot( ( ( cross( dpdy( nodeVary3.xyz.xyz ), normalize( nodeVary4 ) ) * vec3( dpdx( nodeVary1.xy ).x ) ) + ( cross( normalize( nodeVary4 ), dpdx( nodeVary3.xyz.xyz ) ) * vec3( dpdy( nodeVary1.xy ).x ) ) ), ( ( cross( dpdy( nodeVary3.xyz.xyz ), normalize( nodeVary4 ) ) * vec3( dpdx( nodeVary1.xy ).x ) ) + ( cross( normalize( nodeVary4 ), dpdx( nodeVary3.xyz.xyz ) ) * vec3( dpdy( nodeVary1.xy ).x ) ) ) ), dot( ( ( cross( dpdy( nodeVary3.xyz.xyz ), normalize( nodeVary4 ) ) * vec3( dpdx( nodeVary1.xy ).y ) ) + ( cross( normalize( nodeVary4 ), dpdx( nodeVary3.xyz.xyz ) ) * vec3( dpdy( nodeVary1.xy ).y ) ) ), ( ( cross( dpdy( nodeVary3.xyz.xyz ), normalize( nodeVary4 ) ) * vec3( dpdx( nodeVary1.xy ).y ) ) + ( cross( normalize( nodeVary4 ), dpdx( nodeVary3.xyz.xyz ) ) * vec3( dpdy( nodeVary1.xy ).y ) ) ) ) ) ) );

Tested with Chrome Canary 104.0.5061.0.

@Mugen87
Copy link
Collaborator

Mugen87 commented May 14, 2022

@sunag
Copy link
Collaborator Author

sunag commented May 15, 2022

@Mugen87 it's recent WebGPU warning. It happens in any example that use NormalMapNode. I think that better merger this and I will create another PR fixing the warning related for all examples.

@Mugen87 Mugen87 merged commit 5c70435 into mrdoob:dev May 15, 2022
@sunag sunag deleted the dev-mix-ibl branch May 17, 2022 18:22
abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* Nodes: improve timer

* add webgpu_cubemap_mix example

* cleanup

* cleanup line
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.

None yet

2 participants