nvpro-samples / gl_occlusion_culling Goto Github PK
View Code? Open in Web Editor NEWOpenGL sample for shader-based occlusion culling
License: Apache License 2.0
OpenGL sample for shader-based occlusion culling
License: Apache License 2.0
In the scene vertex shader the matrices are accessed by the index and the byte offset.
texelFetch(tex,idx*4 + 0)
but in the raster shader, the matrices are indexed with additional offsets. As far as I can tell the matrix buffer is constructed the same. What does the following mean in the raster vert shader?
#ifndef MATRIX_WORLD
#define MATRIX_WORLD 0
#endif
#ifndef MATRIX_WORLD_IT
#define MATRIX_WORLD_IT 1
#endif
#ifndef MATRICES
#define MATRICES 2
#endif
And the index is constructed int matindex = (matrixIndex * MATRICES + MATRIX_WORLD_IT) * 4;
I don't understand how this works when it looks like the same matrix buffer is used for both shaders?
I appreciate any insights.
Cheers
Simon
As we know, The geometry shader is not that fast as a computer shader. I have an idea, if we calculate the three edges every instance in computer shader, then it can gain more performance. I plan to implement this by Vulkan. So could this algorithm be used in that way?
Another question is that what's the difference between these 3 sides to just drawing bounding box sides for early fragment test.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.