浏览代码

Merge pull request #992 from Unity-Technologies/Branch_PragmaRenderersCompute

Added #pragma_only_renderers to compute shaders.
/main
GitHub 7 年前
当前提交
3e5a3c18
共有 19 个文件被更改,包括 36 次插入0 次删除
  1. 2
      ScriptableRenderPipeline/Core/CoreRP/CoreResources/EncodeBC6H.compute
  2. 2
      ScriptableRenderPipeline/Core/CoreRP/CoreResources/GPUCopy.compute
  3. 2
      ScriptableRenderPipeline/Core/CoreRP/Shadow/ShadowBlurMoments.compute
  4. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/DeferredDirectionalShadow.compute
  5. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/Deferred.compute
  6. 1
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/builddispatchindirect.compute
  7. 1
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/cleardispatchindirect.compute
  8. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild-bigtile.compute
  9. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild-clustered.compute
  10. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild.compute
  11. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/materialflags.compute
  12. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/scrbound.compute
  13. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/Resources/VolumetricLighting.compute
  14. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/BuildProbabilityTables.compute
  15. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/ComputeGgxIblSampleData.compute
  16. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.compute
  17. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/ApplyDistorsion.compute
  18. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/ColorPyramid.compute
  19. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DepthPyramid.compute

2
ScriptableRenderPipeline/Core/CoreRP/CoreResources/EncodeBC6H.compute


#include "CoreRP/ShaderLibrary/BC6H.hlsl"
#include "CoreRP/ShaderLibrary/Sampling/Sampling.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
TextureCube<float4> _Source;
RWTexture2DArray<uint4> _Target;
int _MipIndex;

2
ScriptableRenderPipeline/Core/CoreRP/CoreResources/GPUCopy.compute


#include "../ShaderLibrary/Common.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
RWTexture2D<float1> _Result1;
Texture2D<float4> _Source4;

2
ScriptableRenderPipeline/Core/CoreRP/Shadow/ShadowBlurMoments.compute


#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Shadow/ShadowMoments.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
#if MAX_MSAA > 1
Texture2DMS<float> depthTex;
#else

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/DeferredDirectionalShadow.compute


#include "../ShaderVariables.hlsl"
#include "Lighting.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
//#pragma enable_d3d11_debug_symbols
RWTexture2D<float4> _DeferredShadowTextureUAV;

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/Deferred.compute


#include "../../Debug/DebugDisplay.hlsl"
#include "../../Lighting/Lighting.hlsl" // This include Material.hlsl
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
//-------------------------------------------------------------------------------------
// variable declaration
//-------------------------------------------------------------------------------------

1
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/builddispatchindirect.compute


#pragma kernel BuildDispatchIndirect
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "LightLoop.cs.hlsl"

1
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/cleardispatchindirect.compute


#pragma kernel ClearDispatchIndirect
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
RWBuffer<uint> g_DispatchIndirectBuffer : register( u0 ); // Indirect arguments have to be in a _buffer_, not a structured buffer

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild-bigtile.compute


#include "LightingConvexHullUtils.hlsl"
#include "SortingComputeUtils.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
#define EXACT_EDGE_TESTS
#define PERFORM_SPHERICAL_INTERSECTION_TESTS

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild-clustered.compute


#include "SortingComputeUtils.hlsl"
#endif
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
//#define EXACT_EDGE_TESTS
#define PERFORM_SPHERICAL_INTERSECTION_TESTS
#define CONV_HULL_TEST_ENABLED

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/lightlistbuild.compute


#include "SortingComputeUtils.hlsl"
#endif
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
#define FINE_PRUNING_ENABLED
#define PERFORM_SPHERICAL_INTERSECTION_TESTS

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/materialflags.compute


#include "../../Material/Material.hlsl" // This includes Material.hlsl
#include "../../Lighting/LightDefinition.cs.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
#define USE_MATERIAL_FEATURE_FLAGS
#define NR_THREADS 64

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/scrbound.compute


#include "CoreRP/ShaderLibrary/common.hlsl"
#include "LightLoop.cs.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
uniform int g_isOrthographic;
uniform int g_iNrVisibLights;

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/Resources/VolumetricLighting.compute


#include "../../Lighting.hlsl" // Includes Material.hlsl
#include "../../LightEvaluation.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
//--------------------------------------------------------------------------------------------------
// Inputs & outputs
//--------------------------------------------------------------------------------------------------

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/BuildProbabilityTables.compute


#include "CoreRP/ShaderLibrary/ImageBasedLighting.hlsl"
#include "../../ShaderVariables.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
/* --- Input --- */
#define TEXTURE_HEIGHT 256 // Equiareal texture map: cos(theta) = 1.0 - 2.0 * v

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/GGXConvolution/ComputeGgxIblSampleData.compute


#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/ImageBasedLighting.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
#ifdef SHADER_API_MOBILE
#define MAX_IBL_SAMPLE_CNT 34
#else

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.compute


#include "../../Lighting/LightDefinition.cs.hlsl"
#include "SubsurfaceScattering.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
//--------------------------------------------------------------------------------------------------
// Inputs & outputs
//--------------------------------------------------------------------------------------------------

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/ApplyDistorsion.compute


#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "../Material/Builtin/BuiltinData.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
TEXTURE2D(_DistortionTexture);
TEXTURE2D(_GaussianPyramidColorTexture);
RW_TEXTURE2D(float4, _CameraColorTexture);

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/ColorPyramid.compute


#include "CoreRP/ShaderLibrary/Common.hlsl"
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
Texture2D<float4> _Source;
RWTexture2D<float4> _Result;

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DepthPyramid.compute


#pragma kernel KMain_8 KERNEL_SIZE=8 KERNEL_NAME=KMain_8
#pragma kernel KMain_1 KERNEL_SIZE=1 KERNEL_NAME=KMain_1
#pragma only_renderers d3d11 ps4 xboxone vulkan metal
Texture2D<float> _Source;
RWTexture2D<float> _Result;

正在加载...
取消
保存