-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
mikhail-dcl
commented
Nov 1, 2023
•
edited
Loading
edited
- 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
* simplification of materials generation * various clean-up
* Resolved the bug with Materials' spontaneous destruction
var previousMat = env.assetDatabase.LoadAssetAtPath<Material>(materialPath); | ||
|
||
if (previousMat != null) | ||
env.assetDatabase.DeleteAsset(materialPath); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will revert it 👌
There was a problem hiding this comment.
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);
There was a problem hiding this 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