Skip to content

Glb texture coordinate fix#2252

Merged
slimbuck merged 19 commits intoplaycanvas:masterfrom
slimbuck:cubemap-fixes
Jul 13, 2020
Merged

Glb texture coordinate fix#2252
slimbuck merged 19 commits intoplaycanvas:masterfrom
slimbuck:cubemap-fixes

Conversation

@slimbuck
Copy link
Copy Markdown
Member

@slimbuck slimbuck commented Jul 7, 2020

We address here the issue with glTF having texture coordinates with top-left origin while the engine has bottom-right origin. We previously dealt with this by not flipping glTF embedded textures (where all others were being flipped). The change in this PR is to flip glTF texture coordinates instead and also flip textures, thus bringing them inline with the rest of the engine.

The following changes are made:

  • flip glTF texture V coordinates at load time
  • flip glTF textures to match the rest of the engine
  • fix for cubemap faces under ImageBitmap
  • reenable ImageBitmap
  • also simplify glTF vertex buffer creation function

I confirm I have signed the Contributor License Agreement.

@slimbuck slimbuck requested a review from a team July 7, 2020 14:36
@slimbuck slimbuck self-assigned this Jul 7, 2020
Comment thread src/resources/parser/glb-parser.js
Comment thread src/resources/parser/glb-parser.js
@slimbuck slimbuck merged commit ff06e7f into playcanvas:master Jul 13, 2020
@slimbuck slimbuck deleted the cubemap-fixes branch July 13, 2020 13:15
TheJonRobinson added a commit to Mojiworks/playcanvas-engine that referenced this pull request Jul 15, 2020
* mojiworks/pr/sound-stop-typing: (112 commits)
  fix: SoundComponent.stop's string parameter is optional
  [RELEASE] v1.32.0
  [Fix] Changes to Attribute to location mapping (playcanvas#2292)
  Deprecate pc.makeArray (playcanvas#2289)
  [FIX] API ref docs for pc.Mesh#getIndices (playcanvas#2291)
  fix cubemap filtering on safari (playcanvas#2288)
  disable ImageBitmap (playcanvas#2286)
  [Fix] Fix to texture based skinning on Safari (playcanvas#2287)
  fix cubemap dependent loads (playcanvas#2285)
  [Fix] Update to Transform Feedback to work with VAOs (playcanvas#2284)
  Update the anim state graph to support the new data schema (playcanvas#2278)
  Remove viewer (playcanvas#2282)
  [FIX] pc.SoundComponent#resume/stop param type (playcanvas#2281)
  Remove type function (playcanvas#2273)
  Remove some shader-related circular dependencies (playcanvas#2274)
  Glb-parser improvements (playcanvas#2275)
  Fix glb-parser normals generation (playcanvas#2276)
  Glb texture coordinate fix (playcanvas#2252)
  use faces if the asset was previously unloaded (playcanvas#2272)
  fix material resource loader (playcanvas#2268)
  ...

# Conflicts:
#	src/scene/graph-node.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants