publicreadonlyGUIContentsyncButtonText=newGUIContent("Re-Synchronize Layers","Re-synchronize all layers's properties with the referenced Material");
publicreadonlyGUIContentsyncAllButtonText=newGUIContent("Re-Synchronize","Re-synchronize all layers material properties with the referenced Materials");
publicreadonlyGUIContentsyncAllButUVButtonText=newGUIContent("Re-Synchronize Without UV Mapping","Re-synchronize all but UV Mapping properties with the referenced Materials");
[Enum(UV0, 0, Planar, 4, Triplanar, 5)] _UVBase0("UV Set for base0", Float) = 0 // no UV1/2/3 for main layer (matching Lit.shader and for PPDisplacement restriction)
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase0("UV Set for base0", Float) = 0 // no UV1/2/3 for main layer (matching Lit.shader and for PPDisplacement restriction)
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase1("UV Set for base1", Float) = 0
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase2("UV Set for base2", Float) = 0
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase3("UV Set for base3", Float) = 0
[Enum(UV0, 0, Planar, 4, Triplanar, 5)] _UVBase0("UV Set for base0", Float) = 0 // no UV1/2/3 for main layer (matching Lit.shader and for PPDisplacement restriction)
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase0("UV Set for base0", Float) = 0 // no UV1/2/3 for main layer (matching Lit.shader and for PPDisplacement restriction)
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase1("UV Set for base1", Float) = 0
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase2("UV Set for base2", Float) = 0
[Enum(UV0, 0, UV1, 1, UV2, 2, UV3, 3, Planar, 4, Triplanar, 5)] _UVBase3("UV Set for base3", Float) = 0
publicstaticGUIContentheightMapText=newGUIContent("Height Map (R)","Height Map.\nFor floating point textures, min, max and base value should be 0, 1 and 0.");
publicstaticGUIContentheightMapCenterText=newGUIContent("Height Map Base","Base of the heightmap in the texture (between 0 and 1)");
publicstaticGUIContentheightMapMinText=newGUIContent("Height Min","Minimum value in the heightmap (in world units)");
publicstaticGUIContentheightMapMaxText=newGUIContent("Height Max","Maximum value in the heightmap (in world units)");
publicstaticGUIContentheightMapMinText=newGUIContent("Height Min (cm)","Minimum value in the heightmap (in centimeters)");
publicstaticGUIContentheightMapMaxText=newGUIContent("Height Max (cm)","Maximum value in the heightmap (in centimeters)");
// indentation around base color is a workaround for a bug in material properties UI where the color picker is not indented properly and gets cropped (and unusable in layered shader UI)
// Remove when bug is fixed.
EditorGUI.indentLevel--;
EditorGUI.indentLevel++;
if(materialID==null||// Will be the case for Layered materials where we only support standard and the parameter does not exist
// UVSet0 is always set, planar and triplanar will override it.
floatX,Y,Z,W;
X=(uvBaseMapping==UVBaseMapping.UV0)?1.0f:0.0f;
Y=(uvBaseMapping==UVBaseMapping.UV1)?1.0f:0.0f;
UVMappingMask[layerIndex].colorValue=(layerIndex==0)?newColor(1.0f,0.0f,0.0f,0.0f):newColor(X,Y,Z,W);// Special case for Main Layer and Blend Mask, only UV0. As Layer0 is shared by both here, need to force X to 1.0 in all case