Skip to content

Commit

Permalink
Mark anisotropyTexture as non-color data
Browse files Browse the repository at this point in the history
  • Loading branch information
alexchuber committed Nov 4, 2024
1 parent a9fb65c commit afaf575
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Nullable } from "core/types";
import { PBRMaterial } from "core/Materials/PBR/pbrMaterial";
import type { Material } from "core/Materials/material";

import type { IMaterial } from "../glTFLoaderInterfaces";
import type { IMaterial, ITextureInfo } from "../glTFLoaderInterfaces";
import type { IGLTFLoaderExtension } from "../glTFLoaderExtension";
import { GLTFLoader } from "../glTFLoader";
import type { IKHRMaterialsAnisotropy } from "babylonjs-gltf2interface";
Expand Down Expand Up @@ -81,6 +81,7 @@ export class KHR_materials_anisotropy implements IGLTFLoaderExtension {
babylonMaterial.anisotropy.angle = properties.anisotropyRotation ?? 0;

if (properties.anisotropyTexture) {
(properties.anisotropyTexture as ITextureInfo).nonColorData = true;
promises.push(
this._loader.loadTextureInfoAsync(`${context}/anisotropyTexture`, properties.anisotropyTexture, (texture) => {
texture.name = `${babylonMaterial.name} (Anisotropy Intensity)`;
Expand Down

0 comments on commit afaf575

Please sign in to comment.