-
Notifications
You must be signed in to change notification settings - Fork 151
Added 5 Unity classes + Fix X-mirroring of models - #103
Added 5 Unity classes + Fix X-mirroring of models #103j5rlLqM-rvsrY96V-GpVJP0F-IZFesRzy-ShMoz wants to merge 5 commits into
Conversation
Added SphereCollider, CapsuleCollider and MeshCollider.
Added SphereCollider, CapsuleCollider and MeshCollider.
- Added MeshRenderer - Added RendererBase and ParticleRendererBase to reduce code while achieving the same result.
Added the one value MeshFilter has.
sebastientromp
commented
Jun 22, 2021
Hey! By any chance, would you know how to add support for the new (Unity 5.5+) shaders?
I would recommend looking at the YAML-dump of such a shader.
unity2yaml ShaderSampleBundle > out.yaml
vim out.yaml
sebastientromp
commented
Jun 23, 2021
Thanks for the advice. Unfortunately, that doesn't help because the shader code itself is stored under compressedBlob and would need to be decompressed / decoded.
I see. The compression you're looking at is most likely done using the .net deflate class.
But as for the code itself, I don't know. You might have use of tools such as Radare2, Ghidra or ILSpy.
I had a headache trying to figure out what was wrong with my code. Turns out it wasn't my code but this code. Might have to do with the specific Unity version?
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 believe this was done to convert from left-handed coordinates to right-handed coordinates, FWIW. So without this the face normals would all be inside out in tools that expect right-handed models.
@j5rlLqM-rvsrY96V-GpVJP0F-IZFesRzy-ShMoz
j5rlLqM-rvsrY96V-GpVJP0F-IZFesRzy-ShMoz
Jul 20, 2021
•
edited
Loading
edited
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.
Oh, um, TBH I thought pull requests would only add the commits from before they were made.
Either way, you are correct, however removing the - on line 31 inverts the models once, so the face normals are as they should.
I know it's a bit counter-intuitive but if you test it, it should be fine.
I added 5 classes that I came along on my travels:
MeshFilter, MeshRenderer, MeshCollider, SphereCollider and CapsuleCollider.
I also cleaned up renderer.py a bit.