Removed unused shader.

This commit is contained in:
hiker 2015-05-19 16:36:24 +10:00
parent a401096487
commit 52017e31ea
3 changed files with 0 additions and 72 deletions

View File

@ -1,55 +0,0 @@
uniform sampler2D depth;
layout (local_size_x = 32, local_size_y = 32) in;
layout (std430) buffer Histogram
{
int bin[1024];
int mindepth;
int maxdepth;
int count;
};
vec4 getPosFromUVDepth(vec3 uvDepth, mat4 InverseProjectionMatrix);
shared int sbin[1024];
shared int smindepth;
shared int smaxdepth;
shared int scount;
void main()
{
int x = int(gl_GlobalInvocationID.x), y = int(gl_GlobalInvocationID.y);
vec2 uv = vec2(x, y) / screen;
float z = texture(depth, uv).x;
vec4 xpos = getPosFromUVDepth(vec3(uv, z), InverseProjectionMatrix);
int lineardepth = int(xpos.z * 4);
sbin[gl_LocalInvocationIndex] = 0;
if (gl_LocalInvocationIndex == 0) {
smindepth = 1000;
smaxdepth = 0;
scount = 0;
}
barrier();
if (lineardepth < 1000) {
atomicAdd(sbin[lineardepth], 1);
atomicAdd(scount, 1);
atomicMin(smindepth, lineardepth);
atomicMax(smaxdepth, lineardepth);
}
barrier();
atomicAdd(bin[gl_LocalInvocationIndex], sbin[gl_LocalInvocationIndex]);
if (gl_LocalInvocationIndex == 0) {
atomicAdd(count, scount);
atomicMin(mindepth, smindepth);
atomicMax(maxdepth, smaxdepth);
}
}

View File

@ -470,17 +470,6 @@ namespace FullScreenShader
glShaderStorageBlockBinding(m_program, block_idx, 1);
}
DepthHistogramShader::DepthHistogramShader()
{
loadProgram(OBJECT,
GL_COMPUTE_SHADER, "depthhistogram.comp",
GL_COMPUTE_SHADER, "utils/getPosFromUVDepth.frag");
assignSamplerNames(0, "depth", ST_NEAREST_FILTERED);
GLuint block_idx = glGetProgramResourceIndex(m_program, GL_SHADER_STORAGE_BLOCK, "Histogram");
glShaderStorageBlockBinding(m_program, block_idx, 1);
}
GlowShader::GlowShader()
{
loadProgram(OBJECT,

View File

@ -95,12 +95,6 @@ public:
ShadowMatrixesGenerationShader();
};
class DepthHistogramShader : public TextureShader<DepthHistogramShader, 1>
{
public:
DepthHistogramShader();
};
class GlowShader : public TextureShader<GlowShader, 1>
{
public: