Conversation
Side-channel every captured texture as a block-compressed payload (BC7 for color/mask, DXT5 for normals) with mips baked at export time. Runtime uploads raw bytes instead of decoding PNGs and re-compressing, and normal maps ship in HDRP's AG layout so no runtime repack is needed. The glTF clone drops every texture from captured materials so glTFast no longer re-encodes hundreds of MB of PNGs into table.glb. Also honor the table's HDRI cubemap and exposure during package screenshots via a top-priority temporary volume override, and make the directional light optional.
Move BC7/DXT5 cooking and normal-map repacking out of the export path: the package now carries the original PNG/JPG source bytes (or a lossless PNG fallback) and the player cooks GPU-ready payloads into its local cache at load time. Add an editor-side .vpe material importer that drives the shared HdrpMaterialResolver against freshly imported texture assets and persists the resulting materials as .mat files, marking normal maps as DXT5nm so the resolver doesn't re-pack them.
Renames HdrpMaterialV1* importer/translator/encoder to drop the V1 suffix now that the resolver targets the v2 portable material schema (legacy v1 payloads are upgraded before reaching it). HDRP-only Lit fields (TexWorldScale, InvTilingScale, GeometricSpecularAa, SpecularAA thresholds, SupportDecals, RayTracing, EmissiveExposureWeight) move from VpeMaterialProfile.Lit onto a nested VpeHdrpLitHints object so the cross-pipeline profile stays renderer-agnostic. Also threads a resolveNode callback through the editor importer for per-node material application.
The player cook produces 8-bit BC7 regardless, so the extra precision roughly doubled payload size and made 16-bit decode the cook's main-thread bottleneck (notably the 50 MB cabinet normals).
Replaces the Unity LoadImage+EncodeToPNG path, which is single-threaded and slower. libvips is native, thread-safe, and produces the same high-byte 16->8 downconvert.
Record file-path or inline-byte sources during the main-thread walk instead of reading and downconverting PNGs inline. A separate loader (VpeTextureBlobLoader) consumes the sources in parallel, moving the disk I/O and 16-bit PNG → 8-bit re-encode off the main thread. File-name uniqueness now uses a dedicated reservation set since the blob dictionary no longer exists at name-allocation time.
Add HdrpGraphicsApplier, registered before scene load, that maps the host app's VpeGraphicsSettings onto the main camera's anti-aliasing mode and the active global Volume's SSR, SSAO, bloom, and GI effects (including ray-traced reflections and GI tracing modes). Reference Unity.RenderPipelines.Core.Runtime from the HDRP asmdef so the Volume APIs resolve.
Translate and rebuild HDRP/Fabric/* materials via a new fabric-silk template, capturing thread/fuzz properties and the supporting clear-coat, specular-color, blend-mode and Z-test state on the underlying lit profile so cloth materials survive a round trip. Replace the gltFast HDRP material generator with one that falls back to stock HDRP/Lit, since gltFast's bundled shadergraphs ship broken ray-tracing passes that fail to compile in player builds, and the imported materials are transient placeholders the resolver swaps anyway. Tighten CreateTextureFreeClone to walk the serialized TexEnv list and verify each property is actually a texture on the shader, so fabric and other non-Lit templates don't trip on stale or non-texture properties.
Shader.Find("HDRP/Lit") can return null during very early gltFast
init before HDRP registers the shader, which caused materials to
silently fall through to the stripped shadergraph and emit a
"shader missing" warning. Load the shipped VpeLitOpaqueTemplate as
a fallback so the same HDRP/Lit shader is always resolved.
|
Too many files changed for review. ( |
Bump unity to 6000.5.0f1 and the high-definition render pipeline dependencies from 17.0.3 to 17.5.0. Also switch the diffusion profile cache key in HdrpMaterialResolver to UnityObjectId.Get instead of GetInstanceID.
Add a packing/signing step using the Unity Package Manager CLI so the published package is signed with the org service account, then publish the resulting signed tarball instead of running a bare `npm publish`. Also bump action versions: actions/checkout v2 -> v5 and peter-evans/repository-dispatch v1 -> v4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the HDRP side of the new VPE packaging pipeline. It teaches the HDRP package how to export portable material profiles, restore them at runtime from
.vpepackages, cook/repack HDRP textures, generate package screenshots, and apply VPE graphics settings to HDRP scenes..vpeexport, including renderer state, HDRP hints, texture payloads, and shader-specific material profiles.HDRP/Litlookup is unavailable.