浏览代码
Added the possibility to override lighting with a user specified cubemap (this will be provided to both enlighten and the default reflection probe)
/fptl_cleanup
Added the possibility to override lighting with a user specified cubemap (this will be provided to both enlighten and the default reflection probe)
/fptl_cleanup
Julien Ignace
8 年前
当前提交
27b86771
共有 7 个文件被更改,包括 105 次插入 和 2 次删除
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/HDRISky/Editor/HDRISkyEditor.cs
-
29Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/SkyManager.cs
-
1Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/SkySettings.cs
-
9Assets/ScriptableRenderPipeline/common/Resources.meta
-
55Assets/ScriptableRenderPipeline/common/Resources/BlitCubemap.shader
-
9Assets/ScriptableRenderPipeline/common/Resources/BlitCubemap.shader.meta
|
|||
fileFormatVersion: 2 |
|||
guid: 1e02c245110074e4aa88a9b408060d4f |
|||
folderAsset: yes |
|||
timeCreated: 1491318329 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Hidden/BlitCubemap" { |
|||
SubShader { |
|||
// Cubemap blit. Takes a face index. |
|||
Pass { |
|||
ZTest Always Cull Off ZWrite Off |
|||
|
|||
HLSLPROGRAM |
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
#pragma target 4.5 |
|||
|
|||
#include "../../ShaderLibrary/Common.hlsl" |
|||
|
|||
TEXTURECUBE(_MainTex); |
|||
SAMPLERCUBE(sampler_MainTex); |
|||
float _faceIndex; |
|||
|
|||
struct appdata_t { |
|||
uint vertexID : SV_VertexID; |
|||
}; |
|||
|
|||
struct v2f { |
|||
float4 vertex : SV_POSITION; |
|||
float3 texcoord : TEXCOORD0; |
|||
}; |
|||
|
|||
static const float3 faceU[6] = { float3(0, 0, -1), float3(0, 0, 1), float3(1, 0, 0), float3(1, 0, 0), float3(1, 0, 0), float3(-1, 0, 0) }; |
|||
static const float3 faceV[6] = { float3(0, -1, 0), float3(0, -1, 0), float3(0, 0, 1), float3(0, 0, -1), float3(0, -1, 0), float3(0, -1, 0) }; |
|||
|
|||
v2f vert (appdata_t v) |
|||
{ |
|||
v2f o; |
|||
|
|||
o.vertex = GetFullScreenTriangleVertexPosition(v.vertexID); |
|||
float2 uv = GetFullScreenTriangleTexcoord(v.vertexID) * 2.0 - 1.0; |
|||
|
|||
int idx = (int)_faceIndex; |
|||
float3 transformU = faceU[idx]; |
|||
float3 transformV = faceV[idx]; |
|||
|
|||
float3 n = cross(transformV, transformU); |
|||
o.texcoord = n + uv.x * transformU + uv.y * transformV; |
|||
return o; |
|||
} |
|||
|
|||
float4 frag (v2f i) : SV_Target |
|||
{ |
|||
return SAMPLE_TEXTURECUBE(_MainTex, sampler_MainTex, i.texcoord); |
|||
} |
|||
ENDHLSL |
|||
|
|||
} |
|||
} |
|||
Fallback Off |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: d05913e251bed7a4992c921c62e1b647 |
|||
timeCreated: 1491318357 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue