MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Move existing materials to FastConfigurable, delete old shaders

Open dbastienMS opened this issue 9 years ago • 11 comments

With the superior performance in the new FastConfigurable and growth of features there, all my older shaders should be removed:

  1. BlinnPhongConfigurable
  2. BlinnPhongConfigurableTransparent
  3. LambertianConfigurable
  4. LambertianConfigurableTransparent
  5. StandardFast
  6. UnlitConfigurable
  7. UnlitConfigurableTransparent
  8. UnlitNoDepthTest
  9. VertexLitConfigurable
  10. VertexLitConfigurableTransparent

And matierals using them moved to use FastConfigurable.

dbastienMS avatar Apr 19 '17 17:04 dbastienMS

@dbastienMS I can look at updating the materials used throughout the toolkit test scenes and examples, but is there a strategy for removing the old shaders without breaking user materials based on the old shaders when they upgrade to the latest toolkit?

thebanjomatic avatar Apr 24 '17 17:04 thebanjomatic

@thebanjomatic their materials will point to the old meta files - the only way I can think of to solve this is to have a script that rips through materials looking for ones that point to the old shaders and pointing them to the new one. there's some work done on auto-migration in the editor script already. depending on how well that works as you're converting, we can look into making that script or improving the auto-migration. great question - this is a tricky but super important issue.

dbastienMS avatar Apr 24 '17 17:04 dbastienMS

You know I think it's fine for them to manually move things over - they can keep using the existing shaders if they want, they just won't be present in the htk going forwards.

dbastienMS avatar May 16 '17 19:05 dbastienMS

@dbastienMS is there a way to mark a shader as obsolete?

StephenHodgson avatar Jul 26 '17 22:07 StephenHodgson

Only thing I could think of was to move its folder location. For Example:

// Very fast shader that uses the Unity lighting model.
// Compiles down to only performing the operations you're actually using.
// Uses material property drawers rather than a custom editor for ease of maintenance.

Shader "HoloToolkit/Obsolete/BlinnPhong Configurable"
{
    Properties
    {
...

StephenHodgson avatar Jul 26 '17 23:07 StephenHodgson

Hah, I was just about to say the same thing!

I think either that approach or just removing them are both fine - if they're removed users moving from older HTK versions can still keep their old copies.

dbastienMS avatar Jul 26 '17 23:07 dbastienMS

One small step at a time haha

StephenHodgson avatar Jul 26 '17 23:07 StephenHodgson

@dbastienMS do you know anything about the UnlitTriplanar shaders?

StephenHodgson avatar Jul 26 '17 23:07 StephenHodgson

I don't - theoretically a triplanar shader should be combining axial textures in world space but this one does not appear to be doing that.

dbastienMS avatar Jul 27 '17 01:07 dbastienMS

Yeah it seems to be used in all sorts of materials that don't do what you'd think. I'm thinking of making that one obsolete too and switching them to the fast configurable too lol.

StephenHodgson avatar Jul 27 '17 01:07 StephenHodgson

If it's a good replacement that'd be ideal - the fewer things the better!

dbastien avatar Jul 27 '17 18:07 dbastien