Skip to content

Commit

Permalink
Merge pull request #10 from De-Panther/shadervariants_for_rps
Browse files Browse the repository at this point in the history
Added more glTFShaderVariants for different RPs
  • Loading branch information
De-Panther authored Jan 16, 2024
2 parents 95154f8 + 6aff08b commit 3b25347
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Packages/webxr-input-profiles-loader/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- GLTFShaderVariantsURP and GLTFShaderVariantsLegacyURP to the ShaderVariants folder.

### Changed
- Renamed GLTFShaderVariants to GLTFShaderVariantsBuiltInRP.

## [0.6.0] - 2024-01-15
### Changed
- Use glTFast package from Unity registry.
Expand Down
2 changes: 2 additions & 0 deletions Packages/webxr-input-profiles-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The package uses [glTFast](https://docs.unity3d.com/Packages/com.unity.cloud.glt

You might need to add Shader Variants of the Input Profiles Models to the build for the shaders to work. More info about that can be found at the glTFast docs.

You can use `glTFShaderVariantsURP`, `glTFShaderVariantsLegacyURP` or `glTFShaderVariantsBuiltInRP` in `Project Settings > Graphics > Preloaded Shaders` depending on the active render pipeline.

## Setting package using OpenUPM

Set a `Scoped Registry` in `Project Settings > Package Manager` for OpenUPM.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ShaderVariantCollection:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GLTFShaderVariants
m_Name: glTFShaderVariantsBuiltInRP
m_Shaders:
- first: {fileID: 4800000, guid: 99fa998bbbed3408aafa652b466d261d, type: 3}
second:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!200 &20000000
ShaderVariantCollection:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: glTFShaderVariantsLegacyURP
m_Shaders:
- first: {fileID: -6465566751694194690, guid: ba6d401c74b2c4f96af7edf0fe32241e,
type: 3}
second:
variants:
- keywords:
passType: 8
- keywords: _EMISSIVE
passType: 8
- keywords: _ADDITIONAL_LIGHTS_VERTEX
passType: 13
- keywords: _ADDITIONAL_LIGHTS_VERTEX _EMISSIVE
passType: 13
- first: {fileID: -6465566751694194690, guid: 90c26dfde11bf4ff69ef936c6e6b1ed1,
type: 3}
second:
variants:
- keywords:
passType: 8
- keywords: _OCCLUSION
passType: 8
- keywords: _EMISSIVE _OCCLUSION
passType: 8
- keywords: _ADDITIONAL_LIGHTS_VERTEX
passType: 13
- keywords: _ADDITIONAL_LIGHTS_VERTEX _OCCLUSION
passType: 13
- keywords: _ADDITIONAL_LIGHTS_VERTEX _EMISSIVE _OCCLUSION
passType: 13

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!200 &20000000
ShaderVariantCollection:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: glTFShaderVariantsURP
m_Shaders:
- first: {fileID: -6465566751694194690, guid: b9d29dfa1474148e792ac720cbd45122,
type: 3}
second:
variants:
- keywords:
passType: 8
- keywords: _EMISSIVE
passType: 8
- keywords: _EMISSIVE _OCCLUSION
passType: 8
- keywords: _OCCLUSION
passType: 8
- keywords: STEREO_INSTANCING_ON _ADDITIONAL_LIGHTS_VERTEX
passType: 13
- keywords: STEREO_INSTANCING_ON _ADDITIONAL_LIGHTS_VERTEX _EMISSIVE
passType: 13
- keywords: STEREO_INSTANCING_ON _ADDITIONAL_LIGHTS_VERTEX _EMISSIVE _OCCLUSION
passType: 13
- keywords: STEREO_INSTANCING_ON _ADDITIONAL_LIGHTS_VERTEX _EMISSIVE _OCCLUSION
_REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION
passType: 13
- keywords: STEREO_INSTANCING_ON _ADDITIONAL_LIGHTS_VERTEX _EMISSIVE _REFLECTION_PROBE_BLENDING
_REFLECTION_PROBE_BOX_PROJECTION
passType: 13
- keywords: STEREO_INSTANCING_ON _ADDITIONAL_LIGHTS_VERTEX _OCCLUSION
passType: 13
- keywords: STEREO_INSTANCING_ON _ADDITIONAL_LIGHTS_VERTEX _OCCLUSION _REFLECTION_PROBE_BLENDING
_REFLECTION_PROBE_BOX_PROJECTION
passType: 13
- keywords: STEREO_INSTANCING_ON _ADDITIONAL_LIGHTS_VERTEX _REFLECTION_PROBE_BLENDING
_REFLECTION_PROBE_BOX_PROJECTION
passType: 13
- keywords: _ADDITIONAL_LIGHTS_VERTEX _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION
passType: 13

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

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Then in `Window > Package Manager` selecting `Packages: My Registries` and the W

You might need to add Shader Variants of the Input Profiles Models to the build for the shaders to work. More info about that can be found at the glTFast docs.

You can use `glTFShaderVariantsURP`, `glTFShaderVariantsLegacyURP` or `glTFShaderVariantsBuiltInRP` in `Project Settings > Graphics > Preloaded Shaders` depending on the active render pipeline.

## Supported WebXR Exporters

- [WebXR Export](https://github.com/De-Panther/unity-webxr-export).

0 comments on commit 3b25347

Please sign in to comment.