Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

[FIXED] Hue filter issue
Started by Reaver Apr 24 2014 02:59 AM

32 replies to this topic
hue photoshop graphics2.0 filter
[TOPIC CONTROLS]
Page 2 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

playthisstudios

[GLOBAL: userInfoPane.html]
playthisstudios
  • Enthusiast

  • 71 posts
  • Corona SDK

And yea, I didn't use that config.lua call - this is all in straight 2522



[TOPIC: post.html]
#27

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Does the 1st-gen Nexus even support high-precision shaders? Please try this...

 

print( system.getInfo( "gpuSupportsHighPrecisionFragmentShaders" ) )



[TOPIC: post.html]
#28

playthisstudios

[GLOBAL: userInfoPane.html]
playthisstudios
  • Enthusiast

  • 71 posts
  • Corona SDK

That call does return false. So does that mean hue is unsupported? If so, what fix did engineering do so that setting hue to 0 worked?

Thanks

David



[TOPIC: post.html]
#29

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi David,

The hue filter was modified to always use high precision, which should result in the expected output. From my understanding, the only negative impact is that the shader performance will be slower on devices that do not provide hardware accelerated high precision floats, but it's possible that the hue values will not be what you expect on devices that do not support high precision (thus, an issue with OpenGL and that particular GPU).

 

As for setting the angle to 0, what is your intention with that? To restore the image to it's non-filtered (original) state? If so, why not just set the fill.effect to nil instead of 0? That should remove the filter entirely, thus showing the original untouched image.

 

Take care,

Brent



[TOPIC: post.html]
#30

playthisstudios

[GLOBAL: userInfoPane.html]
playthisstudios
  • Enthusiast

  • 71 posts
  • Corona SDK

Thanks Brent, I guess the goal here for us was to get the hue to work on all the devices we have found it doesn't work on. We have a photo layering blending app out ( https://play.google.com/store/apps/details?id=com.playthisstudios.Meld&hl=en ) which is doing well, and getting good reviews. The hue adjustment feature is one we have wanted to add, but it is tricky if it doesn't work on some devices. Customers don't understand or care about the technical restrictions, they will just one star it and move on.

So we were hoping that this thread would result in a solution that would allow hue to work on those devices. As it stands now, we have released a version on android and iOS, testing for the HPSF, and if not available, make the hue option not visible to the user. But as you can imagine, users want it, irrespective of their device (of which some are quite recent and don't work)

So hope that clears up what we are trying to do!

Thanks again, David



[TOPIC: post.html]
#31

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi David,

What do your tests reveal on non-highp devices now, when you set the hue angle to nil and not 0? Does it revert the image to its original state? Do you have one to test on? I am again not in the office at the moment so I can't test this...

 

Brent



[TOPIC: post.html]
#32

playthisstudios

[GLOBAL: userInfoPane.html]
playthisstudios
  • Enthusiast

  • 71 posts
  • Corona SDK

Hi Brent, yes, setting the hue angle to nil on a non-highp device reverts the image to the original state. So I guess that is something. Is there any way to get hue adjustment working on non-highp devices, or am I hoping for too much with this?

Thanks David



[TOPIC: post.html]
#33

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi David,

Beyond checking for highp devices, I'm not sure what more our engineers can do on this filter. The hue filter should work consistently on highp devices now, but for low-end devices without GPUs that support it, I'm not sure there are any guarantees that could be realistically made. I understand that for 99.9% of app users, they don't know (and don't care) about such things as "high precision fragment shaders", and they just want the app to work. However, the Android world is a little like the "wild west" and there are hundreds upon hundreds of devices out there, all with different GPUs and overall processors. I imagine that many low-end or older devices experience these kind of issues, but perhaps moreso with apps that focus on proper color usage and so forth.

 

I suppose one option, if you could gather screenshots from users who are having issues on non-highp devices, is to determine if there is any consistency whatsoever between their hue shifts. For example, if you can confirm that devices A, B, and C (all of them non-highp) shift the hue 20% further toward green, you could perhaps offset your hue filters to reverse-compensate for that only on non-highp devices (just add or subtract from your angle settings). However, if device A is swinging wildly toward green, and device B is swinging wildly toward purple, then it's probably impossible to compensate with any accuracy.

 

Anyway, sorry I can't be of more help, but I think it's something that just can't be overcome on various devices.

 

Brent




[topic_controls]
Page 2 of 2 1 2
 
[/topic_controls]