-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brave Story a black triangle #8251
Comments
I tried disabling each test in a row, and it didn't help. Basically these are supposed to be the tops of the walls. It's drawing a near-black color. My suspicion is that it's meant to be clipped, but isn't being. It's drawing 843 vertices with varying points, so it's hard to determine the exact problem points. Even with all tests disabled, it doesn't actually draw everywhere the points highlight (per the vertex preview.) Assuming this isn't a bug in the vertex preview, I assume it's culling or clipping or something. Hmm. -[Unknown] |
I'm marking this as depth related, I think it is. Viewport: 32750.0 +- 32750.0 => [0, 65500] If I expand the projected z by 1.1f, the triangle shrinks. 1.2f is enough to make it go away entirely. I'm not sure... maybe this means it isn't depth related exactly, and is some other kind of clipping issue? It does have culling enabled. The area in question has depth values around ~21000 prior to the artifact. After the draw, the artifact's area has depth values around ~64851. I guess it could even be a CPU rounding issue in generating these coordinates... the very corner of the artifact has a depth of 65498, just barely below clipping.... but near the top right it's as low as 60971. -[Unknown] |
So, putting this in the vertex shader, which is just a quick hack, makes the triangle go away: WRITE(p, "vec2 test123 = gl_Position.xy / gl_Position.w;");
WRITE(p, "if (test123.x < -4.0 || test123.x > 4.0 || test123.y < -4.0 || test123.y > 4.0) { gl_Position.xyz = vec3(1000000.0 * -1000000.0 * gl_Position.w); }"); I think there's a good chance this issue is that vertices outside the 4096x4096 drawing space are supposed to be completely culled. -[Unknown] |
Also happen in 0.9.9.1-54-gdfbb0bd and 0.9.6

Ge debugger

other tabs
https://gist.github.com/daniel229/9e19640f86e74a082b46
Savestate
http://1drv.ms/1TtExKp
The text was updated successfully, but these errors were encountered: