Page MenuHomePhabricator

StorePointLightCookieMap.shader
No OneTemporary

StorePointLightCookieMap.shader

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// ///
/// MIT License ///
/// ///
/// Copyright (c) 2016 Raphaël Ernaelsten (@RaphErnaelsten) ///
/// ///
/// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), ///
/// to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, ///
/// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: ///
/// ///
/// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. ///
/// ///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ///
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ///
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS ///
/// IN THE SOFTWARE. ///
/// ///
/// PLEASE CONSIDER CREDITING AURA IN YOUR PROJECTS. IF RELEVANT, USE THE UNMODIFIED LOGO PROVIDED IN THE "LICENSE" FOLDER. ///
/// ///
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Shader "Hidden/Aura/StorePointLightCookieMap"
{
Properties
{
_MainTex ("Texture", CUBE) = "white" {}
}
SubShader
{
Cull Off ZWrite Off ZTest Always
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 5.0
#include "UnityCG.cginc"
#include "../Aura.cginc"
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct v2f
{
float2 uv : TEXCOORD0;
float4 vertex : SV_POSITION;
};
v2f vert(appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.uv = v.uv;
return o;
}
samplerCUBE _MainTex;
float4x4 _InverseWorldMatrix;
fixed4 frag(v2f i) : SV_Target
{
float3 ray = GetNormalizedVectorFromNormalizedYawPitch(i.uv);
return texCUBE(_MainTex, mul(_InverseWorldMatrix, ray));
}
ENDCG
}
}
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 1:24 PM (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
311442
Default Alt Text
StorePointLightCookieMap.shader (4 KB)

Event Timeline