Initial work on background visualization
This commit is contained in:
@@ -7,21 +7,43 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
0C3CAEA81C3350C800B856AD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C3CAEA71C3350C800B856AD /* AppDelegate.swift */; };
|
0C20E2B91C33514100BA789B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C20E2B51C33514100BA789B /* AppDelegate.swift */; };
|
||||||
0C3CAEAA1C3350C800B856AD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C3CAEA91C3350C800B856AD /* ViewController.swift */; };
|
0C20E2BB1C33529700BA789B /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C20E2BA1C33529700BA789B /* MainViewController.swift */; };
|
||||||
0C3CAEAD1C3350C800B856AD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0C3CAEAB1C3350C800B856AD /* Main.storyboard */; };
|
0C20E2BD1C33534F00BA789B /* BackgroundViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C20E2BC1C33534F00BA789B /* BackgroundViewController.swift */; };
|
||||||
0C3CAEAF1C3350C800B856AD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0C3CAEAE1C3350C800B856AD /* Assets.xcassets */; };
|
0C3CAEAF1C3350C800B856AD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0C3CAEAE1C3350C800B856AD /* Assets.xcassets */; };
|
||||||
0C3CAEB21C3350C800B856AD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0C3CAEB01C3350C800B856AD /* LaunchScreen.storyboard */; };
|
0C3CAEB21C3350C800B856AD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0C3CAEB01C3350C800B856AD /* LaunchScreen.storyboard */; };
|
||||||
|
0C63A8731C337381007E4B52 /* CubletsTechnique.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0C63A8721C337381007E4B52 /* CubletsTechnique.plist */; };
|
||||||
|
0C63A8761C3373D1007E4B52 /* HorizontalBlur.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 0C63A8751C3373D1007E4B52 /* HorizontalBlur.vsh */; };
|
||||||
|
0C63A8781C3373D9007E4B52 /* HorizontalBlur.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 0C63A8771C3373D9007E4B52 /* HorizontalBlur.fsh */; };
|
||||||
|
0C63A87D1C33C655007E4B52 /* NSValue+XIONAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C63A87C1C33C655007E4B52 /* NSValue+XIONAdditions.m */; };
|
||||||
|
0C63A87F1C33D3D7007E4B52 /* FirstPass.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 0C63A87E1C33D3D7007E4B52 /* FirstPass.vsh */; };
|
||||||
|
0C63A8811C33D3DE007E4B52 /* FirstPass.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 0C63A8801C33D3DE007E4B52 /* FirstPass.fsh */; };
|
||||||
|
0C63A8841C33DC29007E4B52 /* VerticalBlur.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 0C63A8821C33DC29007E4B52 /* VerticalBlur.fsh */; };
|
||||||
|
0C63A8851C33DC29007E4B52 /* VerticalBlur.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 0C63A8831C33DC29007E4B52 /* VerticalBlur.vsh */; };
|
||||||
|
0C63A8881C33EB3B007E4B52 /* FinalRender.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 0C63A8861C33EB3B007E4B52 /* FinalRender.fsh */; };
|
||||||
|
0C63A8891C33EB3B007E4B52 /* FinalRender.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 0C63A8871C33EB3B007E4B52 /* FinalRender.vsh */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
0C20E2B51C33514100BA789B /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
|
0C20E2BA1C33529700BA789B /* MainViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
|
||||||
|
0C20E2BC1C33534F00BA789B /* BackgroundViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackgroundViewController.swift; sourceTree = "<group>"; };
|
||||||
0C3CAEA41C3350C800B856AD /* XIONControlPanel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XIONControlPanel.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
0C3CAEA41C3350C800B856AD /* XIONControlPanel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XIONControlPanel.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
0C3CAEA71C3350C800B856AD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
|
||||||
0C3CAEA91C3350C800B856AD /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
|
||||||
0C3CAEAC1C3350C800B856AD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
|
||||||
0C3CAEAE1C3350C800B856AD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
0C3CAEAE1C3350C800B856AD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
0C3CAEB11C3350C800B856AD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
0C3CAEB11C3350C800B856AD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
0C3CAEB31C3350C800B856AD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
0C3CAEB31C3350C800B856AD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
0C63A8721C337381007E4B52 /* CubletsTechnique.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = CubletsTechnique.plist; sourceTree = "<group>"; };
|
||||||
|
0C63A8751C3373D1007E4B52 /* HorizontalBlur.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = HorizontalBlur.vsh; sourceTree = "<group>"; };
|
||||||
|
0C63A8771C3373D9007E4B52 /* HorizontalBlur.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = HorizontalBlur.fsh; sourceTree = "<group>"; };
|
||||||
|
0C63A87A1C33C655007E4B52 /* XIONControlPanel-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "XIONControlPanel-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
|
0C63A87B1C33C655007E4B52 /* NSValue+XIONAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSValue+XIONAdditions.h"; sourceTree = "<group>"; };
|
||||||
|
0C63A87C1C33C655007E4B52 /* NSValue+XIONAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSValue+XIONAdditions.m"; sourceTree = "<group>"; };
|
||||||
|
0C63A87E1C33D3D7007E4B52 /* FirstPass.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = FirstPass.vsh; sourceTree = "<group>"; };
|
||||||
|
0C63A8801C33D3DE007E4B52 /* FirstPass.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = FirstPass.fsh; sourceTree = "<group>"; };
|
||||||
|
0C63A8821C33DC29007E4B52 /* VerticalBlur.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = VerticalBlur.fsh; sourceTree = "<group>"; };
|
||||||
|
0C63A8831C33DC29007E4B52 /* VerticalBlur.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = VerticalBlur.vsh; sourceTree = "<group>"; };
|
||||||
|
0C63A8861C33EB3B007E4B52 /* FinalRender.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = FinalRender.fsh; sourceTree = "<group>"; };
|
||||||
|
0C63A8871C33EB3B007E4B52 /* FinalRender.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; path = FinalRender.vsh; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -35,6 +57,56 @@
|
|||||||
/* End PBXFrameworksBuildPhase section */
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
/* Begin PBXGroup section */
|
||||||
|
0C20E2B31C33510700BA789B /* Supporting Files */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
0C3CAEAE1C3350C800B856AD /* Assets.xcassets */,
|
||||||
|
0C3CAEB01C3350C800B856AD /* LaunchScreen.storyboard */,
|
||||||
|
0C3CAEB31C3350C800B856AD /* Info.plist */,
|
||||||
|
);
|
||||||
|
name = "Supporting Files";
|
||||||
|
path = SupportingFiles;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
0C20E2B41C33514100BA789B /* Application */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
0C20E2B51C33514100BA789B /* AppDelegate.swift */,
|
||||||
|
);
|
||||||
|
path = Application;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
0C20E2B61C33514100BA789B /* Controllers */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
0C20E2BC1C33534F00BA789B /* BackgroundViewController.swift */,
|
||||||
|
0C20E2BA1C33529700BA789B /* MainViewController.swift */,
|
||||||
|
);
|
||||||
|
path = Controllers;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
0C20E2B71C33514100BA789B /* Models */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
);
|
||||||
|
path = Models;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
0C20E2B81C33514100BA789B /* Views */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
);
|
||||||
|
path = Views;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
0C20E2C81C336F2E00BA789B /* Resources */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
0C63A8721C337381007E4B52 /* CubletsTechnique.plist */,
|
||||||
|
);
|
||||||
|
path = Resources;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
0C3CAE9B1C3350C800B856AD = {
|
0C3CAE9B1C3350C800B856AD = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -54,16 +126,43 @@
|
|||||||
0C3CAEA61C3350C800B856AD /* XIONControlPanel */ = {
|
0C3CAEA61C3350C800B856AD /* XIONControlPanel */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
0C3CAEA71C3350C800B856AD /* AppDelegate.swift */,
|
0C20E2B41C33514100BA789B /* Application */,
|
||||||
0C3CAEA91C3350C800B856AD /* ViewController.swift */,
|
0C20E2B61C33514100BA789B /* Controllers */,
|
||||||
0C3CAEAB1C3350C800B856AD /* Main.storyboard */,
|
0C20E2B71C33514100BA789B /* Models */,
|
||||||
0C3CAEAE1C3350C800B856AD /* Assets.xcassets */,
|
0C63A8741C3373BC007E4B52 /* Shaders */,
|
||||||
0C3CAEB01C3350C800B856AD /* LaunchScreen.storyboard */,
|
0C20E2C81C336F2E00BA789B /* Resources */,
|
||||||
0C3CAEB31C3350C800B856AD /* Info.plist */,
|
0C63A8791C33C622007E4B52 /* Utilities */,
|
||||||
|
0C20E2B81C33514100BA789B /* Views */,
|
||||||
|
0C20E2B31C33510700BA789B /* Supporting Files */,
|
||||||
);
|
);
|
||||||
path = XIONControlPanel;
|
path = XIONControlPanel;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
0C63A8741C3373BC007E4B52 /* Shaders */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
0C63A87E1C33D3D7007E4B52 /* FirstPass.vsh */,
|
||||||
|
0C63A8801C33D3DE007E4B52 /* FirstPass.fsh */,
|
||||||
|
0C63A8751C3373D1007E4B52 /* HorizontalBlur.vsh */,
|
||||||
|
0C63A8771C3373D9007E4B52 /* HorizontalBlur.fsh */,
|
||||||
|
0C63A8831C33DC29007E4B52 /* VerticalBlur.vsh */,
|
||||||
|
0C63A8821C33DC29007E4B52 /* VerticalBlur.fsh */,
|
||||||
|
0C63A8871C33EB3B007E4B52 /* FinalRender.vsh */,
|
||||||
|
0C63A8861C33EB3B007E4B52 /* FinalRender.fsh */,
|
||||||
|
);
|
||||||
|
path = Shaders;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
0C63A8791C33C622007E4B52 /* Utilities */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
0C63A87B1C33C655007E4B52 /* NSValue+XIONAdditions.h */,
|
||||||
|
0C63A87C1C33C655007E4B52 /* NSValue+XIONAdditions.m */,
|
||||||
|
0C63A87A1C33C655007E4B52 /* XIONControlPanel-Bridging-Header.h */,
|
||||||
|
);
|
||||||
|
path = Utilities;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
@@ -122,9 +221,17 @@
|
|||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
0C63A8761C3373D1007E4B52 /* HorizontalBlur.vsh in Resources */,
|
||||||
|
0C63A87F1C33D3D7007E4B52 /* FirstPass.vsh in Resources */,
|
||||||
|
0C63A8731C337381007E4B52 /* CubletsTechnique.plist in Resources */,
|
||||||
|
0C63A8811C33D3DE007E4B52 /* FirstPass.fsh in Resources */,
|
||||||
|
0C63A8881C33EB3B007E4B52 /* FinalRender.fsh in Resources */,
|
||||||
0C3CAEB21C3350C800B856AD /* LaunchScreen.storyboard in Resources */,
|
0C3CAEB21C3350C800B856AD /* LaunchScreen.storyboard in Resources */,
|
||||||
0C3CAEAF1C3350C800B856AD /* Assets.xcassets in Resources */,
|
0C3CAEAF1C3350C800B856AD /* Assets.xcassets in Resources */,
|
||||||
0C3CAEAD1C3350C800B856AD /* Main.storyboard in Resources */,
|
0C63A8841C33DC29007E4B52 /* VerticalBlur.fsh in Resources */,
|
||||||
|
0C63A8851C33DC29007E4B52 /* VerticalBlur.vsh in Resources */,
|
||||||
|
0C63A8891C33EB3B007E4B52 /* FinalRender.vsh in Resources */,
|
||||||
|
0C63A8781C3373D9007E4B52 /* HorizontalBlur.fsh in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -135,22 +242,16 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
0C3CAEAA1C3350C800B856AD /* ViewController.swift in Sources */,
|
0C63A87D1C33C655007E4B52 /* NSValue+XIONAdditions.m in Sources */,
|
||||||
0C3CAEA81C3350C800B856AD /* AppDelegate.swift in Sources */,
|
0C20E2BD1C33534F00BA789B /* BackgroundViewController.swift in Sources */,
|
||||||
|
0C20E2B91C33514100BA789B /* AppDelegate.swift in Sources */,
|
||||||
|
0C20E2BB1C33529700BA789B /* MainViewController.swift in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
/* End PBXSourcesBuildPhase section */
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXVariantGroup section */
|
/* Begin PBXVariantGroup section */
|
||||||
0C3CAEAB1C3350C800B856AD /* Main.storyboard */ = {
|
|
||||||
isa = PBXVariantGroup;
|
|
||||||
children = (
|
|
||||||
0C3CAEAC1C3350C800B856AD /* Base */,
|
|
||||||
);
|
|
||||||
name = Main.storyboard;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
0C3CAEB01C3350C800B856AD /* LaunchScreen.storyboard */ = {
|
0C3CAEB01C3350C800B856AD /* LaunchScreen.storyboard */ = {
|
||||||
isa = PBXVariantGroup;
|
isa = PBXVariantGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -249,10 +350,13 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
INFOPLIST_FILE = XIONControlPanel/Info.plist;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
INFOPLIST_FILE = "$(SRCROOT)/XIONControlPanel/SupportingFiles/Info.plist";
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.xionsf.XIONControlPanel;
|
PRODUCT_BUNDLE_IDENTIFIER = com.xionsf.XIONControlPanel;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "XIONControlPanel/Utilities/XIONControlPanel-Bridging-Header.h";
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -260,10 +364,12 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
INFOPLIST_FILE = XIONControlPanel/Info.plist;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
INFOPLIST_FILE = "$(SRCROOT)/XIONControlPanel/SupportingFiles/Info.plist";
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.xionsf.XIONControlPanel;
|
PRODUCT_BUNDLE_IDENTIFIER = com.xionsf.XIONControlPanel;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "XIONControlPanel/Utilities/XIONControlPanel-Bridging-Header.h";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -286,6 +392,7 @@
|
|||||||
0C3CAEB81C3350C800B856AD /* Release */,
|
0C3CAEB81C3350C800B856AD /* Release */,
|
||||||
);
|
);
|
||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
/* End XCConfigurationList section */
|
/* End XCConfigurationList section */
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
//
|
|
||||||
// AppDelegate.swift
|
|
||||||
// XIONControlPanel
|
|
||||||
//
|
|
||||||
// Created by Charles Magahern on 12/29/15.
|
|
||||||
// Copyright © 2015 XION. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
@UIApplicationMain
|
|
||||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
||||||
|
|
||||||
var window: UIWindow?
|
|
||||||
|
|
||||||
|
|
||||||
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
|
|
||||||
// Override point for customization after application launch.
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func applicationWillResignActive(application: UIApplication) {
|
|
||||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
|
||||||
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
|
||||||
}
|
|
||||||
|
|
||||||
func applicationDidEnterBackground(application: UIApplication) {
|
|
||||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
|
||||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
|
||||||
}
|
|
||||||
|
|
||||||
func applicationWillEnterForeground(application: UIApplication) {
|
|
||||||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
|
||||||
}
|
|
||||||
|
|
||||||
func applicationDidBecomeActive(application: UIApplication) {
|
|
||||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
|
||||||
}
|
|
||||||
|
|
||||||
func applicationWillTerminate(application: UIApplication) {
|
|
||||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
30
XIONControlPanel/Application/AppDelegate.swift
Normal file
30
XIONControlPanel/Application/AppDelegate.swift
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
//
|
||||||
|
// AppDelegate.swift
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
@UIApplicationMain
|
||||||
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
|
var window: UIWindow?
|
||||||
|
|
||||||
|
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool
|
||||||
|
{
|
||||||
|
application.statusBarHidden = true
|
||||||
|
|
||||||
|
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
|
||||||
|
self.window?.rootViewController = MainViewController()
|
||||||
|
self.window?.makeKeyAndVisible()
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
func application(application: UIApplication, supportedInterfaceOrientationsForWindow window: UIWindow?) -> UIInterfaceOrientationMask
|
||||||
|
{
|
||||||
|
return UIInterfaceOrientationMask.Portrait
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
|
||||||
<dependencies>
|
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
|
|
||||||
</dependencies>
|
|
||||||
<scenes>
|
|
||||||
<!--View Controller-->
|
|
||||||
<scene sceneID="tne-QT-ifu">
|
|
||||||
<objects>
|
|
||||||
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
|
|
||||||
<layoutGuides>
|
|
||||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
|
||||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
|
||||||
</layoutGuides>
|
|
||||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
|
||||||
</view>
|
|
||||||
</viewController>
|
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
|
||||||
</scene>
|
|
||||||
</scenes>
|
|
||||||
</document>
|
|
||||||
145
XIONControlPanel/Controllers/BackgroundViewController.swift
Normal file
145
XIONControlPanel/Controllers/BackgroundViewController.swift
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
//
|
||||||
|
// BackgroundViewController.swift
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Darwin
|
||||||
|
import Foundation
|
||||||
|
import GLKit
|
||||||
|
import SceneKit
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
let π = Float(M_PI)
|
||||||
|
|
||||||
|
class BackgroundViewController: UIViewController {
|
||||||
|
private var _scene: SCNScene = SCNScene()
|
||||||
|
private var _sceneView: SCNView?
|
||||||
|
private var _cameraNode: SCNNode = SCNNode()
|
||||||
|
private var _cubletsNode: SCNNode = SCNNode()
|
||||||
|
|
||||||
|
static private let cubletsDimensions = 5
|
||||||
|
static private let cubletsSize = 1.0
|
||||||
|
static private let cubletsSpacing = 2.0
|
||||||
|
|
||||||
|
override func loadView()
|
||||||
|
{
|
||||||
|
let view = SCNView(frame: UIScreen.mainScreen().bounds, options: nil)
|
||||||
|
view.backgroundColor = UIColor.blackColor()
|
||||||
|
view.scene = _scene
|
||||||
|
view.allowsCameraControl = false
|
||||||
|
|
||||||
|
_sceneView = view
|
||||||
|
self.view = view
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewDidLoad()
|
||||||
|
{
|
||||||
|
super.viewDidLoad()
|
||||||
|
_setupCamera()
|
||||||
|
_setupLights()
|
||||||
|
_setupModel()
|
||||||
|
_setupAnimation()
|
||||||
|
_setupEffects()
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewDidAppear(animated: Bool)
|
||||||
|
{
|
||||||
|
super.viewDidAppear(animated)
|
||||||
|
_sceneView?.play(nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewDidDisappear(animated: Bool)
|
||||||
|
{
|
||||||
|
super.viewDidDisappear(animated)
|
||||||
|
_sceneView?.stop(nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: Internal
|
||||||
|
|
||||||
|
internal func _setupCamera()
|
||||||
|
{
|
||||||
|
let camera = SCNCamera()
|
||||||
|
|
||||||
|
_cameraNode.camera = camera
|
||||||
|
_cameraNode.position = SCNVector3Make(0.0, 0.0, 50.0)
|
||||||
|
_scene.rootNode.addChildNode(_cameraNode)
|
||||||
|
|
||||||
|
let centerNode = SCNNode()
|
||||||
|
centerNode.position = SCNVector3Zero
|
||||||
|
_scene.rootNode.addChildNode(centerNode)
|
||||||
|
|
||||||
|
let constraint = SCNLookAtConstraint(target: centerNode)
|
||||||
|
_cameraNode.constraints = [constraint]
|
||||||
|
}
|
||||||
|
|
||||||
|
internal func _setupLights()
|
||||||
|
{
|
||||||
|
let light = SCNLight()
|
||||||
|
light.type = SCNLightTypeOmni
|
||||||
|
light.color = UIColor.whiteColor()
|
||||||
|
|
||||||
|
let lightNode = SCNNode()
|
||||||
|
lightNode.light = light
|
||||||
|
lightNode.position = _cameraNode.position
|
||||||
|
|
||||||
|
_scene.rootNode.addChildNode(lightNode)
|
||||||
|
}
|
||||||
|
|
||||||
|
internal func _setupModel()
|
||||||
|
{
|
||||||
|
let sz = Float(BackgroundViewController.cubletsSize)
|
||||||
|
let dim = BackgroundViewController.cubletsDimensions
|
||||||
|
let dimf = Float(dim)
|
||||||
|
let spacing = Float(BackgroundViewController.cubletsSpacing)
|
||||||
|
let volume = (dimf * sz) + ((dimf - 1.0) * spacing)
|
||||||
|
let orig = -volume / 2.0
|
||||||
|
|
||||||
|
// setup material
|
||||||
|
let material = SCNMaterial()
|
||||||
|
material.diffuse.contents = UIColor.whiteColor()
|
||||||
|
material.transparency = 0.75
|
||||||
|
|
||||||
|
// setup geometry
|
||||||
|
let geom = SCNBox(width: CGFloat(sz), height: CGFloat(sz), length: CGFloat(sz), chamferRadius: 0.0)
|
||||||
|
geom.firstMaterial = material
|
||||||
|
|
||||||
|
for var xi = 0; xi < dim; ++xi {
|
||||||
|
let x = orig + Float(xi) * (sz + spacing)
|
||||||
|
|
||||||
|
for var yi = 0; yi < dim; ++yi {
|
||||||
|
let y = orig + Float(yi) * (sz + spacing)
|
||||||
|
|
||||||
|
for var zi = 0; zi < dim; ++zi {
|
||||||
|
let z = orig + Float(zi) * (sz + spacing)
|
||||||
|
|
||||||
|
let node = SCNNode(geometry: geom)
|
||||||
|
node.position = SCNVector3Make(x, y, z)
|
||||||
|
_cubletsNode.addChildNode(node)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_cubletsNode.position = SCNVector3Zero
|
||||||
|
_scene.rootNode.addChildNode(_cubletsNode)
|
||||||
|
}
|
||||||
|
|
||||||
|
internal func _setupAnimation()
|
||||||
|
{
|
||||||
|
let rotAxis = SCNVector3Make(0.25, 1.75, 1.0)
|
||||||
|
let rotAngle = CGFloat(Float(2.0)*π)
|
||||||
|
let rotAction = SCNAction.repeatActionForever(SCNAction.rotateByAngle(rotAngle, aroundAxis: rotAxis, duration: 20.0))
|
||||||
|
_cubletsNode.runAction(rotAction)
|
||||||
|
}
|
||||||
|
|
||||||
|
internal func _setupEffects()
|
||||||
|
{
|
||||||
|
let techniqueURL = NSBundle.mainBundle().URLForResource("CubletsTechnique", withExtension: "plist")
|
||||||
|
let techniqueDict = NSDictionary(contentsOfURL: techniqueURL!) as! [String : AnyObject]
|
||||||
|
let technique = SCNTechnique(dictionary: techniqueDict)
|
||||||
|
|
||||||
|
_sceneView?.technique = technique
|
||||||
|
}
|
||||||
|
}
|
||||||
36
XIONControlPanel/Controllers/MainViewController.swift
Normal file
36
XIONControlPanel/Controllers/MainViewController.swift
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
//
|
||||||
|
// MainViewController.swift
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class MainViewController: UIViewController {
|
||||||
|
private var _backgroundController: BackgroundViewController = BackgroundViewController()
|
||||||
|
|
||||||
|
override func viewDidLoad()
|
||||||
|
{
|
||||||
|
super.viewDidLoad()
|
||||||
|
|
||||||
|
self.view.backgroundColor = UIColor.blackColor()
|
||||||
|
|
||||||
|
self.addChildViewController(_backgroundController)
|
||||||
|
self.view.addSubview(_backgroundController.view)
|
||||||
|
}
|
||||||
|
|
||||||
|
override func prefersStatusBarHidden() -> Bool
|
||||||
|
{
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override func viewDidLayoutSubviews()
|
||||||
|
{
|
||||||
|
super.viewDidLayoutSubviews()
|
||||||
|
|
||||||
|
let bounds = self.view.bounds
|
||||||
|
_backgroundController.view.frame = bounds
|
||||||
|
}
|
||||||
|
}
|
||||||
135
XIONControlPanel/Resources/CubletsTechnique.plist
Normal file
135
XIONControlPanel/Resources/CubletsTechnique.plist
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>sequence</key>
|
||||||
|
<array>
|
||||||
|
<string>firstPass</string>
|
||||||
|
<string>hblur</string>
|
||||||
|
<string>vblur</string>
|
||||||
|
<string>finalRender</string>
|
||||||
|
</array>
|
||||||
|
<key>passes</key>
|
||||||
|
<dict>
|
||||||
|
<key>firstPass</key>
|
||||||
|
<dict>
|
||||||
|
<key>draw</key>
|
||||||
|
<string>DRAW_QUAD</string>
|
||||||
|
<key>program</key>
|
||||||
|
<string>FirstPass</string>
|
||||||
|
<key>inputs</key>
|
||||||
|
<dict>
|
||||||
|
<key>a_position</key>
|
||||||
|
<string>a_position-symbol</string>
|
||||||
|
<key>u_colorSampler</key>
|
||||||
|
<string>COLOR</string>
|
||||||
|
</dict>
|
||||||
|
<key>outputs</key>
|
||||||
|
<dict>
|
||||||
|
<key>color</key>
|
||||||
|
<string>firstPass_color</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>hblur</key>
|
||||||
|
<dict>
|
||||||
|
<key>draw</key>
|
||||||
|
<string>DRAW_QUAD</string>
|
||||||
|
<key>program</key>
|
||||||
|
<string>HorizontalBlur</string>
|
||||||
|
<key>inputs</key>
|
||||||
|
<dict>
|
||||||
|
<key>a_position</key>
|
||||||
|
<string>a_position-symbol</string>
|
||||||
|
<key>u_colorSampler</key>
|
||||||
|
<string>firstPass_color</string>
|
||||||
|
</dict>
|
||||||
|
<key>outputs</key>
|
||||||
|
<dict>
|
||||||
|
<key>color</key>
|
||||||
|
<string>hblur_color</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>vblur</key>
|
||||||
|
<dict>
|
||||||
|
<key>draw</key>
|
||||||
|
<string>DRAW_QUAD</string>
|
||||||
|
<key>program</key>
|
||||||
|
<string>VerticalBlur</string>
|
||||||
|
<key>inputs</key>
|
||||||
|
<dict>
|
||||||
|
<key>a_position</key>
|
||||||
|
<string>a_position-symbol</string>
|
||||||
|
<key>u_colorSampler</key>
|
||||||
|
<string>hblur_color</string>
|
||||||
|
</dict>
|
||||||
|
<key>outputs</key>
|
||||||
|
<dict>
|
||||||
|
<key>color</key>
|
||||||
|
<string>bothblurs_color</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>finalRender</key>
|
||||||
|
<dict>
|
||||||
|
<key>draw</key>
|
||||||
|
<string>DRAW_QUAD</string>
|
||||||
|
<key>program</key>
|
||||||
|
<string>FinalRender</string>
|
||||||
|
<key>inputs</key>
|
||||||
|
<dict>
|
||||||
|
<key>a_position</key>
|
||||||
|
<string>a_position-symbol</string>
|
||||||
|
<key>u_blurmapSampler</key>
|
||||||
|
<string>bothblurs_color</string>
|
||||||
|
<key>u_colorSampler</key>
|
||||||
|
<string>firstPass_color</string>
|
||||||
|
</dict>
|
||||||
|
<key>outputs</key>
|
||||||
|
<dict>
|
||||||
|
<key>color</key>
|
||||||
|
<string>COLOR</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>targets</key>
|
||||||
|
<dict>
|
||||||
|
<key>firstPass_color</key>
|
||||||
|
<dict>
|
||||||
|
<key>type</key>
|
||||||
|
<string>color</string>
|
||||||
|
</dict>
|
||||||
|
<key>hblur_color</key>
|
||||||
|
<dict>
|
||||||
|
<key>type</key>
|
||||||
|
<string>color</string>
|
||||||
|
</dict>
|
||||||
|
<key>bothblurs_color</key>
|
||||||
|
<dict>
|
||||||
|
<key>type</key>
|
||||||
|
<string>color</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>symbols</key>
|
||||||
|
<dict>
|
||||||
|
<key>u_blurRadius-symbol</key>
|
||||||
|
<dict>
|
||||||
|
<key>type</key>
|
||||||
|
<string>float</string>
|
||||||
|
</dict>
|
||||||
|
<key>u_viewportSize-symbol</key>
|
||||||
|
<dict>
|
||||||
|
<key>type</key>
|
||||||
|
<string>vec2</string>
|
||||||
|
</dict>
|
||||||
|
<key>u_blurKernel-symbol</key>
|
||||||
|
<dict>
|
||||||
|
<key>type</key>
|
||||||
|
<string>mat4</string>
|
||||||
|
</dict>
|
||||||
|
<key>a_position-symbol</key>
|
||||||
|
<dict>
|
||||||
|
<key>semantic</key>
|
||||||
|
<string>vertex</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
23
XIONControlPanel/Shaders/FinalRender.fsh
Normal file
23
XIONControlPanel/Shaders/FinalRender.fsh
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// FinalRender.fsh
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
uniform sampler2D u_colorSampler;
|
||||||
|
uniform sampler2D u_blurmapSampler;
|
||||||
|
varying vec2 v_uv;
|
||||||
|
|
||||||
|
float saturate(float v)
|
||||||
|
{
|
||||||
|
return clamp(v, 0.0, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 color = texture2D(u_colorSampler, v_uv) + texture2D(u_blurmapSampler, v_uv);
|
||||||
|
float dist = length(v_uv - vec2(0.5));
|
||||||
|
gl_FragColor = saturate(1.0 / (8.0 * (dist + 0.1))) * color;
|
||||||
|
}
|
||||||
16
XIONControlPanel/Shaders/FinalRender.vsh
Normal file
16
XIONControlPanel/Shaders/FinalRender.vsh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// FinalRender.vsh
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
attribute vec4 a_position;
|
||||||
|
varying vec2 v_uv;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
v_uv = (a_position.xy + 1.0) * 0.5;
|
||||||
|
gl_Position = a_position;
|
||||||
|
}
|
||||||
15
XIONControlPanel/Shaders/FirstPass.fsh
Normal file
15
XIONControlPanel/Shaders/FirstPass.fsh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
//
|
||||||
|
// FirstPass.fsh
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
uniform sampler2D u_colorSampler;
|
||||||
|
varying vec2 v_uv;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
gl_FragColor = texture2D(u_colorSampler, v_uv);
|
||||||
|
}
|
||||||
16
XIONControlPanel/Shaders/FirstPass.vsh
Normal file
16
XIONControlPanel/Shaders/FirstPass.vsh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// FirstPass.vsh
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
attribute vec4 a_position;
|
||||||
|
varying vec2 v_uv;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
v_uv = (a_position.xy + 1.0) * 0.5;
|
||||||
|
gl_Position = a_position;
|
||||||
|
}
|
||||||
31
XIONControlPanel/Shaders/HorizontalBlur.fsh
Normal file
31
XIONControlPanel/Shaders/HorizontalBlur.fsh
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
//
|
||||||
|
// HorizontalBlur.fsh
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
uniform sampler2D u_colorSampler;
|
||||||
|
varying vec2 v_uv;
|
||||||
|
varying vec2 v_blurTexCoords[14];
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
gl_FragColor = vec4(0.0);
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 0])*0.0044299121055113265;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 1])*0.00895781211794;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 2])*0.0215963866053;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 3])*0.0443683338718;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 4])*0.0776744219933;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 5])*0.115876621105;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 6])*0.147308056121;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_uv )*0.159576912161;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 7])*0.147308056121;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 8])*0.115876621105;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 9])*0.0776744219933;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[10])*0.0443683338718;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[11])*0.0215963866053;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[12])*0.00895781211794;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[13])*0.0044299121055113265;
|
||||||
|
}
|
||||||
32
XIONControlPanel/Shaders/HorizontalBlur.vsh
Normal file
32
XIONControlPanel/Shaders/HorizontalBlur.vsh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// HorizontalBlur.vsh
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
attribute vec4 a_position;
|
||||||
|
varying vec2 v_uv;
|
||||||
|
varying vec2 v_blurTexCoords[14];
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
v_uv = (a_position.xy + 1.0) * 0.5;
|
||||||
|
v_blurTexCoords[ 0] = v_uv + vec2(-0.028, 0.0);
|
||||||
|
v_blurTexCoords[ 1] = v_uv + vec2(-0.024, 0.0);
|
||||||
|
v_blurTexCoords[ 2] = v_uv + vec2(-0.020, 0.0);
|
||||||
|
v_blurTexCoords[ 3] = v_uv + vec2(-0.016, 0.0);
|
||||||
|
v_blurTexCoords[ 4] = v_uv + vec2(-0.012, 0.0);
|
||||||
|
v_blurTexCoords[ 5] = v_uv + vec2(-0.008, 0.0);
|
||||||
|
v_blurTexCoords[ 6] = v_uv + vec2(-0.004, 0.0);
|
||||||
|
v_blurTexCoords[ 7] = v_uv + vec2( 0.004, 0.0);
|
||||||
|
v_blurTexCoords[ 8] = v_uv + vec2( 0.008, 0.0);
|
||||||
|
v_blurTexCoords[ 9] = v_uv + vec2( 0.012, 0.0);
|
||||||
|
v_blurTexCoords[10] = v_uv + vec2( 0.016, 0.0);
|
||||||
|
v_blurTexCoords[11] = v_uv + vec2( 0.020, 0.0);
|
||||||
|
v_blurTexCoords[12] = v_uv + vec2( 0.024, 0.0);
|
||||||
|
v_blurTexCoords[13] = v_uv + vec2( 0.028, 0.0);
|
||||||
|
|
||||||
|
gl_Position = a_position;
|
||||||
|
}
|
||||||
31
XIONControlPanel/Shaders/VerticalBlur.fsh
Normal file
31
XIONControlPanel/Shaders/VerticalBlur.fsh
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
//
|
||||||
|
// VerticalBlur.fsh
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
uniform sampler2D u_colorSampler;
|
||||||
|
varying vec2 v_uv;
|
||||||
|
varying vec2 v_blurTexCoords[14];
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
gl_FragColor = vec4(0.0);
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 0])*0.0044299121055113265;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 1])*0.00895781211794;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 2])*0.0215963866053;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 3])*0.0443683338718;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 4])*0.0776744219933;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 5])*0.115876621105;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 6])*0.147308056121;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_uv )*0.159576912161;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 7])*0.147308056121;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 8])*0.115876621105;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[ 9])*0.0776744219933;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[10])*0.0443683338718;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[11])*0.0215963866053;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[12])*0.00895781211794;
|
||||||
|
gl_FragColor += texture2D(u_colorSampler, v_blurTexCoords[13])*0.0044299121055113265;
|
||||||
|
}
|
||||||
32
XIONControlPanel/Shaders/VerticalBlur.vsh
Normal file
32
XIONControlPanel/Shaders/VerticalBlur.vsh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// VerticalBlur.vsh
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
attribute vec4 a_position;
|
||||||
|
varying vec2 v_uv;
|
||||||
|
varying vec2 v_blurTexCoords[14];
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
v_uv = (a_position.xy + 1.0) * 0.5;
|
||||||
|
v_blurTexCoords[ 0] = v_uv + vec2(0.0, -0.028);
|
||||||
|
v_blurTexCoords[ 1] = v_uv + vec2(0.0, -0.024);
|
||||||
|
v_blurTexCoords[ 2] = v_uv + vec2(0.0, -0.020);
|
||||||
|
v_blurTexCoords[ 3] = v_uv + vec2(0.0, -0.016);
|
||||||
|
v_blurTexCoords[ 4] = v_uv + vec2(0.0, -0.012);
|
||||||
|
v_blurTexCoords[ 5] = v_uv + vec2(0.0, -0.008);
|
||||||
|
v_blurTexCoords[ 6] = v_uv + vec2(0.0, -0.004);
|
||||||
|
v_blurTexCoords[ 7] = v_uv + vec2(0.0, 0.004);
|
||||||
|
v_blurTexCoords[ 8] = v_uv + vec2(0.0, 0.008);
|
||||||
|
v_blurTexCoords[ 9] = v_uv + vec2(0.0, 0.012);
|
||||||
|
v_blurTexCoords[10] = v_uv + vec2(0.0, 0.016);
|
||||||
|
v_blurTexCoords[11] = v_uv + vec2(0.0, 0.020);
|
||||||
|
v_blurTexCoords[12] = v_uv + vec2(0.0, 0.024);
|
||||||
|
v_blurTexCoords[13] = v_uv + vec2(0.0, 0.028);
|
||||||
|
|
||||||
|
gl_Position = a_position;
|
||||||
|
}
|
||||||
@@ -59,6 +59,11 @@
|
|||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"size" : "76x76",
|
"size" : "76x76",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"size" : "83.5x83.5",
|
||||||
|
"scale" : "2x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<scenes>
|
<scenes>
|
||||||
<!--View Controller-->
|
<!--View Controller-->
|
||||||
@@ -15,8 +16,7 @@
|
|||||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<animations/>
|
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
|
||||||
</view>
|
</view>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
@@ -24,17 +24,17 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
<string>LaunchScreen</string>
|
<string>LaunchScreen</string>
|
||||||
<key>UIMainStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
<key>UIRequiredDeviceCapabilities</key>
|
<key>UIRequiredDeviceCapabilities</key>
|
||||||
<array>
|
<array>
|
||||||
<string>armv7</string>
|
<string>armv7</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>UIRequiresFullScreen</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIStatusBarHidden</key>
|
||||||
|
<true/>
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
<array>
|
<array>
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
</array>
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
<array>
|
<array>
|
||||||
23
XIONControlPanel/Utilities/NSValue+XIONAdditions.h
Normal file
23
XIONControlPanel/Utilities/NSValue+XIONAdditions.h
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// NSValue+XIONAdditions.h
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <GLKit/GLKit.h>
|
||||||
|
|
||||||
|
@interface NSValue (XIONAdditions)
|
||||||
|
|
||||||
|
- (instancetype)initWithGLKMatrix3:(GLKMatrix3)matrix;
|
||||||
|
- (instancetype)initWithGLKMatrix4:(GLKMatrix4)matrix;
|
||||||
|
|
||||||
|
+ (instancetype)valueWithGLKMatrix3:(GLKMatrix3)matrix;
|
||||||
|
+ (instancetype)valueWithGLKMatrix4:(GLKMatrix4)matrix;
|
||||||
|
|
||||||
|
- (GLKMatrix3)GLKMatrix3Value;
|
||||||
|
- (GLKMatrix4)GLKMatrix4Value;
|
||||||
|
|
||||||
|
@end
|
||||||
47
XIONControlPanel/Utilities/NSValue+XIONAdditions.m
Normal file
47
XIONControlPanel/Utilities/NSValue+XIONAdditions.m
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
//
|
||||||
|
// NSValue+XIONAdditions.m
|
||||||
|
// XIONControlPanel
|
||||||
|
//
|
||||||
|
// Created by Charles Magahern on 12/29/15.
|
||||||
|
// Copyright © 2015 XION. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "NSValue+XIONAdditions.h"
|
||||||
|
|
||||||
|
@implementation NSValue (XIONAdditions)
|
||||||
|
|
||||||
|
- (instancetype)initWithGLKMatrix3:(GLKMatrix3)matrix
|
||||||
|
{
|
||||||
|
return [self initWithBytes:&matrix objCType:@encode(GLKMatrix3)];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (instancetype)initWithGLKMatrix4:(GLKMatrix4)matrix
|
||||||
|
{
|
||||||
|
return [self initWithBytes:&matrix objCType:@encode(GLKMatrix4)];
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (instancetype)valueWithGLKMatrix3:(GLKMatrix3)matrix
|
||||||
|
{
|
||||||
|
return [[[self class] alloc] initWithGLKMatrix3:matrix];
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (instancetype)valueWithGLKMatrix4:(GLKMatrix4)matrix
|
||||||
|
{
|
||||||
|
return [[[self class] alloc] initWithGLKMatrix4:matrix];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (GLKMatrix3)GLKMatrix3Value
|
||||||
|
{
|
||||||
|
GLKMatrix3 mat;
|
||||||
|
[self getValue:&mat];
|
||||||
|
return mat;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (GLKMatrix4)GLKMatrix4Value
|
||||||
|
{
|
||||||
|
GLKMatrix4 mat;
|
||||||
|
[self getValue:&mat];
|
||||||
|
return mat;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
//
|
||||||
|
// Use this file to import your target's public headers that you would like to expose to Swift.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "NSValue+XIONAdditions.h"
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
//
|
|
||||||
// ViewController.swift
|
|
||||||
// XIONControlPanel
|
|
||||||
//
|
|
||||||
// Created by Charles Magahern on 12/29/15.
|
|
||||||
// Copyright © 2015 XION. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
class ViewController: UIViewController {
|
|
||||||
|
|
||||||
override func viewDidLoad() {
|
|
||||||
super.viewDidLoad()
|
|
||||||
// Do any additional setup after loading the view, typically from a nib.
|
|
||||||
}
|
|
||||||
|
|
||||||
override func didReceiveMemoryWarning() {
|
|
||||||
super.didReceiveMemoryWarning()
|
|
||||||
// Dispose of any resources that can be recreated.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user