Skip to content

Commit

Permalink
Add Storm Hdx/Mtlx UsdImaging/GL.
Browse files Browse the repository at this point in the history
* hail hydra.

Signed-off-by: furby™ <devs@wabi.foundation>
  • Loading branch information
furby-tm committed Sep 7, 2024
1 parent c24e058 commit 47e445f
Show file tree
Hide file tree
Showing 105 changed files with 10,441 additions and 91 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rust-usd"
version = "24.8.0"
version = "24.8.3"
edition = "2021"
publish = []

Expand Down
2 changes: 1 addition & 1 deletion DeclarativePixarUSD.usda
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#usda 1.0
(
doc = "SwiftUSD v24.08.0 | Declarative API"
doc = "SwiftUSD v24.08.3 | Declarative API"
)

def "DeclarativeScene"
Expand Down
2 changes: 1 addition & 1 deletion HelloPixarUSD.usda
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#usda 1.0
(
doc = "SwiftUSD v24.08.0"
doc = "SwiftUSD v24.08.3"
)

def Xform "Geometry"
Expand Down
247 changes: 243 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,26 @@ let package = Package(
name: "Hd",
targets: ["Hd"]
),
.library(
name: "HdAr",
targets: ["HdAr"]
),
.library(
name: "HdMtlx",
targets: ["HdMtlx"]
),
.library(
name: "HdSi",
targets: ["HdSi"]
),
.library(
name: "HdSt",
targets: ["HdSt"]
),
.library(
name: "Hdx",
targets: ["Hdx"]
),
.library(
name: "Garch",
targets: ["Garch"]
Expand Down Expand Up @@ -218,6 +238,14 @@ let package = Package(
name: "UsdShaders",
targets: ["UsdShaders"]
),
.library(
name: "UsdImaging",
targets: ["UsdImaging"]
),
.library(
name: "UsdImagingGL",
targets: ["UsdImagingGL"]
),
// ----------------- Apps -----
.executable(
name: "UsdView",
Expand Down Expand Up @@ -1308,6 +1336,7 @@ let package = Package(
.target(name: "Hio"),
],
resources: [
.copy("shaders"),
.process("Resources")
],
cxxSettings: [
Expand Down Expand Up @@ -1337,6 +1366,209 @@ let package = Package(
]
),

.target(
name: "HdSi",
dependencies: [
.target(name: "Arch"),
.target(name: "Tf"),
.target(name: "Plug"),
.target(name: "Trace"),
.target(name: "Vt"),
.target(name: "Work"),
.target(name: "Sdf"),
.target(name: "CameraUtil"),
.target(name: "GeomUtil"),
.target(name: "Hf"),
.target(name: "Hd"),
.target(name: "PxOsd"),
],
cxxSettings: [
.define("MFB_PACKAGE_NAME", to: "HdSi"),
.define("MFB_ALT_PACKAGE_NAME", to: "HdSi"),
.define("MFB_PACKAGE_MODULE", to: "HdSi"),
.define("HDSI_EXPORTS", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),

.target(
name: "HdMtlx",
dependencies: [
.target(name: "Arch"),
.target(name: "Tf"),
.target(name: "Trace"),
.target(name: "Vt"),
.target(name: "Gf"),
.target(name: "Hd"),
.target(name: "Sdf"),
.target(name: "Sdr"),
.target(name: "UsdMtlx")
],
cxxSettings: [
.define("MFB_PACKAGE_NAME", to: "HdMtlx"),
.define("MFB_ALT_PACKAGE_NAME", to: "HdMtlx"),
.define("MFB_PACKAGE_MODULE", to: "HdMtlx"),
.define("HDMTLX_EXPORTS", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),

.target(
name: "HdSt",
dependencies: [
.target(name: "Hio"),
.target(name: "Garch"),
.target(name: "Glf"),
.target(name: "Hd"),
.target(name: "HdSi"),
.target(name: "HgiGL"),
.target(name: "HgiInterop"),
.target(name: "Sdr"),
.target(name: "Arch"),
.target(name: "Tf"),
.target(name: "Trace"),
.target(name: "HdMtlx"),
],
resources: [
.copy("shaders"),
.copy("textures"),
.process("Resources")
],
cxxSettings: [
.define("MFB_PACKAGE_NAME", to: "HdSt"),
.define("MFB_ALT_PACKAGE_NAME", to: "HdSt"),
.define("MFB_PACKAGE_MODULE", to: "HdSt"),
.define("HDST_EXPORTS", to: "1"),
.define("PXR_MATERIALX_SUPPORT_ENABLED", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),

.target(
name: "Hdx",
dependencies: [
.target(name: "Arch"),
.target(name: "Tf"),
.target(name: "Gf"),
.target(name: "Vt"),
.target(name: "Plug"),
.target(name: "Work"),
.target(name: "Sdf"),
.target(name: "Garch"),
.target(name: "Glf"),
.target(name: "PxOsd"),
.target(name: "Hd"),
.target(name: "HdSt"),
.target(name: "Hgi"),
.target(name: "HgiInterop"),
.target(name: "CameraUtil"),
],
resources: [
.copy("shaders"),
.copy("textures"),
.process("Resources")
],
cxxSettings: [
.define("MFB_PACKAGE_NAME", to: "Hdx"),
.define("MFB_ALT_PACKAGE_NAME", to: "Hdx"),
.define("MFB_PACKAGE_MODULE", to: "Hdx"),
.define("HDX_EXPORTS", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),

.target(
name: "HdAr",
dependencies: [
.target(name: "Arch"),
.target(name: "Tf"),
.target(name: "Hd"),
.target(name: "Ar"),
],
cxxSettings: [
.define("MFB_PACKAGE_NAME", to: "HdAr"),
.define("MFB_ALT_PACKAGE_NAME", to: "HdAr"),
.define("MFB_PACKAGE_MODULE", to: "HdAr"),
.define("HDAR_EXPORTS", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),

.target(
name: "UsdImaging",
dependencies: [
.target(name: "Arch"),
.target(name: "Tf"),
.target(name: "Gf"),
.target(name: "Vt"),
.target(name: "Plug"),
.target(name: "Trace"),
.target(name: "Work"),
.target(name: "GeomUtil"),
.target(name: "Hd"),
.target(name: "HdAr"),
.target(name: "Hio"),
.target(name: "PxOsd"),
.target(name: "Ar"),
.target(name: "Sdf"),
.target(name: "Usd"),
.target(name: "UsdGeom"),
.target(name: "UsdLux"),
.target(name: "UsdRender"),
.target(name: "UsdShade"),
.target(name: "UsdVol"),
],
resources: [
.process("Resources")
],
cxxSettings: [
.define("MFB_PACKAGE_NAME", to: "UsdImaging"),
.define("MFB_ALT_PACKAGE_NAME", to: "UsdImaging"),
.define("MFB_PACKAGE_MODULE", to: "UsdImaging"),
.define("USDIMAGING_EXPORTS", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),

.target(
name: "UsdImagingGL",
dependencies: [
.target(name: "Arch"),
.target(name: "Tf"),
.target(name: "Gf"),
.target(name: "Vt"),
.target(name: "Plug"),
.target(name: "Trace"),
.target(name: "Work"),
.target(name: "Hio"),
.target(name: "Garch"),
.target(name: "Glf"),
.target(name: "Hd"),
.target(name: "HdSi"),
.target(name: "Hdx"),
.target(name: "Hgi"),
.target(name: "PxOsd"),
.target(name: "Ar"),
.target(name: "Sdf"),
.target(name: "Sdr"),
.target(name: "Usd"),
.target(name: "UsdGeom"),
.target(name: "UsdHydra"),
.target(name: "UsdShade"),
.target(name: "UsdImaging"),
],
resources: [
.process("Resources")
],
cxxSettings: [
.define("MFB_PACKAGE_NAME", to: "UsdImagingGL"),
.define("MFB_ALT_PACKAGE_NAME", to: "UsdImagingGL"),
.define("MFB_PACKAGE_MODULE", to: "UsdImagingGL"),
.define("USDIMAGINGGL_EXPORTS", to: "1"),
.define("_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH", .when(platforms: [.windows])),
]
),

.executableTarget(
name: "UsdView",
dependencies: [
Expand Down Expand Up @@ -1491,20 +1723,27 @@ let package = Package(
.target(name: "UsdVol"),
// ------- imaging. ------
.target(name: "CameraUtil"),
.target(name: "Garch"),
.target(name: "GeomUtil"),
.target(name: "Glf"),
.target(name: "Hf"),
.target(name: "PxOsd"),
.target(name: "Hd"),
.target(name: "Garch"),
.target(name: "HdAr"),
.target(name: "HdMtlx"),
.target(name: "HdSi"),
.target(name: "HdSt"),
.target(name: "Hdx"),
.target(name: "Hgi"),
.target(name: "HgiMetal", condition: .when(platforms: Arch.OS.apple.platform)),
// .target(name: "HgiVulkan", condition: .when(platforms: Arch.OS.linux.platform)),
.target(name: "HgiGL"),
.target(name: "HgiInterop"),
.target(name: "Hio"),
.target(name: "Glf"),
.target(name: "GeomUtil"),
.target(name: "PxOsd"),
// --- usd imaging. ------
.target(name: "UsdShaders"),
.target(name: "UsdImaging"),
.target(name: "UsdImagingGL"),
// -------- macros. ------
.target(name: "PixarMacros"),
// -----------------------
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ For more details, please visit the web site [here](http://openusd.org).
##### To use Pixar's USD in swift, add SwiftUSD as a package dependency in your project's Package.swift file.
```swift
dependencies: [
.package(url: "https://github.com/wabiverse/SwiftUSD.git", from: "24.8.2"),
.package(url: "https://github.com/wabiverse/SwiftUSD.git", from: "24.8.3"),
]
```

Expand Down Expand Up @@ -109,7 +109,7 @@ let package = Package(
),
],
dependencies: [
.package(url: "https://github.com/wabiverse/SwiftUSD.git", from: "24.8.2")
.package(url: "https://github.com/wabiverse/SwiftUSD.git", from: "24.8.3")
],
targets: [
/* 📕 For library products... */
Expand Down
Empty file removed Sources/Bin/.gitkeep
Empty file.
6 changes: 3 additions & 3 deletions Sources/Bin/bakeMaterialX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#include <MaterialX/MXCoreDocument.h>
#include <MaterialX/MXFormatUtil.h>
#include <MaterialX/MXFormatXmlIo.h>
#include <MaterialXCore/Generated.h>
#include <MaterialXCore/Node.h>
#include <MaterialXRenderGlsl/TextureBaker.h>
#include <MaterialX/MXCoreGenerated.h>
#include <MaterialX/MXCoreNode.h>
#include <MaterialX/MXRenderGlslTextureBaker.h>

#include <fstream>

Expand Down
2 changes: 1 addition & 1 deletion Sources/Bin/include/Bin/bakeMaterialX.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "Hd/material.h"
#include "UsdShade/material.h"

#include <MaterialXCore/Library.h>
#include <MaterialX/MXCoreLibrary.h>

#include "Tf/declarePtrs.h"
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,8 @@
//
// Copyright 2016 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
// Licensed under the terms set forth in the LICENSE.txt file available at
// https://openusd.org/license.
//

---Percentage-Closer Filtering (PCF)
Expand Down
Loading

0 comments on commit 47e445f

Please sign in to comment.