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

Feat: Scene Shader #55

Merged
merged 10 commits into from
Nov 27, 2023
Merged

Feat: Scene Shader #55

merged 10 commits into from
Nov 27, 2023

Conversation

mikhail-dcl
Copy link
Collaborator

@mikhail-dcl mikhail-dcl commented Nov 1, 2023

  • A new shader from Geoff "DCL/Scene" is used for AB conversion for Standalone (Explorer Alpha only)
  • Unity upgraded to 2022.3.2f1 as this shader is based on the newer URP
  • Docker images are upgraded accordingly
  • Materials generation divided into 2 paths:
    • For WebGL the old one is used with no changes
    • For Standalone the new "Scene" shader with Bounds Checking is used
      • Shaders variants collection is included in the same shader bundle to ensure all possible (according to the GLTF conversion) combinations are compiled. It's needed to use the bundled material/shader directly without the necessity to re-assign it on the client side

@mikhail-dcl mikhail-dcl requested a review from Kinerius November 21, 2023 11:11
Comment on lines -440 to -443
var previousMat = env.assetDatabase.LoadAssetAtPath<Material>(materialPath);

if (previousMat != null)
env.assetDatabase.DeleteAsset(materialPath);
Copy link
Contributor

Choose a reason for hiding this comment

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

This was QOL debug code, to avoid creating multiple materials when re-running the conversion on the same scene over and over without re-downloading everything from scratch

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will revert it 👌

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I recall why I removed it: it's not needed as we override it later

            env.assetDatabase.CreateAsset(newMaterial, materialPath);

Copy link
Contributor

@Kinerius Kinerius left a comment

Choose a reason for hiding this comment

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

Looks good to me!

I like how you simplified CreateMaterialAsset, I don't recall why I coded it like that in the first place since I had many issues when extracting textures and materials from the gltf for them to be editable

@mikhail-dcl mikhail-dcl merged commit 80a3fa7 into main Nov 27, 2023
1 of 4 checks passed
@marianogoldman marianogoldman deleted the feat/scene-shader branch August 13, 2024 18:06
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.

3 participants