Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix venues shaders on OSX (again) #957

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Conversation

theli-ua
Copy link

@theli-ua theli-ua commented Feb 2, 2025

Previously we were exporting shaders for OSX separately. Unfortunately that does not guarantee that all shader variants were exported. To mitigate that we now export materials instead. However to avoid doubling of resulting yarground size we replace all textures with dummy on export.
On load we fixup all the shaders to pick up from osx-specific subbundle

Copy link
Member

@EliteAsian123 EliteAsian123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, thanks for the PR!

Unfortunately, this is beginning to look like more of a hack than an actual fix to the cross-platform venue problem, which we would like to avoid. You mention that not all shader variants were exported. Do you think there's a more elegant way to get the shader variants without looking through all of the materials, removing the textures, and then exporting those?

Thanks!

@@ -91,7 +91,7 @@ private async UniTaskVoid Start()
// Yarground comes with shaders for dx11/dx12/glcore/vulkan
// Metal shaders used on OSX come in this separate bundle
// Update our renderers to use them
var renderers = bg.GetComponentsInChildren<Renderer>();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fix that I found while testing. I've seen venues that have an object inactive in the beginning but then show it later. Passing true here will ensure we fixup all objects regardless if they are active in hierarchy or not

@theli-ua
Copy link
Author

theli-ua commented Feb 7, 2025

It looks like I may have broken something in latest update here and it still wouldn't work with all the shaders on the mac. I'll switch to draft for now and reopen when confirming

@theli-ua theli-ua marked this pull request as draft February 7, 2025 07:41
@theli-ua theli-ua marked this pull request as ready for review February 7, 2025 19:22
@theli-ua
Copy link
Author

theli-ua commented Feb 7, 2025

Fixed and retested, exported bundles work with the current nightly (as they mostly should)

Previously we were exporting shaders for OSX separately.
Unfortunately that does not seem to guarantee that all shader variants were exported.
To mitigate that we now export materials as well. However to avoid
doubling of resulting yarground size we replace all textures with dummy on export.

Loading side does not change
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.

2 participants