sebastienlagarde
7 年前
当前提交
2c1c78cf
共有 68 个文件被更改,包括 930 次插入 和 388 次删除
-
4.gitmodules
-
2ScriptableRenderPipeline/Core/CoreRP/CoreResources/EncodeBC6H.compute
-
2ScriptableRenderPipeline/Core/CoreRP/CoreResources/GPUCopy.compute
-
2ScriptableRenderPipeline/Core/CoreRP/CoreResources/TexturePadding.compute
-
2ScriptableRenderPipeline/Core/CoreRP/Editor/Volume/Drawers/ColorParameterDrawer.cs
-
39ScriptableRenderPipeline/Core/CoreRP/Editor/Volume/VolumeComponentListEditor.cs
-
31ScriptableRenderPipeline/Core/CoreRP/Editor/Volume/VolumeEditor.cs
-
2ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Common.hlsl
-
2ScriptableRenderPipeline/Core/CoreRP/Shadow/DebugDisplayShadowMap.shader
-
2ScriptableRenderPipeline/Core/CoreRP/Shadow/ShadowBlurMoments.compute
-
2ScriptableRenderPipeline/Core/CoreRP/Shadow/ShadowClear.shader
-
5ScriptableRenderPipeline/Core/CoreRP/Volume/Volume.cs
-
23ScriptableRenderPipeline/Core/CoreRP/Volume/VolumeManager.cs
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDCamera.cs
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugColorPicker.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplayLatlong.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugFullScreen.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugViewMaterialGBuffer.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugViewTiles.shader
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/BuildPlayer/HDRPCustomBuildProcessor.cs
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/DiffusionProfile/DrawDiffusionProfile.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/DiffusionProfile/DrawTransmittanceGraph.shader
-
196ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/StackLit/BaseMaterialUI.cs
-
204ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/StackLit/StackLitUI.cs
-
5ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Deferred.shader
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/DeferredDirectionalShadow.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/Deferred.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/builddispatchindirect.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/cleardispatchindirect.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild-bigtile.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild-clustered.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild.compute
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/materialflags.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/scrbound.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/VolumetricLighting.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Decal/Decal.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/BuildProbabilityTables.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/ComputeGgxIblSampleData.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/GGXConvolve.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLit.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/LayeredLitTessellation.shader
-
6ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitTessellation.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/PreIntegratedFGD/PreIntegratedFGD.shader
-
109ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/StackLit/StackLit.shader
-
358ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/StackLit/StackLitData.hlsl
-
66ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/StackLit/StackLitProperties.hlsl
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/CombineLighting.shader
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Unlit/Unlit.shader
-
6ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipeline/FrameSettings.cs
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/ApplyDistorsion.compute
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/Blit.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/ColorPyramid.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/CopyDepthBuffer.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/CopyStencilBuffer.shader
-
4ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DepthPyramid.compute
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/HDRISky/HDRISky.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/OpaqueAtmosphericScattering.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/ProceduralSky/ProceduralSky.shader
-
10ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs
-
121ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/API/Switch.hlsl
-
9ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/API/Switch.hlsl.meta
-
8Tests/UTF_Tests_HDRP.meta
|
|||
// This file assume SHADER_API_SWITCH is defined |
|||
// TODO: This is a straight copy from D3D11.hlsl. Go through all this stuff and adjust where needed. |
|||
|
|||
#define UNITY_UV_STARTS_AT_TOP 1 |
|||
#define UNITY_REVERSED_Z 1 |
|||
#define UNITY_NEAR_CLIP_VALUE (1.0) |
|||
// This value will not go through any matrix projection conversion |
|||
#define UNITY_RAW_FAR_CLIP_VALUE (0.0) |
|||
#define VERTEXID_SEMANTIC SV_VertexID |
|||
#define FRONT_FACE_SEMANTIC SV_IsFrontFace |
|||
#define FRONT_FACE_TYPE bool |
|||
#define IS_FRONT_VFACE(VAL, FRONT, BACK) ((VAL) ? (FRONT) : (BACK)) |
|||
|
|||
#define CBUFFER_START(name) cbuffer name { |
|||
#define CBUFFER_END }; |
|||
|
|||
// flow control attributes |
|||
#define UNITY_BRANCH [branch] |
|||
#define UNITY_FLATTEN [flatten] |
|||
#define UNITY_UNROLL [unroll] |
|||
#define UNITY_UNROLLX(_x) [unroll(_x)] |
|||
#define UNITY_LOOP [loop] |
|||
|
|||
// Initialize arbitrary structure with zero values. |
|||
// Do not exist on some platform, in this case we need to have a standard name that call a function that will initialize all parameters to 0 |
|||
#define ZERO_INITIALIZE(type, name) name = (type)0; |
|||
#define ZERO_INITIALIZE_ARRAY(type, name, arraySize) { for (int arrayIndex = 0; arrayIndex < arraySize; arrayIndex++) { name[arrayIndex] = (type)0; } } |
|||
|
|||
// Texture util abstraction |
|||
|
|||
#define CALCULATE_TEXTURE2D_LOD(textureName, samplerName, coord2) textureName.CalculateLevelOfDetail(samplerName, coord2) |
|||
|
|||
// Texture abstraction |
|||
|
|||
#define TEXTURE2D(textureName) Texture2D textureName |
|||
#define TEXTURE2D_ARRAY(textureName) Texture2DArray textureName |
|||
#define TEXTURECUBE(textureName) TextureCube textureName |
|||
#define TEXTURECUBE_ARRAY(textureName) TextureCubeArray textureName |
|||
#define TEXTURE3D(textureName) Texture3D textureName |
|||
|
|||
#define TEXTURE2D_SHADOW(textureName) TEXTURE2D(textureName) |
|||
#define TEXTURE2D_ARRAY_SHADOW(textureName) TEXTURE2D_ARRAY(textureName) |
|||
#define TEXTURECUBE_SHADOW(textureName) TEXTURECUBE(textureName) |
|||
#define TEXTURECUBE_ARRAY_SHADOW(textureName) TEXTURECUBE_ARRAY(textureName) |
|||
|
|||
#define RW_TEXTURE2D(type, textureName) RWTexture2D<type> textureName |
|||
#define RW_TEXTURE3D(type, textureName) RWTexture3D<type> textureName |
|||
|
|||
#define SAMPLER(samplerName) SamplerState samplerName |
|||
#define SAMPLER_CMP(samplerName) SamplerComparisonState samplerName |
|||
|
|||
#define TEXTURE2D_ARGS(textureName, samplerName) TEXTURE2D(textureName), SAMPLER(samplerName) |
|||
#define TEXTURE2D_ARRAY_ARGS(textureName, samplerName) TEXTURE2D_ARRAY(textureName), SAMPLER(samplerName) |
|||
#define TEXTURECUBE_ARGS(textureName, samplerName) TEXTURECUBE(textureName), SAMPLER(samplerName) |
|||
#define TEXTURECUBE_ARRAY_ARGS(textureName, samplerName) TEXTURECUBE_ARRAY(textureName), SAMPLER(samplerName) |
|||
#define TEXTURE3D_ARGS(textureName, samplerName) TEXTURE3D(textureName), SAMPLER(samplerName) |
|||
|
|||
#define TEXTURE2D_SHADOW_ARGS(textureName, samplerName) TEXTURE2D(textureName), SAMPLER_CMP(samplerName) |
|||
#define TEXTURE2D_ARRAY_SHADOW_ARGS(textureName, samplerName) TEXTURE2D_ARRAY(textureName), SAMPLER_CMP(samplerName) |
|||
#define TEXTURECUBE_SHADOW_ARGS(textureName, samplerName) TEXTURECUBE(textureName), SAMPLER_CMP(samplerName) |
|||
#define TEXTURECUBE_ARRAY_SHADOW_ARGS(textureName, samplerName) TEXTURECUBE_ARRAY(textureName), SAMPLER_CMP(samplerName) |
|||
|
|||
#define TEXTURE2D_PARAM(textureName, samplerName) textureName, samplerName |
|||
#define TEXTURE2D_ARRAY_PARAM(textureName, samplerName) textureName, samplerName |
|||
#define TEXTURECUBE_PARAM(textureName, samplerName) textureName, samplerName |
|||
#define TEXTURECUBE_ARRAY_PARAM(textureName, samplerName) textureName, samplerName |
|||
#define TEXTURE3D_PARAM(textureName, samplerName) textureName, samplerName |
|||
|
|||
#define TEXTURE2D_SHADOW_PARAM(textureName, samplerName) textureName, samplerName |
|||
#define TEXTURE2D_ARRAY_SHADOW_PARAM(textureName, samplerName) textureName, samplerName |
|||
#define TEXTURECUBE_SHADOW_PARAM(textureName, samplerName) textureName, samplerName |
|||
#define TEXTURECUBE_ARRAY_SHADOW_PARAM(textureName, samplerName) textureName, samplerName |
|||
|
|||
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2) |
|||
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod) |
|||
#define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias) |
|||
#define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy) |
|||
#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index)) |
|||
#define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod) |
|||
#define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias) |
|||
#define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3) |
|||
#define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod) |
|||
#define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias) |
|||
#define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index)) |
|||
#define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod) |
|||
#define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias) |
|||
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3) |
|||
#define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod) |
|||
|
|||
#define SAMPLE_TEXTURE2D_SHADOW(textureName, samplerName, coord3) textureName.SampleCmpLevelZero(samplerName, (coord3).xy, (coord3).z) |
|||
#define SAMPLE_TEXTURE2D_ARRAY_SHADOW(textureName, samplerName, coord3, index) textureName.SampleCmpLevelZero(samplerName, float3((coord3).xy, index), (coord3).z) |
|||
#define SAMPLE_TEXTURECUBE_SHADOW(textureName, samplerName, coord4) textureName.SampleCmpLevelZero(samplerName, (coord3).xyz, (coord3).w) |
|||
#define SAMPLE_TEXTURECUBE_ARRAY_SHADOW(textureName, samplerName, coord4, index) textureName.SampleCmpLevelZero(samplerName, float4((coord4).xyz, index), (coord4).w) |
|||
|
|||
#define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r |
|||
#define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r |
|||
|
|||
float4 switch_load_texture2d(Texture2D texName, uint2 unCoord2) { |
|||
uint _tw; uint _th; |
|||
texName.GetDimensions(_tw, _th); |
|||
unCoord2 = clamp(unCoord2, uint2(0, 0), uint2(_tw-1, _th-1)); |
|||
return texName.Load(int3(unCoord2, 0)); |
|||
} |
|||
//(kc)#define LOAD_TEXTURE2D(textureName, unCoord2) textureName.Load(int3(unCoord2, 0)) |
|||
#define LOAD_TEXTURE2D(textureName, unCoord2) switch_load_texture2d(textureName, unCoord2) |
|||
#define LOAD_TEXTURE2D_LOD(textureName, unCoord2, lod) textureName.Load(int3(unCoord2, lod)) |
|||
#define LOAD_TEXTURE2D_MSAA(textureName, unCoord2, sampleIndex) textureName.Load(unCoord2, sampleIndex) |
|||
#define LOAD_TEXTURE2D_ARRAY(textureName, unCoord2, index) textureName.Load(int4(unCoord2, index, 0)) |
|||
#define LOAD_TEXTURE2D_ARRAY_LOD(textureName, unCoord2, index, lod) textureName.Load(int4(unCoord2, index, lod)) |
|||
#define LOAD_TEXTURE3D(textureName, unCoord3) textureName.Load(int4(unCoord3, 0)) |
|||
#define LOAD_TEXTURE3D_LOD(textureName, unCoord3, lod) textureName.Load(int4(unCoord3, lod)) |
|||
|
|||
#define PLATFORM_SUPPORT_GATHER |
|||
#define GATHER_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.Gather(samplerName, coord2, offset) |
|||
#define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index), offset) |
|||
#define GATHER_TEXTURECUBE(textureName, samplerName, coord3) textureName.Gather(samplerName, coord3) |
|||
#define GATHER_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Gather(samplerName, float4(coord3, index)) |
|||
|
|||
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherRed(samplerName, coord2, offset) |
|||
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherGreen(samplerName, coord2, offset) |
|||
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2, offset) textureName.GatherBlue(samplerName, coord2, offset) |
|
|||
fileFormatVersion: 2 |
|||
guid: e81335bf0a3c45c4fa81ed2fe67eeba0 |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 86137e24adbf2b7488553f8ddda7cc8e |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue