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

WebGPURenderer: fix D_BlinnPhong #28199

Merged
merged 2 commits into from
Apr 23, 2024
Merged

WebGPURenderer: fix D_BlinnPhong #28199

merged 2 commits into from
Apr 23, 2024

Conversation

susiwen8
Copy link
Contributor

shininess.mul( 0.5 / Math.PI ).add( 1.0 ).mul( dotNH.pow( shininess ) );

translate to glsl is

(shininess * ( 1 / ( 2 * PI ) ) + 1.0 ) * pow( dotNH, shininess )

result is not same with

( 1 / PI ) * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );

@susiwen8 susiwen8 changed the title D blinn phong WebGPURenderer: fix D_BlinnPhong Apr 23, 2024
@sunag sunag added this to the r164 milestone Apr 23, 2024
@sunag sunag merged commit 1780cc5 into mrdoob:dev Apr 23, 2024
11 checks passed
@susiwen8 susiwen8 deleted the D_BlinnPhong branch April 23, 2024 15:48
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.

2 participants