Skip to content

Commit

Permalink
fix dark display of convolutional texturecube on oppo minigame (cocos…
Browse files Browse the repository at this point in the history
  • Loading branch information
xubing0906 authored Apr 13, 2023
1 parent dea97a2 commit e3f3657
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cocos/3d/reflection-probe/reflection-probe-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ export class ReflectionProbe extends Component {
* @en fast bake no convolution.
* @zh 快速烘焙不会进行卷积。
*/
@visible(function (this: ReflectionProbe) { return this.probeType === ProbeType.CUBE; })
@type(CCBoolean)
@tooltip('i18n:reflection_probe.fastBake')
get fastBake () {
Expand Down
4 changes: 2 additions & 2 deletions cocos/asset/assets/texture-cube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
THE SOFTWARE.
*/

import { EDITOR, TEST, VIVO, WECHAT, WECHAT_MINI_PROGRAM } from 'internal:constants';
import { EDITOR, OPPO, TEST, VIVO, WECHAT, WECHAT_MINI_PROGRAM } from 'internal:constants';
import { ccclass, serializable } from 'cc.decorator';
import { TextureType, TextureInfo, TextureViewInfo, BufferTextureCopy } from '../../gfx';
import { ImageAsset } from './image-asset';
Expand Down Expand Up @@ -190,7 +190,7 @@ export class TextureCube extends SimpleTexture {
}
//In ios wechat mini-game platform drawImage and getImageData can not get correct data,so upload to gfxTexture than use readPixels to get data
//The performance of upload to gfxTexture and readPixels is not good, so only use this way in the ios wechat mini-game platform
if (((WECHAT || WECHAT_MINI_PROGRAM) && sys.os === OS.IOS) || VIVO) {
if (((WECHAT || WECHAT_MINI_PROGRAM) && sys.os === OS.IOS) || VIVO || OPPO) {
this._uploadAtlas();
return;
}
Expand Down

0 comments on commit e3f3657

Please sign in to comment.