Skip to content
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

something wrong with lighting #4886

Closed
mailwl opened this issue Dec 20, 2013 · 24 comments
Closed

something wrong with lighting #4886

mailwl opened this issue Dec 20, 2013 · 24 comments

Comments

@mailwl
Copy link

mailwl commented Dec 20, 2013

i saw it on game Brave Story: New Traveller.
sorry for bad quality of photo, i can not make it better now
test

@raven02
Copy link
Contributor

raven02 commented Dec 20, 2013

I think it is Android issue ?Windows platform looks nice

screen00105

@mailwl
Copy link
Author

mailwl commented Dec 20, 2013

Ah, sorry, forgot to mention! Yes, it's Android, Sony Xperia Z1.
it's funny. sony phone emulates sony console

@thedax
Copy link
Collaborator

thedax commented Dec 20, 2013

If you can, try to get actual screenshots from the devices, not just a picture of their physical screens.

@mailwl
Copy link
Author

mailwl commented Dec 20, 2013

i do not remember how to make screenshot from psp right now, so i can provide only first screen (as far i remember, screenshot from psp needs some plugins to work, i will post it later)
screenshot_2013-12-21-00-48-40

@thedax
Copy link
Collaborator

thedax commented Dec 20, 2013

Yeah, you would need a screenshot plugin on the PSP.

Also, is this with buffered rendering on or off? It can affect lighting and other effects if it's off.

@mailwl
Copy link
Author

mailwl commented Dec 21, 2013

i see the same picture on iPad, i think the problem is in opengl ES.
i tryed to change almost every settings

@mailwl
Copy link
Author

mailwl commented Dec 21, 2013

screenshot from psp
pic_0004

@solarmystic
Copy link
Contributor

@mailwl

Did you disable buffered rendering? Non buffered rendering mode will cause the "glow" to disappear for me.

Non buffered rendering (glow is missing)
screen00264

Buffered rendering (glow is present)
screen00265

Tested using 0.9.6-160 on Windows x64.

@mailwl
Copy link
Author

mailwl commented Dec 21, 2013

i did...both modes doen not affect on picture
screenshot_2013-12-21-12-19-42
screenshot_2013-12-21-12-19-27

@hrydgard
Copy link
Owner

Could simply be that we can't use dual source alpha on mobile (OpenGL ES). This got fixed on PC when I introduced that, right?

I have a workaround planned for GL ES but I won't be able to work very much on PPSSPP until the new year.

@mailwl
Copy link
Author

mailwl commented Dec 21, 2013

hrydgard, thanks you very much!

by the way, android 4.3+ has support for OpenGL ES 3.0, will you plan something for this new version (sorry, i don't even know the differences between 2 and 3 version yet)

@hrydgard
Copy link
Owner

ES 3 unfortunately lacks this particular feature. But it's still possible to do with multipass rendering at some performance cost.

It may help in other ways though but I haven't investigated very much yet.

@raven02
Copy link
Contributor

raven02 commented Dec 21, 2013

I just checked on my Xperia Z1 with 4.3 , ES 3.0 , looks like no extension - GL_ARB_blend_func_extended

@raven02
Copy link
Contributor

raven02 commented Apr 24, 2014

I just tested it out on my Adreno 320 device with Andorid 4.3, the dual source blending seems to be working

brave

@hrydgard
Copy link
Owner

Does it expose the extension ARB_blend_func_extended? If not, it was something else that was the cause here.

@raven02
Copy link
Contributor

raven02 commented Apr 24, 2014

That's why i'm curious as i cannot see GL_ARB_blend_func_extended on my device..... or may be Open ES 3.0 support it natively?

@raven02
Copy link
Contributor

raven02 commented Apr 24, 2014

Probably it is stencil to alpha ? i will goto test it out .

@solarmystic
Copy link
Contributor

Actually, I think something else could be the cause.

I just made a build that disabled Dual Source Alpha (DSA) in all instances (I use it at times, the speed up is still substantial in certain games that do not need DSA for correct functionality, like Dead or Alive Paradise) and that scene still looks normal on my system:-

capture

@raven02
Copy link
Contributor

raven02 commented Apr 28, 2014

Alright. I tried to disable alpha doubling , the shinning above gone now.

ulus10279_00001

@raven02
Copy link
Contributor

raven02 commented Apr 28, 2014

However , alpha doubling should be supposed to work without any extra use of extensions...........hummm

@unknownbrackets
Copy link
Collaborator

@mailwl are you still able to reproduce this in the latest git build with default settings (might try resetting them)?

-[Unknown]

@unknownbrackets
Copy link
Collaborator

By the way, from the screenshot above, I wonder if the PSP has a higher / cooler white point than 6500k. I guess that'd be a good job for a post shader if so.

-[Unknown]

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jun 23, 2014

@unknownbrackets color seems to differ alot between models, as for example here PSP-3000 had colors pretty much like we have on ppsspp(or something close). I just compared the screenshots above psp vs ppsspp(the correct one with effect) and made a simple shader based on the rgb difference at dialog window.

fsh:

#ifdef GL_ES
precision mediump float;
precision mediump int;
#endif

uniform sampler2D sampler0;
varying vec2 v_texcoord0;

void main() {
vec3 color = texture2D(sampler0, v_texcoord0.xy).rgb;
color.r = color.r * 0.9593;
color.g = color.g * 1.0739;
color.b = color.b * 1.4604;
gl_FragColor.rgb=color;
gl_FragColor.a = 1.0;
}

For vsh you can just reuse fxaa.

Seems close enough:
ulus10279_00000

@mailwl
Copy link
Author

mailwl commented Jun 24, 2014

@unknownbrackets
Sorry, didn't notice the question.
It works fine even on PlayMarket's 0.9.8 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants