浏览代码
Reflection Probe Cache: Handled input of the wrong size/format with an additional conversion step.
/Add-support-for-light-specular-color-tint
Reflection Probe Cache: Handled input of the wrong size/format with an additional conversion step.
/Add-support-for-light-specular-color-tint
Julien Ignace
7 年前
当前提交
8b37cbb5
共有 11 个文件被更改,包括 160 次插入 和 35 次删除
-
7ScriptableRenderPipeline/Core/ShaderLibrary/Common.hlsl
-
5ScriptableRenderPipeline/Core/ShaderLibrary/CommonMaterial.hlsl
-
2ScriptableRenderPipeline/Core/TextureCache.cs
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
-
93ScriptableRenderPipeline/HDRenderPipeline/Lighting/ReflectionProbeCache.cs
-
2ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs
-
7ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/SceneSettings.cs
-
2TestbedPipelines/Fptl/FptlLighting.cs
-
2TestbedPipelines/OnTileDeferredPipeline/OnTileDeferredRenderPipeline.cs
-
65ScriptableRenderPipeline/Core/Resources/ConvertTexture.shader
-
8ScriptableRenderPipeline/Core/Resources/ConvertTexture.shader.meta
|
|||
Shader "Hidden/SRP/BlitCubeTextureFace" |
|||
{ |
|||
SubShader |
|||
{ |
|||
// Cubemap blit. Takes a face index. |
|||
Pass |
|||
{ |
|||
|
|||
ZTest Always |
|||
ZWrite Off |
|||
Cull Off |
|||
|
|||
HLSLPROGRAM |
|||
#include "../ShaderLibrary/Common.hlsl" |
|||
|
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
#pragma target 3.0 |
|||
|
|||
TEXTURECUBE(_InputTex); |
|||
SAMPLERCUBE(sampler_InputTex); |
|||
|
|||
float _FaceIndex; |
|||
|
|||
struct Attributes |
|||
{ |
|||
uint vertexID : SV_VertexID; |
|||
}; |
|||
|
|||
struct Varyings |
|||
{ |
|||
float4 positionCS : 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) }; |
|||
|
|||
Varyings vert (Attributes input) |
|||
{ |
|||
Varyings output; |
|||
output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID); |
|||
|
|||
float2 uv = GetFullScreenTriangleTexCoord(input.vertexID); |
|||
uv = uv * 2 - 1; |
|||
|
|||
int idx = (int)_FaceIndex; |
|||
float3 transformU = faceU[idx]; |
|||
float3 transformV = faceV[idx]; |
|||
|
|||
float3 n = cross(transformV, transformU); |
|||
output.texcoord = n + uv.x * transformU + uv.y * transformV; |
|||
return output; |
|||
} |
|||
|
|||
float4 frag (Varyings input) : SV_Target |
|||
{ |
|||
return SAMPLE_TEXTURECUBE(_InputTex, sampler_InputTex, input.texcoord); |
|||
} |
|||
|
|||
ENDHLSL |
|||
} |
|||
} |
|||
Fallback Off |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: d850d0a2481878d4bbf17e5126b04163 |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue