Color Correction Lut android problem

Hi,
My problem is really simple,on android mode all image effects works fine but the color correction look up texture.
After adding it to my camera the screen goes black in the editor.
I didn’t try the compiled version on a real mobile but it’s not working in the editor.
In the Hardware support for this image effect you can see “Mobile: OpenGL ES 2.0” so it should work without any problem.
http://docs.unity3d.com/Documentation/Components/script-ColorCorrectionLut.html

I searched for it but found nothing :frowning:

My system specs:
CPU:I7-2600K
VGA:GTX 580
Ram:16GB DDR3
Win 7 64-Bit Ultimate
*Note that It is working very nice on PC mode.

Anyone else seen this problem???

Same Problem on ios ~ pop

Ditto here with iOS as build target.

this is an error in docs. If you read the article linked at full you will notice that it generated 3d texture and then use it to do magic. Alas, 3d textures are not really supported on mobiles

Alexey I can only see it as supporting “Mobile: OpenGL ES 2.0” at the bottom. Was there something else I missed?

Has anyone figured it out? I’m seeing same problem on iOS target.

As Alexay said it doesn’t work on mobiles. The reason is that it is based on 3D textures.

I rewrote it work with 2D lookup texture instead - you can download the attached package. Import it on top of Image Effects package.

1319943–62598–$ColorCorrectionLut2D.unitypackage (10.9 KB)

1 Like

@Paulius Liekis : your script works perfectly on Android! thanks!

But still a little bit of memory consume, I am trying to enable/disable it in run-time.

I catch the component(), tried to add an enable condition into the OnRenderImage() as below, but the screen switch to grey if I switch on enable = false;

function OnRenderImage (source : RenderTexture, destination : RenderTexture) 
{
	if(enable)
	{
	 // etc....
	}		
}

Any idea how I could make it disable?

Thanks so far for your cool script.

Hi Paul,
Are you able to share this shader resource for allowing the reading of 3Dluts by using a 2D texture instead of a 3D texture.
Im programming for a mobile device that doesnt support 3d textures.
Thanks,

@sama.van: I guess you could simply Graphics.Blit (source, destination); to OnRenderImage when script is disable, but that doesn’t sound efficient enough. I guess you should be able to rewrite it so it doesn’t reallocate recources on enabling/disabling.

@ahauser: yes, the script uses 2D textures instead of 3D.

Hi,
When I want to use the Lut2D shader again in a new project based on Unity 4.3 I see too much artifacts.
Is that really because of the new version of Unity or I made a mistake?
Thanks.

Thank you for the script, Paul!

It doesn’t work in Unity 5 though, I guess because Image Effects are now written in C# instead of UnityScript.
So I rewrote the script to C#. The effect cuts my mobile framerate in half, so use with caution :wink:

2154909–142306–ColorCorrectionLut2DCSharp.unitypackage (3.9 KB)

1 Like