Comments (7)
Hi! Thanks for letting me know of the bug and sharing your error log! I took a look at it and it seems like all the scene data is loading fine, but the issues are located at the renderManager initialization time. To pinpoint the exact location I've added some more print statements to the loading process and pushed those to the source.
There's three things I've thought of so far that we can do to fix this:
-
Download newBin.zip and replace the contents of the bin folder with the.zip file. This is the compiled version of the small changes I made that add more print statements to the program. If you could re-run and copy the console text in here again that would help me pinpoint further where the issue is.
-
I've also made the bin a debug version with a pdb file so, If you have visual studio (or some other debugger) you should be able to debug the HybridRenderer.exe file and see in which line it's actually getting stuck on.
-
If for whatever whatever reason none of the above works either, we'll have to move on to compiling from source and trying to debug that instead. But hopefully this isn't necessary.
Let me know how it goes!
from hybridrenderingengine.
It gets stuck Loading Shaders. Running it with the visual studio debugger shows
'hybridRenderer.exe' (Win32): Loaded 'D:\Downloads\HRE v0.1 Aachen\bin\hybridRenderer.exe'. Symbols loaded.
...
Exception thrown at 0x00007FFC5DFDA388 in hybridRenderer.exe: Microsoft C++ exception: DeadlyImportError at memory location 0x0000002A60B0E198.
The thread 0x374c has exited with code 0 (0x0).
The thread 0x213c has exited with code 0 (0x0).
The thread 0x1bc4 has exited with code 0 (0x0).
Vendor: NVIDIA Corporation
Renderer: GeForce GTX 1080 Ti/PCIe/SSE2
Version: 4.6.0 NVIDIA 416.94
Beginning Scene load, checking scene description file:
../assets/scenes/Sponza.json is a valid file
Loading camera...
Loading models...
../assets/models/Sponza/Sponza.gltf is a valid file
Loading skybox...
Loading lights...
Loading directional light...
Loading point light...
Generating environment maps...
Reticulating splines...
Loading Complete!...
Initializing Renderer.
Loading FBO's...
Loading Shaders...
Cloned and ran the repo in vs, "Exception thrown at 0x00007FFC5DFDA388 in hybridRenderer.exe: Microsoft C++ exception: DeadlyImportError at memory location 0x0000008B18B7DDF8." seems to happen in model.cpp line 18 "const aiScene *scene = importer.ReadFile(path, aiProcess_Triangulate | aiProcess_OptimizeMeshes |aiProcess_CalcTangentSpace | aiProcess_FlipUVs);" when loading Sponza, but doesn't cause the program to hang.
Stepping through the shaders it gets to clusterCullLightShader.comp in shader.cpp line 191 "glGetProgramiv(ID, GL_LINK_STATUS, &success);" and then it starts to hang. This is also where the "The thread 0x... has exited with code 0 (0x0). starts, as well as the cpu usage spikes from 9% to 17% and memory usage doubles from ~600MB to 1.2GB in debug build.
from hybridrenderingengine.
Yeah, the first exception is a normal part of Assimp since it uses throw/catch loops to load GLTF 2.0 files.
Regarding the second part, I'm not sure yet what might be causing the GL_LINK_STATUS call to be acting up like that. I'll ask around to see if I can find a way to borrow a 1080ti for testing. In the meantime, there are two things you could do to help me pinpoint the issue some more:
-
Somewhere in the rendermanager startup code (before shader loading) can you stick a HRE::printComputeSizes(); call and paste here the results? Although I don't think this will be the issue, I want to rule out any possible compute shader layout incompatibilities by taking a look at your cards max work-group sizes.
-
Since you already have vs debugging setup, could you take a screenshot of your locals tab? Mine looks like this:
What I'm looking for here is to see if the cShaderCode and the computeCode variables actually loaded correctly.
from hybridrenderingengine.
HREUtils::printComputeSizes(); output:
max global (total) work group size x:2147483647 y:65535 z:65535
max local (in one shader) work group sizes x:1536 y:1024 z:64
from hybridrenderingengine.
This is a driver bug.
NVIDIA is looking into it.
from hybridrenderingengine.
@SirKnightTG If that's the case I'll close the issue for now.
from hybridrenderingengine.
i know this issue is marked closed, but i ran into it and put some time into finding a workaround anyway.
this is the source of the lockup: https://github.com/Angelo1211/HybridRenderingEngine/blob/master/assets/shaders/ComputeShaders/clusterCullLightShader.comp#L115-L120
changing to this worked for me, since it seems nvidia's glsl compiler doesn't like indexing into vecs dynamically with array syntax.
float checkAxis(float tmin, float tmax, float v) {
if (v < tmin) {
return (tmin - v) * (tmin - v);
}
if (v > tmax) {
return (v - tmax) * (v - tmax);
}
return 0.0;
}
float sqDistPointAABB(vec3 point, uint tile){
float sqDist = 0.0;
VolumeTileAABB currentCell = cluster[tile];
cluster[tile].maxPoint[3] = tile;
sqDist += checkAxis(currentCell.minPoint.x, currentCell.maxPoint.x, point.x);
sqDist += checkAxis(currentCell.minPoint.y, currentCell.maxPoint.y, point.y);
sqDist += checkAxis(currentCell.minPoint.z, currentCell.maxPoint.z, point.z);
return sqDist;
}
...then, with that sorted out, https://github.com/Angelo1211/HybridRenderingEngine/blob/master/assets/shaders/PBRClusteredShader.frag#L213 needs to be changed to FragColor = vec4(colors[uint(mod(zTile, 8))], 1.0);
to compile.
the shadows don't seem to be working, but at least it renders without crashes now 👍
from hybridrenderingengine.
Related Issues (20)
- Build test scenario for many light system. HOT 1
- Cluster shading optimization via BVH construction. HOT 1
- View frustum culling HOT 1
- Reverse Z-Buffer HOT 1
- Advanced environment mapping (generation & doom-like assignment) HOT 1
- Evaluate how hard it would be to port to linux. HOT 2
- Add AZDO OpenGL calls HOT 1
- Write blog post analyzing engine performance. HOT 1
- CMake Error: The following variables are used in this project, but they are set to NOTFOUND. HOT 1
- Is BVH actually implemented or on todo list? HOT 1
- Could not run the release HOT 20
- cmake failed HOT 1
- clustered-forward-vs-deferred-shading link changed
- Build failed. Error C2593 on scene.cpp
- Hi, very nice work!!! Can u help me this bug? HOT 1
- Non-HDR cubemap textures have defects
- Occasionally on load, the entire scene is just red or black HOT 1
- With non-16:9 screen aspect ratios, the lights are no longer properly rendering HOT 1
- More json
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hybridrenderingengine.