This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//PA_CubeRefraction is an adaptation of the UnityGI_IndirectSpecular function from UnityGlobalIllumination.cginc | |
float3 PA_CubeRefraction(float3 vViewDirectionWs, float3 vPositionWs, float frosted) { | |
float3 result = 0; | |
float3 vRefractionDirWs0 = vViewDirectionWs.xyz; | |
#if ( UNITY_SPECCUBE_BOX_PROJECTION ) | |
{ | |
vRefractionDirWs0.xyz = BoxProjectedCubemapDirection(vViewDirectionWs.xyz, vPositionWs.xyz, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
public class CustomFramer : MonoBehaviour { | |
public float radius = 1f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.Rendering; | |
[ExecuteInEditMode] | |
public class Exposure : MonoBehaviour { | |
const float DEFAULT_EXPOSURE = 3f; | |
const string EXPOSURE_PROPERTY = "_PA_Exposure"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Apply exposure | |
o.vColor.rgb *= _PA_Exposure; | |
//Uncharted 2 tonemapping curve http://filmicgames.com/archives/75 | |
o.vColor.rgb =((o.vColor.rgb*(0.15*o.vColor.rgb + 0.10*0.50) + 0.20*0.02) / (o.vColor.rgb*(0.15*o.vColor.rgb + 0.50) + 0.20*0.30)) - 0.02 / 0.30; |
OlderNewer