-
Notifications
You must be signed in to change notification settings - Fork 2.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
Sora no kiseki SC / HD light problem #8403
Comments
GE debugger ,don't know if this one,next prim still not draw the boxes. HD version Non-HD |
I think that's the right place. If you go there, and then double click one of the lights (like light 3), does it look any closer to the PSP? I wonder if this could be influenced at all by the normals. Maybe it's just a precision thing. -[Unknown] |
Yes,double click lights3,it looks closer to the PSP. |
Here's a dump (just hurried to the same place, since it's early): NPUH10191_#8403_trails_lighting.zip Should look like this per a PSP (as noted above, just showing this dump's frame): Though, of course, it looks much better the way PPSSPP displays it. I'd ideally prefer it looked like the HD version. Draw uses texture 0x04100000, and point light as above. It also uses color doubling. To make software renderer use the PSP behavior (correct?) I can make this change: - if (gstate.isUsingSpecularLight(light)) {
+ if (gstate.isUsingSpecularLight(light) && diffuse_factor > 0.f) { That is, ignore specular if diffuse factor was <= 0. To make the Vulkan/backend renderer use the HD/software behavior (better looking - I think the PC version looks this way too): WRITE(p, " dot%i = dot(normalize(toLight + vec3(0.0, 0.0, 1.0)), worldnormal);\n", i);
+ WRITE(p, " if (dot%i <= 0.0 && light.matspecular.a == 0.0) {\n", i);
+ WRITE(p, " dot%i = 1.0;\n", i, i);
+ WRITE(p, " } else {\n");
+ WRITE(p, " dot%i = pow(dot%i, light.matspecular.a);\n", i, i);
+ WRITE(p, " }\n");
+ WRITE(p, " if (dot%i > 0.0)\n", i);
+ WRITE(p, " lightSum1 += light.specular[%i] * %s * (dot%i %s);\n", i, specularStr, i, timesLightScale);
- WRITE(p, " lightSum1 += light.specular[%i] * %s * (pow(dot%i, light.matspecular.a) %s);\n", i, specularStr, i, timesLightScale); Note the logic - similar to #2424. Importantly, this includes Anyway, I wonder if this difference affects lighting in other cases, such as other lighting bugs we're aware of... -[Unknown] |
I think if we do this, the |
This is correct per hardware tests, see hrydgard#8403. Note that the PS3 emulator running PSP HD remasters does not correctly handle this, and applies specular for negative diffuse factor.
HD version capture from https://youtu.be/n94plorFBXE?t=14m40s
PPSSPP OpenGL just black behind the box
PPSSPP software redering looks fine.
Non-HD version
PSP Looks darker
PPSSPP OpenGL less darkness
software rendering looks like the HD version
The text was updated successfully, but these errors were encountered: