-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Partial fix for Issue #2087 (NegativeScaleTest) #2091
Conversation
Did you test these changes on the "NegativeScaleTest" model? |
Oops, no, I didn't. Tested it out just now, and yes, the changes fixed the test model so there are no Xs anymore. I think it may have also fixed the shading on the spheres, but I couldn't tell for certain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Hey @codex128 ! Thanks for your contribution to JMonkeyEngine. |
According to git bisect this broke our rendering as soon as shadows are enabled. |
My first guess would be that |
Yeah from my debugging might be ForcedRenderState related. |
I've opened #2130 which should fix this issue. |
I just found a problem locally. This modification seems to have caused an exception with ShadowFilter (running TestDirectionalLightShadow.java results in a black screen). I found this issue at commitID=5975b3f791d18fae311a10e209b3ed40b5e5c60f. |
|
@JohnLKkk Thank you for reporting the issue! Two things:
public static int main(String... args) {
return 0;
}
|
I believe this problem was fixed in #2130. |
Thank you for your guidance. |
This PR partially fixes #2087 by "flipping" the face cull mode as the render state is applied to the renderer if the geometry world scale is found to be negative. This does not alter the normal vectors, so shaders still receive backwards normals and models still may not appear quite right (especially with normal maps), but this fixes the face culling issue, at least.