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

Cubemap fix for webgpu #6669

Merged
merged 2 commits into from
Jun 6, 2024
Merged
Changes from 1 commit
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
14 changes: 9 additions & 5 deletions src/framework/handlers/cubemap.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
ADDRESS_CLAMP_TO_EDGE, PIXELFORMAT_RGB8, PIXELFORMAT_RGBA8,
TEXTURETYPE_DEFAULT, TEXTURETYPE_RGBM, TEXTURETYPE_RGBP

Check failure on line 3 in src/framework/handlers/cubemap.js

View workflow job for this annotation

GitHub Actions / Lint

'TEXTURETYPE_RGBP' is defined but never used
} from '../../platform/graphics/constants.js';
import { Texture } from '../../platform/graphics/texture.js';

Expand Down Expand Up @@ -129,10 +129,6 @@
}
} else {
// prefiltered data is an env atlas
tex.type = TEXTURETYPE_RGBP;
tex.addressU = ADDRESS_CLAMP_TO_EDGE;
tex.addressV = ADDRESS_CLAMP_TO_EDGE;
tex.mipmaps = false;
resources[1] = tex;
}
}
Expand Down Expand Up @@ -317,7 +313,15 @@
url: assetId,
filename: assetId
} : assetId;
texAsset = new Asset(cubemapAsset.name + '_part_' + i, 'texture', file);

const data = file.url.search('.dds') === -1 ? {
slimbuck marked this conversation as resolved.
Show resolved Hide resolved
type: 'rgbp',
addressu: 'clamp',
addressv: 'clamp',
mipmaps: false
} : null;

texAsset = new Asset(cubemapAsset.name + '_part_' + i, 'texture', file, data);
registry.add(texAsset);
processTexAsset(i, texAsset);
}
Expand Down
Loading