thingires
This commit is contained in:
@@ -96,7 +96,7 @@ public class HierarchicalOcclusionTraverser {
|
||||
this.nodeCleaner = nodeCleaner;
|
||||
this.nodeManager = nodeManager;
|
||||
this.requestBuffer = new GlBuffer(REQUEST_QUEUE_SIZE*8L+8).zero();
|
||||
this.nodeBuffer = new GlBuffer(nodeManager.maxNodeCount*16L).zero();
|
||||
this.nodeBuffer = new GlBuffer(nodeManager.maxNodeCount*16L).fill(-1);
|
||||
|
||||
|
||||
glSamplerParameteri(this.hizSampler, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
|
||||
|
||||
@@ -129,11 +129,9 @@ public class NodeCleaner {
|
||||
glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT);
|
||||
this.outputBuffer.fill(this.nodeManager.maxNodeCount - 2);//TODO: maybe dont set to zero??
|
||||
|
||||
|
||||
this.sorter.bind();
|
||||
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 3, nodeDataBuffer.id);
|
||||
|
||||
|
||||
//TODO: choose whether this is in nodeSpace or section/geometryId space
|
||||
//
|
||||
glDispatchCompute((this.nodeManager.getCurrentMaxNodeId() + (SORTING_WORKER_SIZE+WORK_PER_THREAD) - 1) / (SORTING_WORKER_SIZE+WORK_PER_THREAD), 1, 1);
|
||||
@@ -147,10 +145,9 @@ public class NodeCleaner {
|
||||
glUniform1ui(0, this.visibilityId);
|
||||
|
||||
glDispatchCompute(1, 1, 1);
|
||||
//glFinish();
|
||||
glMemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT);
|
||||
|
||||
DownloadStream.INSTANCE.download(this.outputBuffer, 4 * OUTPUT_COUNT, 8 * OUTPUT_COUNT, this::onDownload);
|
||||
//glFinish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,11 +180,11 @@ public class PostProcessing {
|
||||
glUniformMatrix4fv(3, false, data);//tooProjection
|
||||
|
||||
|
||||
glActiveTexture(GL_TEXTURE1);
|
||||
GL11C.glBindTexture(GL_TEXTURE_2D, this.depthStencil.id);
|
||||
glTexParameteri (GL_TEXTURE_2D, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT);
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
glBindTexture(GL_TEXTURE_2D, this.didSSAO?this.colourSSAO.id:this.colour.id);
|
||||
glBindTextureUnit(0, this.didSSAO?this.colourSSAO.id:this.colour.id);
|
||||
|
||||
glBindTextureUnit(1, this.depthStencil.id);
|
||||
//glTextureParameteri(this.depthStencil.id, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_DEPTH_COMPONENT);
|
||||
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthMask(true);
|
||||
this.blitTexture.blit();
|
||||
|
||||
Reference in New Issue
Block a user