Danbias/Code/OysterGraphics/Shader/Passes/Blur/BlurSharedData.hlsli

48 lines
885 B
HLSL
Raw Normal View History

2014-02-07 13:46:55 +01:00
#ifndef BLURSHAREDDATA
#define BLURSHAREDDATA
2014-02-13 15:24:19 +01:00
cbuffer BlurrData : register(b1)
2014-02-07 13:46:55 +01:00
{
2014-02-13 15:24:19 +01:00
//static const int blurRadius = 0;
//static const float Weights[1] =
//{
// 1.0f
//};
/*static const int blurRadius = 4;
static const float Weights[9] =
{
0.05f, 0.05f, 0.1f, 0.15f, 0.3f, 0.15f, 0.1f, 0.05f, 0.05f
};*/
static const int blurRadius = 5;
static const float Weights[11] =
{
0.05f,0.05f,0.1f,0.1f,0.1f,0.2f,0.1f,0.1f,0.1f,0.05f,0.05f
};
2014-02-07 13:46:55 +01:00
};
2014-02-13 15:24:19 +01:00
2014-02-07 13:46:55 +01:00
#define N 128
#define gSize (N+2*blurRadius)
groupshared float4 gCache[gSize];
Texture2D inTex : register(t0);
RWTexture2D<float4> outTex : register(u0);
2014-02-13 15:24:19 +01:00
cbuffer BlurrData : register(b0)
{
uint2 Start;
uint2 Stop;
float4 BlurMask;
};
2014-02-07 13:46:55 +01:00
//[numthreads(16,16,1)]
//void TryCompute(uint3 ThreadID : SV_DispatchThreadID)
//{
// Output[ThreadID.xy] = Diffuse[ThreadID.xy]*0.5f+Glow[ThreadID.xy]*Glow[ThreadID.xy].w;
//}
#endif