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 clang-tidy issue with PbrDrawable + typo fixes. #2133

Merged
merged 1 commit into from
Jun 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/esp/gfx/PbrDrawable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ void PbrDrawable::setMaterialValuesInternal(
materialData_->as<Mn::Trade::PbrMetallicRoughnessMaterialData>();
flags_ = PbrShader::Flag::ObjectId;
if (reset) {
matCache = {tmpMaterialData.baseColor()}; // baseColor;
} else {
matCache.baseColor = tmpMaterialData.baseColor();
matCache = {};
}
matCache.baseColor = tmpMaterialData.baseColor();
matCache.roughness = tmpMaterialData.roughness();
matCache.metalness = tmpMaterialData.metalness();
matCache.emissiveColor = tmpMaterialData.emissiveColor();
Expand Down
10 changes: 5 additions & 5 deletions src/esp/gfx/PbrDrawable.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class PbrDrawable : public Drawable {
// KHR_materials_specular layer

/**
* Structure holdling specular layer values
* Structure holding specular layer values
*/
struct SpecularLayer {
/**
Expand Down Expand Up @@ -132,7 +132,7 @@ class PbrDrawable : public Drawable {
///////////////
// KHR_materials_anisotropy layer
/**
* Structure holdijng anisotropy layer values
* Structure holding anisotropy layer values
*/
struct AnisotropyLayer {
/**
Expand Down Expand Up @@ -271,7 +271,7 @@ class PbrDrawable : public Drawable {
Mn::SceneGraph::Camera3D& camera) override;

/**
* @brief Update the shader so it can correcly handle the current material,
* @brief Update the shader so it can correctly handle the current material,
* light setup
* @return Reference to self (for method chaining)
*/
Expand All @@ -286,7 +286,7 @@ class PbrDrawable : public Drawable {
/**
* @brief Update light direction (or position) in *camera* space to the
* shader
* @param transformationMatrix describes a tansformation from object
* @param transformationMatrix describes a transformation from object
* (model) space to camera space
* @param camera the camera, which views and renders the world
* @return Reference to self (for method chaining)
Expand Down Expand Up @@ -319,7 +319,7 @@ class PbrDrawable : public Drawable {
*/
const gfx::Drawable::Flags meshAttributeFlags_;
/**
* Material to use to render this PBR drawawble
* Material to use to render this PBR drawable
*/
Mn::Resource<Mn::Trade::MaterialData, Mn::Trade::MaterialData> materialData_;
ShadowMapManager* shadowMapManger_ = nullptr;
Expand Down