Skip to content

Commit

Permalink
Draco v1.5.2 release. (#818)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfinegan authored Feb 17, 2022
1 parent 9522c22 commit bd1e8de
Show file tree
Hide file tree
Showing 23 changed files with 815 additions and 6 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ delays can result in transient errors that can be difficult to diagnose when
new Draco releases are launched. To avoid the issue pin your sites to a
versioned release.

### Version 1.5.2 release
* This is the same as v1.5.1 with the following two bug fixes:
* Fixes DRACO_TRANSCODER_SUPPORTED enabled builds.
* ABI version updated.

### Version 1.5.1 release
* Adds assertion enabled Emscripten builds to the release, and a subset of the
assertion enabled builds to GStatic. See the file listing below.
Expand Down
2 changes: 1 addition & 1 deletion cmake/draco_build_definitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ macro(draco_set_build_definitions)
# passed to libtool.
#
# We set DRACO_SOVERSION = [c-a].a.r
set(LT_CURRENT 3)
set(LT_CURRENT 4)
set(LT_REVISION 0)
set(LT_AGE 0)
math(EXPR DRACO_SOVERSION_MAJOR "${LT_CURRENT} - ${LT_AGE}")
Expand Down
2 changes: 1 addition & 1 deletion javascript/npm/draco3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
News
=======

Check out the [README](https://github.com/google/draco/blob/1.5.1/README.md)
Check out the [README](https://github.com/google/draco/blob/1.5.2/README.md)
file for news about this release.

Description
Expand Down
2 changes: 1 addition & 1 deletion javascript/npm/draco3d/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "draco3d",
"version": "1.5.1",
"version": "1.5.2",
"description": "Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.",
"main": "draco3d.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion javascript/npm/draco3dgltf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Draco github glTF branch URL: https://github.com/google/draco/tree/gltf_2.0_drac
News
=======

Check out the [README](https://github.com/google/draco/blob/1.5.1/README.md)
Check out the [README](https://github.com/google/draco/blob/1.5.2/README.md)
file for news about this release.

NPM Package
Expand Down
2 changes: 1 addition & 1 deletion javascript/npm/draco3dgltf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "draco3dgltf",
"version": "1.5.1",
"version": "1.5.2",
"description": "This package contains a specific version of Draco 3D geometric compression library that is used for glTF Draco mesh compression extension.",
"main": "draco3dgltf.js",
"scripts": {
Expand Down
Binary file modified maya/draco_maya_wrapper_macos.tar.bz
Binary file not shown.
Binary file modified maya/draco_maya_wrapper_windows.tar.bz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/draco/core/draco_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
namespace draco {

// Draco version is comprised of <major>.<minor>.<revision>.
static const char kDracoVersion[] = "1.5.1";
static const char kDracoVersion[] = "1.5.2";

const char *Version() { return kDracoVersion; }

Expand Down
15 changes: 15 additions & 0 deletions src/draco/texture/texture_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,21 @@ std::string TextureUtils::GetExtension(ImageFormat format) {
}
}

int TextureUtils::ComputeRequiredNumChannels(
const Texture &texture, const MaterialLibrary &material_library) {
// TODO(vytyaz): Consider a case where |texture| is not only used in OMR but
// also in other texture map types.
const auto mr_textures = TextureUtils::FindTextures(
TextureMap::METALLIC_ROUGHNESS, &material_library);
if (std::find(mr_textures.begin(), mr_textures.end(), &texture) ==
mr_textures.end()) {
// Occlusion-only texture.
return 1;
}
// Occlusion-metallic-roughness texture.
return 3;
}

std::vector<const Texture *> TextureUtils::FindTextures(
const TextureMap::Type texture_type,
const MaterialLibrary *material_library) {
Expand Down
7 changes: 7 additions & 0 deletions src/draco/texture/texture_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ class TextureUtils {
// extension is returned when the |format| is NONE.
static std::string GetExtension(ImageFormat format);

// Returns the number of channels required for encoding a |texture| from a
// given |material_library|, taking into account texture opacity and assuming
// that occlusion and metallic-roughness texture maps may share a texture.
// TODO(vytyaz): Move this and FindTextures() to MaterialLibrary class.
static int ComputeRequiredNumChannels(
const Texture &texture, const MaterialLibrary &material_library);

static std::vector<const Texture *> FindTextures(
const TextureMap::Type texture_type,
const MaterialLibrary *material_library);
Expand Down
Binary file added testdata/CubeScaledInstances/glTF/buffer0.bin
Binary file not shown.
165 changes: 165 additions & 0 deletions testdata/CubeScaledInstances/glTF/cube_att.gltf
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"asset": {
"version": "2.0",
"generator": "draco_decoder"
},
"scenes": [
{
"nodes": [
0
]
}
],
"scene": 0,
"nodes": [
{
"children": [1, 2, 3, 4]
},
{
"children": [5]
},
{
"translation": [0.0, 2.0, 0.0],
"scale": [4, 4, 4],
"children": [5]
},
{
"translation": [2.0, 0.0, 0.0],
"scale": [2, 2, 2],
"children": [5]
},
{
"translation": [-2.0, 0.0, 0.0],
"scale": [3, 3, 3],
"children": [5]
},
{
"mesh": 0
}
],
"meshes": [
{
"primitives": [
{
"attributes": {
"NORMAL": 2,
"POSITION": 1,
"TEXCOORD_0": 3
},
"indices": 0,
"mode": 4,
"material": 0
}
]
}
],
"materials": [
{
"pbrMetallicRoughness": {
"baseColorFactor": [
0.75,
0.75,
0.75,
1
],
"metallicFactor": 0
}
}
],
"accessors": [
{
"bufferView": 0,
"byteOffset": 0,
"componentType": 5121,
"count": 36,
"normalized": false,
"max": [
23
],
"min": [
0
],
"type": "SCALAR"
},
{
"bufferView": 1,
"byteOffset": 0,
"componentType": 5126,
"count": 24,
"normalized": false,
"max": [
1,
1,
1
],
"min": [
0,
0,
0
],
"type": "VEC3"
},
{
"bufferView": 2,
"byteOffset": 0,
"componentType": 5126,
"count": 24,
"normalized": false,
"max": [
1,
1,
1
],
"min": [
-1,
-1,
-1
],
"type": "VEC3"
},
{
"bufferView": 3,
"byteOffset": 0,
"componentType": 5126,
"count": 24,
"normalized": false,
"max": [
1,
1
],
"min": [
0,
0
],
"type": "VEC2"
}
],
"bufferViews": [
{
"buffer": 0,
"byteOffset": 0,
"byteLength": 36
},
{
"buffer": 0,
"byteOffset": 36,
"byteLength": 288
},
{
"buffer": 0,
"byteOffset": 324,
"byteLength": 288
},
{
"buffer": 0,
"byteOffset": 612,
"byteLength": 192
}
],
"buffers": [
{
"byteLength": 804,
"uri": "buffer0.bin"
}
]
}
Binary file not shown.
Loading

0 comments on commit bd1e8de

Please sign in to comment.