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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

XiaoHu1994
Copy link

@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.

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.

1 participant