private void ShowCompiledCodeSection(ComputeShader cs) { GUILayout.Space(kSpace); if (GUILayout.Button(Styles.showCompiled, EditorStyles.miniButton, GUILayout.ExpandWidth(false))) { ShaderUtil.OpenCompiledComputeShader(cs, true); GUIUtility.ExitGUI(); } }
private void ShowCompiledCodeSection(ComputeShader cs) { using (new EditorGUI.DisabledScope(!EditorSettings.cachingShaderPreprocessor)) m_PreprocessOnly = EditorGUILayout.Toggle(Styles.togglePreprocess, m_PreprocessOnly); GUILayout.Space(kSpace); if (GUILayout.Button(Styles.showCompiled, EditorStyles.miniButton, GUILayout.ExpandWidth(false))) { ShaderUtil.OpenCompiledComputeShader(cs, true, m_PreprocessOnly); GUIUtility.ExitGUI(); } }
private void ShowCompiledCodeSection(ComputeShader cs) { GUILayout.Space(5f); if (GUILayout.Button(ComputeShaderInspector.Styles.showCompiled, EditorStyles.miniButton, new GUILayoutOption[] { GUILayout.ExpandWidth(false) })) { ShaderUtil.OpenCompiledComputeShader(cs, true); GUIUtility.ExitGUI(); } }
private void ShowCompiledCodeSection(ComputeShader cs) { ComputeShaderImporter importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(cs.GetInstanceID())) as ComputeShaderImporter; using (new EditorGUI.DisabledScope(!EditorSettings.cachingShaderPreprocessor && importer && importer.preprocessorOverride != PreprocessorOverride.ForceCachingPreprocessor)) m_PreprocessOnly = EditorGUILayout.Toggle(Styles.togglePreprocess, m_PreprocessOnly); GUILayout.Space(kSpace); if (GUILayout.Button(Styles.showCompiled, EditorStyles.miniButton, GUILayout.ExpandWidth(false))) { ShaderUtil.OpenCompiledComputeShader(cs, true, m_PreprocessOnly); GUIUtility.ExitGUI(); } }
private void ShowDebuggingData(ComputeShader cs) { GUILayout.Space(5f); GUILayout.Label("Compiled code:", EditorStyles.boldLabel, new GUILayoutOption[0]); EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]); EditorGUILayout.PrefixLabel("All variants", EditorStyles.miniButton); GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandWidth(false) }; if (GUILayout.Button(Styles.showAll, EditorStyles.miniButton, options)) { ShaderUtil.OpenCompiledComputeShader(cs, true); GUIUtility.ExitGUI(); } EditorGUILayout.EndHorizontal(); }
private void ShowCompiledCodeSection(ComputeShader cs) { if (!m_PreprocessOnlyAvailableInitialized) { UpdatePreprocessOnlyAvailability(); } using (new EditorGUI.DisabledScope(!m_PreprocessOnlyAvailable)) m_PreprocessOnly = EditorGUILayout.Toggle(Styles.togglePreprocess, m_PreprocessOnly); GUILayout.Space(kSpace); if (GUILayout.Button(Styles.showCompiled, EditorStyles.miniButton, GUILayout.ExpandWidth(false))) { ShaderUtil.OpenCompiledComputeShader(cs, true, m_PreprocessOnly); GUIUtility.ExitGUI(); } }
private void ShowCompiledCodeSection(ComputeShader cs) { ComputeShaderImporter importer = AssetImporter.GetAtPath(AssetDatabase.GetAssetPath(cs.GetInstanceID())) as ComputeShaderImporter; s_PreprocessOnly = EditorGUILayout.Toggle(Styles.togglePreprocess, s_PreprocessOnly); if (s_PreprocessOnly) { s_StripLineDirectives = EditorGUILayout.Toggle(Styles.toggleStripLineDirective, s_StripLineDirectives); } GUILayout.Space(kSpace); if (GUILayout.Button(Styles.showCompiled, EditorStyles.miniButton, GUILayout.ExpandWidth(false))) { ShaderUtil.OpenCompiledComputeShader(cs, true, s_PreprocessOnly, s_StripLineDirectives); GUIUtility.ExitGUI(); } }