

	-- How to set up your own Clarity Preset -- 

	((Required storage space, Approx 2~4GB))
	
===================================================================
	
	Hey, it's Serfrost.  I'm writing this out because it's come to our attention that no matter what we really do for presets, it won't really matter in the long run.  Every user has a unique monitor / display they use with their PC, yeah?  A lot of them are calibrated differently, and they often come with numerous presets that alter colors, brightness, contrast, you name it.  Because of this, the presets that look good to me might not look good to you--the presets that look good to Jamie might not look good to you; you get the idea.  So I'm writing this hoping you'll take the time to do a few short steps to get you on your way to making the game look the way YOU want it to look on YOUR display!
	
	Jamie has coded this faithfully and diligently, and he's added a lot of different functions that were previously unavailable with these newer updates.  We hope you enjoy this and use it to it's fullest potential.

===================================================================	
	
	There are 15 steps total.  Please read very carefully and with your full attention.  As long as you do that, it's relatively just "point and click" and the rest is changing the numbers on your own and testing them to see what they do.

===================================================================	
	
	
1) Download & install Visual Studio Community 2017

	https://www.visualstudio.com/downloads/


2) On the setup window, within the Workload tab, select "Desktop development with C++"

	After installation and setup, close Visual Studio 2017...
	

3) Download & install Nsight for Visual Studio 2017 (You are required to make a Developer Account)

	https://developer.nvidia.com/nsight-visual-studio-edition-downloads

	After installation and setup, re-open Visual Studio 2017
	

4) Make a new Visual C++ > General > Empty Project (with a name of your choosing, i.e. Clarity)


4) In the Solution Explorer pane on the right, right-click your project's name with the ++ icon, select "Nsight User Properties"


5) Set the "Launch external program" to your Cemu.exe


6) Below that, "Command line arguments", simply set it to "-nsight" -- Then, Ok/Confirm


7) Save your project.  It can now be reused to skip these steps in the future.


===============\

Note 1: Transferrable ShaderCache and Precompiled ShaderCache must be either backed-up and deleted, or at least moved to a new location before the next step.  You must have an empty Transferrable and Precompiled with no shaders from BotW each time you run Nsight!  If Nsight ignores your regular Precompiled, read below.
	
	Note 2: This should be a one-time step.
	
	Visual Studio might be saving your shaderCache to a new location based on your working directory, if that happens you'll have to find that directory.  Mine was at...

	C:\Users\serfr\source\repos\Clarity\Clarity\shaderCache

	If it indeed does this, open that folder and clear it out.  Then right-click the folder, go to Properties, go to Security, and then edit the permissions to Deny all access to any user listed.

	This prevents Visual Studio from saving any shaderCache, which is what you want, since Nsight will not be able to use shaders that have already been turned into shaderCache, effectively skipping over them and screwing up your workflow.
	
===============/
	
	
8) Nsight menu at the top > Start Graphics Debugging


9) After Cemu opens itself, load the game and your save file.

	Note 2: My editing save is set to be at Riverside Stable between the Stable and the 4 trees on the hill.
	This allows the shader to always be located as the same number in the next steps for consistency, not
	only that, but it gives you a great vantage point to tune your variables.

	
10) Visual Studio: Nsight menu at the top > Windows > Shaders


11) Filter: "63" > Wait for the shader to process > Expand 633 > Open Shader Program 632, this should be Clarity.


===============\

	Note 2: If this isn't Clarity, then restart at the previous "Note 1" and load a different save.

===============/

	
12) If you've successfully opened the shader as Clarity, then right-click the contents and select "Edit"


13) You may now edit all the variables in realtime.  To view / compile your changes hit Ctrl + Shift + C


===============\

	Note 3: "Realtime", as in, you can view your changes by using the hotkey.  You do not have to stop the game, etc.

	Pro Tip 1: If time changes too fast for you, you can use Cemu > Debug > Custom Timer options to slow down time to 0.125x!  
	
	Pro Tip 2: If you want to chance it, you can use Visual Studio > Nsight Menu > Pause and Capture Frame ... you may then edit the shader with the frame frozen; this keeps time from progressing.  Keep in mind it may error, and keep in mind that resuming may heavily glitch the game.
	
	MAKE SURE YOU CHECK VARIOUS AREAS IN THE GAME TO MAKE SURE YOUR COLOR / SHADOW BALANCING IS CORRECT.
	
===============/
	
	
14) When you have your variables for your Preset where you want them, Ctrl + A to select all text, then Copy it.


15) Paste your entire shader code into a notepad and save it to wherever you want.  
	
	-- Make backups of files before making changes.  Keep track of your work! --

	The new shader.txt file has to be put in the Clarity GFX Pack for it to be used.  Make sure you replace the original with your own, or relocate the original somewhere else.  Your Preset must be the same name as the original file! 37040a485a29d54e_00000000000003c9_ps_.txt
	
	===
	
	MAKE SURE YOU CHECK VARIOUS AREAS IN THE GAME TO MAKE SURE YOUR COLOR / SHADOW BALANCING IS CORRECT.
	
	===