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

Fix czm_specularEnvironmentMaps datatype #12395

Merged

Conversation

XiaoHu1994
Copy link
Contributor

@XiaoHu1994 XiaoHu1994 commented Dec 26, 2024

Description

The first parameter of czm_textureCube needs to be of type samplerCube

#ifdef SPECULAR_IBL
vec3 sampleSpecularEnvironment(vec3 cubeDir, float roughness)
{
#ifdef CUSTOM_SPECULAR_IBL
float lod = roughness * model_specularEnvironmentMapsMaximumLOD;
return czm_textureCube(model_specularEnvironmentMaps, cubeDir, lod).rgb;
#else
float lod = roughness * czm_specularEnvironmentMapsMaximumLOD;
return czm_textureCube(czm_specularEnvironmentMaps, cubeDir, lod).rgb;
#endif
}

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

Copy link

Thank you for the pull request, @XiaoHu1994!

✅ We can confirm we have a CLA on file for you.

@ggetz
Copy link
Contributor

ggetz commented Jan 2, 2025

Thanks for the fix @XiaoHu1994!

@jjhembd can you please review?

  • I think this may also warrant an update in CHANGES.md since this uniforms can be used in parts of the public API
  • If this is ready to merge, please hold off until today's release as gone out.

Copy link
Contributor

@jjhembd jjhembd left a comment

Choose a reason for hiding this comment

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

Thanks @XiaoHu1994 for the fix!

@ggetz I don't see this uniform being used anywhere other than internally in ImageBasedLightingStageFS, so I don't think we need a mention in CHANGES.md.

@jjhembd jjhembd added this pull request to the merge queue Jan 6, 2025
Merged via the queue into CesiumGS:main with commit a21c02e Jan 6, 2025
4 checks passed
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.

3 participants