Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ShinyMaps()
- {
- GUILayout.Label("Shiny Maps", EditorStyles.boldLabel);
- SmoothSource smoothSource = GetKeyword(smoothKeywords);
- MetalSource metalSource = GetKeyword(metalKeywords);
- OcclusionSource aoSource = GetKeyword(aoKeywords);
- bool useFirstMap = metalSource != MetalSource.None ||
- smoothSource == SmoothSource.FirstMapRedChannel || smoothSource == SmoothSource.MetallicAlpha ||
- aoSource == OcclusionSource.FirstMapBlueChannel || aoSource == OcclusionSource.FirstMapGreenChannel;
- bool useSecondMap = smoothSource == SmoothSource.SecondMapRedChannel;
- bool useAOMap = aoSource == OcclusionSource.OcclusionMap;
- int indent = useFirstMap || useSecondMap || useAOMap ? 2 : 0;
- if (useFirstMap) SingleLineTexture("_MetallicGlossMap", "_Metallic", displayName: "Metallic");
- if (useSecondMap) SingleLineTexture("_SpecGlossMap", "_Glossiness");
- if (!useFirstMap) Property("_Metallic", labelIndent: indent);
- if (!useSecondMap) Property("_Glossiness", labelIndent: indent);
- if (useAOMap) SingleLineTexture("_OcclusionMap", "_OcclusionStrength");
- else Property("_OcclusionStrength", labelIndent: indent);
- EditorGUILayout.Space();
- KeywordDropdown(smoothKeywords, smoothSource, "Smoothness Source",
- "Select none for smoothness to be controlled entirely by slider");
- KeywordDropdown(metalKeywords, metalSource, "Metallic Source",
- "Select none for metallic to be controlled entirely by slider");
- KeywordDropdown(aoKeywords, aoSource, "OcclusionSource");
- KeywordToggle("_ROUGHNESS_ON", "Using roughness?");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement