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 parse glTF texture wrap & filterMode bug #1659

Merged
merged 2 commits into from
Jul 24, 2023

Conversation

meiya163254
Copy link
Contributor

修复 glTF samplers wrapS & wrapT & magFilter 解析错误 bug

  • 当 wrapT 或 wrapS 为 33071 即 Clamp 时,代码中 samplerInfo.wrapModeU 或 samplerInfo.wrapModeV 是 0, 导致 if 判断无法进入,进一步导致 wrapMode 设置出错
  • 当 magFilter 为 9728,代码中 samplerInfo.filterMode 是 0, 导致 if 判断无法进入,进一步导致 filterMode 设置出错
  • 代码逻辑如下:
    image
  • glTF 设置如下:
    image
  • 渲染结果如下:
    image

Copy link
Member

@zhuxudong zhuxudong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@GuoLei1990 GuoLei1990 changed the title fix: parse glTF texture wrap & filterMode bug Fix parse glTF texture wrap & filterMode bug Jul 24, 2023
@GuoLei1990 GuoLei1990 modified the milestone: 1.1 Jul 24, 2023
@GuoLei1990 GuoLei1990 added the bug Something isn't working label Jul 24, 2023
@GuoLei1990 GuoLei1990 merged commit cf49f88 into galacean:main Jul 24, 2023
5 checks passed
GuoLei1990 added a commit that referenced this pull request Aug 1, 2023
* main: (41 commits)
  fix: skin mesh error (#1675)
  fix: test error (#1674)
  test: fix ci not work (#1670)
  fix: `EventDispatcher` static pool bug
  fix: eventdispatcher bug (#1671)
  fix: animation event bug (#1666)
  Fix parse glTF texture wrap & filterMode bug (#1659)
  Fix text wrap bug (#1644)
  chore: use strict error msg and type (#1647)
  Fix text error for set text to "" and set enableWrapping to true (#1634)
  "v1.0.0-beta.17"
  Process GLTFBufferParser and GLTFTextureParser pipelines in parallel (#1638)
  Fix animation clip loader, clip change promise to assetPromise, controller json parse (#1506)
  fix: the layer is not cloned when the node is cloned (#1636)
  Fix glTF texture mipmap bug (#1637)
  "v1.0.0-beta.16"
  Adjust main light to directional lights first (#1635)
  Fix  `AmbientLight` can't destroy bug (#1633)
  Add value change listener for `Sprite` (#1622)
  Add unit test case of `Font` (#1606)
  ...
GuoLei1990 added a commit to GuoLei1990/galacean-engine that referenced this pull request Aug 2, 2023
* dev/1.1: (48 commits)
  fix: skin mesh error (galacean#1675)
  fix: test error (galacean#1674)
  test: fix github test (galacean#1669)
  test: fix ci not work (galacean#1670)
  glTF support basisu (galacean#1662)
  fix: `EventDispatcher` static pool bug
  fix: eventdispatcher bug (galacean#1671)
  fix: animation event bug (galacean#1666)
  Shader pass support blend (galacean#1668)
  Fix model mesh advanced data write bug (galacean#1663)
  Cherry pick glTF conflict (galacean#1660)
  Fix worker status set error and can't throw error bug (galacean#1652)
  Fix parse glTF texture wrap & filterMode bug (galacean#1659)
  Add shader lab package and support shader framework (galacean#1610)
  Fix text wrap bug (galacean#1644)
  chore: use strict error msg and type (galacean#1647)
  Fix text error for set text to "" and set enableWrapping to true (galacean#1634)
  "v1.0.0-beta.17"
  Process GLTFBufferParser and GLTFTextureParser pipelines in parallel (galacean#1638)
  Fix animation clip loader, clip change promise to assetPromise, controller json parse (galacean#1506)
  ...
GuoLei1990 added a commit to GuoLei1990/galacean-engine that referenced this pull request Aug 3, 2023
* dev/1.1: (43 commits)
  fix: skin mesh error (galacean#1675)
  fix: test error (galacean#1674)
  test: fix github test (galacean#1669)
  test: fix ci not work (galacean#1670)
  glTF support basisu (galacean#1662)
  fix: `EventDispatcher` static pool bug
  fix: eventdispatcher bug (galacean#1671)
  fix: animation event bug (galacean#1666)
  Fix parse glTF texture wrap & filterMode bug (galacean#1659)
  Fix text wrap bug (galacean#1644)
  chore: use strict error msg and type (galacean#1647)
  Fix text error for set text to "" and set enableWrapping to true (galacean#1634)
  "v1.0.0-beta.17"
  Process GLTFBufferParser and GLTFTextureParser pipelines in parallel (galacean#1638)
  Fix animation clip loader, clip change promise to assetPromise, controller json parse (galacean#1506)
  fix: the layer is not cloned when the node is cloned (galacean#1636)
  Fix glTF texture mipmap bug (galacean#1637)
  "v1.0.0-beta.16"
  Adjust main light to directional lights first (galacean#1635)
  Fix  `AmbientLight` can't destroy bug (galacean#1633)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working glTF
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants