Search Unity

► Texture Adjustments ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, May 20, 2015.

  1. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Thanks, going to buy now and see how it goes!

    Edit: @Arkhivrag

    Is there any possible way to maintain the alpha channel after it's been passed through the Hue Adapter.

    For example here I have some zebra stripes, and then the zebra stripes again after being passed through the Hue Adapter. If you look closely at the pink one you can see where the stripes are supposed to be but everything is filled on this instead of there being any transparency.

     

    Attached Files:

    Last edited: Nov 27, 2016
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Hue adapter does not effect Alpha channel.

    [Edit]
    Check image save format, JPG does not have Alpha channel. Use PNG or TGA formats.
    texture-adjustmetns.png



    VacuumShaders - Facebook Twitter YouTube
     
  3. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Is there any way I can reach you and potentially pay for some consultation with this? I can't get Adjust_ColorOverlay to work properly
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    I do not take pay work, but will help for free within asset support using current forum or E-mail: vacuumshaders@gmail.com
    What is the problem with Adjust_ColorOverlay?



    VacuumShaders - Facebook Twitter YouTube
     
  5. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Thank you, I'll try not to waste your time or spam this thread with all my problems getting color overlay to work. I'll spend this evening working out the best way to present the issues and will e-mail you, will update the forum after with how we over come the problems :) Thanks again
     
  6. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Ok so in my specific use case I needed to blend textures on top of each other whilst keeping the alpha channel of the top layer intact, for example applying zebra stripes with a Blend Mode to a horse texture. In case someone ever finds this and tries to do the same thing, this was achievable with the Adjust_ChannelImport class which made things very easy.

    Hopefully the last issue from me now, it works great on Android, however building for WebGL, everything it outputs is just pink and on loading I see an errorr:

    Code (CSharp):
    1. WARNING: Shader   09d1ba6a-8bf0-4238-beac-eba6acf1f1ab:1
    2. Unsupported: 'Hidden/VacuumShaders/Texture Adjustments/Channel Import' - Pass '' has no vertex shader
    3.   09d1ba6a-8bf0-4238-beac-eba6acf1f1ab:1
    4. WARNING: Shader   09d1ba6a-8bf0-4238-beac-eba6acf1f1ab:1
    5. Unsupported: 'Hidden/VacuumShaders/Texture Adjustments/Channel Import' - Setting to default shader.
    On testing, it does only appear to be the Channel Import shader that doesn't work, is there a way this can be fixed? Have attached a screenshot of my "Always Included Shaders" to show that the shader is included in the build.
     

    Attached Files:

  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    It's Unity shader compiler bug (may be on your device, hardware or need driver update).
    From my side I even can not reconstruct issue to find the solution.



    VacuumShaders - Facebook Twitter YouTube
     
  8. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Built on Unity 5.5.0f2 on Windows 10 with a 1080GTX (latest drivers) and again on Macbook Pro with latest drivers installed so the hardware it's being running on is pretty varied. Perhaps an issue with Unity 5.5 in general with it, I'll try downloading the latest stable 5.4 version and try again
     

    Attached Files:

  9. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Ok so all I've done here is taken the example scene 1 from Texture Adjustments, added:

    public Adjust_ChannelImport import = new Adjust_ChannelImport();
    public Adjust_ColorOverlay overlay = new Adjust_ColorOverlay();

    To the top and:

    TextureAdjustments.RenderAll(originalTexture, ref adjustedTexture, hue, blur, contrast,overlay,import);

    to Update()

    then added the shaders to always included shaders in the graphics setting, then set export to WebGL and uploaded it. Only Channel Import and Mask don't work on WebGL. This is the same on Firefox and Chrome, on Unity 5.5 and 5.4 and on a $1000 graphics card and with no dedicated graphics card.


    Link to minimal project: http://www.blueomega.net/MinWebGL/


    Specifically:

    Code (CSharp):
    1.  
    2.         return lerp(finalColor, half4(srcColor[_Red], srcColor[_Green], srcColor[_Blue], srcColor[_Alpha]), _ChannelsEnabled);
    Can't be done on WebGL as _Red, _Green, _Blue, _Alpha need to be constants in WebGL. Same issue in Adjustments_Mask

    Code (CSharp):
    1. half mask = t[(int)_Channels];
     

    Attached Files:

    Last edited: Nov 30, 2016
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Confirm, problem with WebGL.
    Strange that in editor Unity compiles shader for all platforms without error, but in build it doesn't work.
    Also, at my side build doesn't throw any errors about shader problem.

    It still Unity shader compiler bug.
    Working on fix.



    VacuumShaders - Facebook Twitter YouTube
     
  11. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Cheers, I have a pretty nasty hacky work around but it works well enough for me so don't need to rush a fix on my account
     
  12. Knertified

    Knertified

    Joined:
    Jul 3, 2012
    Posts:
    31
    Hello, Just chiming in here. New Texture Adjustments customer. I am running into this same error on iOS when using the Color Overlay shader. I've tried disabling Metal and it made no difference. It appears the iOS platform expects a vertex shader.

    Unity 5.4.2f2 - Xcode 8
    WARNING: Shader Unsupported: 'Hidden/VacuumShaders/Texture Adjustments/Color Overaly' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/VacuumShaders/Texture Adjustments/Color Overaly' - Setting to default shader.
     
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Hi,

    Select ColorOverlay shader inside editor and click on button Compile and show code. If there are some problems with shader Unity will print detail info inside Console window.
    Untitled.png

    If it happens only in Build (I think it is so), then it's Unity compiler bug and I can not help, unless you find out why it happens.
    I need more info to help you.



    VacuumShaders - Facebook Twitter YouTube
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    v2.22 submitted (will alive in several hours). Fixed ChannelImport and Mask shader incompatibility with WebGL.



    VacuumShaders - Facebook Twitter YouTube
     
    andrew210 likes this.
  15. Knertified

    Knertified

    Joined:
    Jul 3, 2012
    Posts:
    31

    Hi, Thanks for the quick reply.

    I don't see any errors being presented by Unity but Unity doesn't seem to be compiling anything for iOS.

    Code (CSharp):
    1. // Compiled shader for iPhone, iPod Touch and iPad, uncompressed size: 0.3KB
    2.  
    3. // Skipping shader variants that would not be included into build of current scene.
    4.  
    5. Shader "Hidden/VacuumShaders/Texture Adjustments/Color Overaly" {
    6. Properties {
    7. _MainTex ("Screen Blended", 2D) = "" { }
    8. }
    9. SubShader {
    10. Pass {
    11.   ZTest Always
    12.   ZWrite Off
    13.   Cull Off
    14.   GpuProgramID 30816
    15. Program "vp" {
    16. }
    17. Program "fp" {
    18. }
    19. }
    20. }
    21. Fallback Off
    22. }
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Untitled.png

    Make sure shader is compiled for All platforms and Skip unused shader_features is not checked.



    VacuumShaders - Facebook Twitter YouTube
     
  17. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Got the update and it now works perfectly, thanks for the quick turnaround on that Arkhivrag
     
  18. Knertified

    Knertified

    Joined:
    Jul 3, 2012
    Posts:
    31

    Hi, I was able to see shader code after following your instructions. I do not see any errors from Unity. After that, I chose "Custom" and picked OpenGLES20, OpenGLES30, and Metal only. There is no code generated for these platforms. It appears this particular shader "Color Overaly" is not compatible with mobile at this time. I understand that Unity is not compiling this shader properly but their might be workarounds. Not sure. Thanks!
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Hi,
    At my side shaders are compiled for all platforms. Means it's not shaders problem but Unity ShaderCompiler that does not work correctly on your machine (bug?, mostly).

    I've compiled ColorOverlay shaders for you (check attached files), try replacing them with original shader from package.



    VacuumShaders - Facebook Twitter YouTube
     

    Attached Files:

  20. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    After a couple of weeks playing with it just wanted to give some more feedback,

    It really is a really very powerful plugin, works very nicely. Unlike the old actionscript code the blend modes work as they do in Photoshop. I don't know if you're considering developing the plugin more, but one feature that would be very useful would be an Adjust_Exposure module to work in the same way Photoshop does. Here's quite a long boring video of me using it


    (I just made this to get the games players off my back as to why it was taking so long to convert 700 horses from my old game to the new game)
     
  21. rtalerico

    rtalerico

    Joined:
    Oct 27, 2016
    Posts:
    10
    What is the reasoning behind removing the ability to disable mip maps for a resized texture? Will this be reintroduced in the future, or is out completely out of the picture?
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    v2.24 includes mipmap option for ResizePro run-time API.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jan 2, 2017
  23. zsolt67

    zsolt67

    Joined:
    Jun 21, 2016
    Posts:
    19
    Hi
    Is there any chance to extend the functions with skew or full distortion. Or is there any posibility to do something lik these at the moment?
     
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Skew/distortion modifier is not included, no way to achieve it. Will add it to a wishlist.



    VacuumShaders - Facebook Twitter YouTube
     
  25. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Can anyone think of any reason why we might be getting inconsistent results from Texture Adjuster?

    On the left is how it looks on my computer, and to the right is on another users computer. They report that everytime they return to look at the horse (and the horse is redrawn by texture adjuster) they see something entirely different.

    I'm pretty confused as to what could cause this behaviour, I've added a lot of debugging info and can see that when it does fail, all the steps have been run through to create the horse and it's not crashed anywhere.

     
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Texture Adjustments are calculated using shaders and their results are same on all platforms, if only source texture is the same.
    Left image seems to be captured on Desktop, may be using Linear color space and the right one is from mobile? That does not support Linear color space and Unity converts them to Gamma color space.
    Depend on color space source texture using in Texture Adjustments may be different.
    That's the only assumption I can make from provided image.



    VacuumShaders - Facebook Twitter YouTube
     
  27. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Thank you for the reply, they're both captured on desktop (via Facebook Gameroom), have not been able to find a pattern yet on users computers for why this could be happening but will keep on investigating
     
  28. KeithT

    KeithT

    Joined:
    Nov 23, 2011
    Posts:
    83
    Just bought this and the VacuumShaders.TextureExtensions dll is not in the package currently on the asset store, so the resize pro stuff does not seem to be available. How do I get this?

    Thanks in advance for any assistance.
     
    Last edited: Feb 14, 2017
  29. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Back to the debugging things displaying differently on different displays. I went and bought the exact laptop that a user was having issues with, turned it on for the first time, no issues. However then I updated it's drivers to the most up-to-date versions of their drivers (it's an Intel HD Graphics 5500 chip) and now can recreate the issues the users are having. Import alpha channels no longer works. It seems like a crazy bug but can I now assume it's a bug in the graphics drivers and go and bitch at Intel?

    (https://communities.intel.com/message/453619#453619 link to my post to the good people of Intel trying to figure out whats going on with them)
     
    Last edited: Feb 14, 2017
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    It's inside package. What Unity version do you use?



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Feb 21, 2017
  31. skrishna

    skrishna

    Joined:
    Sep 18, 2014
    Posts:
    17
    Hi. I currently have a problem where I am trying to turn a Texture2D (not in the scene but created dynamically through native code) to grayscale then into a byte array on Update but the processing time is too large and slowing down my app.

    This is the code I have for that where I am sending Texture2D.GetPixels() and returning the grayscale value of each pixel in one byte of the array.
    Code (CSharp):
    1. private byte[] ConvertToBytes(Color[] data)
    2. {
    3.     byte[] byteStream = new byte[data.Length];
    4.  
    5.     for (int i = 0; i < data.Length; i++)
    6.     {
    7.         byteStream [i] = System.Convert.ToByte (data [i].grayscale * 255);
    8.     }
    9.  
    10.     return byteStream;
    11. }
    Would something like this be made faster and made possible at runtime only in code with Texture Adjustments?
     
    Last edited: Mar 7, 2017
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Texture adjustments can generate grayscale texture very fast, but it will be texture (again) and not byte array.
    If you need fast color to byte converter you have to optimize your own script.



    VacuumShaders - Facebook Twitter YouTube
     
  33. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    Hello Arkhivrag,
    I'm a new user and I'm trying to understand how your API is working (the API.pdf is very short)

    I would like to flip/rotate/resize programmatically an existing Texture2D named "myPhoto" and then delete the old one.
    For now nothing work haha but here is the spirit :
    Code (CSharp):
    1.  
    2. Texture2D flipped = new Texture2D(myPhoto.width, myPhoto.height, TextureFormat.RGB24, false);
    3.  
    4. Adjust_Flip photoFlip = new Adjust_Flip();
    5. Adjust_Rotate photoRotate = new Adjust_Rotate();
    6. Adjust_Resize photoResize = new Adjust_Resize();
    7.  
    8. TextureAdjustments.RenderAll(myPhoto, ref flipped, photoResize, photoFlip, photoRotate);
    9.  
    10. File.WriteAllBytes (myPath, flipped.EncodeToJPG(100));
    11.  
    12. DestroyImmediate(myPhoto);
    Also, I don't understand how to pass parameters to rotate or resize ?

    Could you provide a working exemple ?
    Thank you very much,

    Seb
     
    Last edited: Mar 30, 2017
  34. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    First of all suggest make variables public autside the function:
    Code (CSharp):
    1.  
    2. using UnityEngine;
    3.  
    4. using VacuumShaders.TextureAdjustments;
    5.  
    6. public class NewBehaviourScript : MonoBehaviour
    7. {
    8.  
    9.     public Adjust_Flip photoFlip = new Adjust_Flip();
    10.     public Adjust_Rotate photoRotate = new Adjust_Rotate();
    11.     public Adjust_Resize photoResize = new Adjust_Resize();
    12.  
    13.  
    14.     // Use this for initialization
    15.     void Start ()
    16.     {
    17.  
    18.     }
    19. }
    This will give you inside inspector exactly same controllers as the Texture Adjustments editor window has:
    te.png


    Class member names are exactly same as inside inspector window.

    Adjust_Resize variables:
    Code (CSharp):
    1. public enum RESIZE_TYPE {Pixel, Percent}
    2.  
    3. public RESIZE_TYPE resizeType;
    4. public int width;
    5. public int height;
    6. public bool lockAspectRatio;
    7. public float percent;

    Adjust_Rotate variables:
    Code (CSharp):
    1. public enum ANGLE {_0, _180, _90_CW, _90_CCW}
    2.  
    3. public ANGLE angle;

    Adjust_Flip variables:
    Code (CSharp):
    1. public bool horizontal;
    2. public bool vertical;
    3.  
    4. public IncludeChannel includeChannel;
    5. public bool isEnabled;
    6. public Mask mask;

    IncludeChannel variables:
    Code (CSharp):
    1. public bool alpha;
    2. public bool blue;
    3. public bool green;
    4. public bool red;

    Mask variables:
    Code (CSharp):
    1. public enum MASK_CHANNEL {Red, Green, Blue, Alpha}
    2.  
    3. public MASK_CHANNEL channel;
    4. public bool invert;
    5. public bool isEnabled;
    6. public float strength;
    7. public Texture texture;
    8. public Vector2 textureOffset;
    9. public Vector2 textureTiling;
    10. public TextureWrapMode textureWrapMode;

    Simple example:
    Code (CSharp):
    1. Adjust_Flip photoFlip = new Adjust_Flip();
    2. Adjust_Rotate photoRotate = new Adjust_Rotate();
    3. Adjust_Resize photoResize = new Adjust_Resize();
    4.  
    5.  
    6. //Do flip only horizontally
    7. photoFlip.horizontal = true;
    8.  
    9. //Rotate 90 CCW
    10. photoRotate.angle = Adjust_Rotate.ANGLE._90_CCW;
    11.  
    12. //Resize 50%
    13. photoResize.resizeType = Adjust_Resize.RESIZE_TYPE.Percent;
    14. photoResize.percent = 50;
    15.  
    16.         //Or do resize by width and height
    17.         //photoResize.resizeType = Adjust_Resize.RESIZE_TYPE.Pixel;
    18.         //photoResize.width = 512;
    19.         //photoResize.height = 256;
    20.  
    21.         //Or do simetric resize by width
    22.         //photoResize.resizeType = Adjust_Resize.RESIZE_TYPE.Pixel;
    23.         //photoResize.width = 512;
    24.         //photoResize.lockAspectRatio = true;
    25.  
    26.  
    27.  
    28. //Use all adjustments
    29. TextureAdjustments.RenderAll(myPhoto, ref flipped, photoResize, photoFlip, photoRotate);


    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Mar 31, 2017
  35. rattle-snake23

    rattle-snake23

    Joined:
    Jul 12, 2016
    Posts:
    5
    Thank you so much Arkhivrag, i understand it really better right now.
    So with your exemple i tried to do the following but the file saved with WriteAllBytes() is black.
    Where is my mistake ?
    Also is it okay to destroy the flipped texture after WriteAllBytes() ?

    Code (CSharp):
    1. // Original photo is called "photo"
    2. public class NewBehaviourScript : MonoBehaviour
    3. {
    4.     public Adjust_Flip photoFlip = new Adjust_Flip();
    5.     public Adjust_Rotate photoRotate = new Adjust_Rotate();
    6.     // Use this for initialization
    7.     void Start ()
    8.     {
    9.         //Texture2D flipped = new Texture2D(photo.width, photo.height, TextureFormat.RGB24, false);
    10.         Texture2D flipped = new Texture2D(photo.width,photo.height);
    11.  
    12.         photoFlip.horizontal = true;
    13.         photoFlip.vertical = true;
    14.  
    15.         photoRotate.angle = Adjust_Rotate.ANGLE._180;
    16.  
    17.         TextureAdjustments.RenderAll(photo, ref flipped, photoFlip, photoRotate);
    18.  
    19.         File.WriteAllBytes (myPath, flipped.EncodeToJPG(100));
    20.         //DestroyImmediate(flipped);
    21.         //=> The flipped photo is black. No errors on the console
    22.     }
    23. }
    Seb
     
  36. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    What Unity version do you use?

    Just for test you can also make Texture2D flipped public variable and see inside inspector how it is transformed.



    VacuumShaders - Facebook Twitter YouTube
     
  37. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    I'm using unity 5.5.2f1

    Well I realized it's working on windows within the editor+standalone, but the same code on Android save a black picture.
    Very strange.

    Edit : By the way I have the concerned shaders included in "Always Included Shaders"
     
    Last edited: Mar 31, 2017
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Each texture adjustment uses its own shader and if are using them inside build you will have to add them manually inside Always Included Shaders array of Graphics Settings.
    Shaders are located in Assets\VacuumShaders\Texture Adjustments\Shaders folder.



    VacuumShaders - Facebook Twitter YouTube
     
  39. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    Yes I have it set correctly I think (but I always have a black image saved) :


    My smartPhone is a Galaxy S5 so not old.
     
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    You say that saved texture is black, but before saving texture can you check it inside your build? For example assign it to some mesh material and see if it is transformed correctly.
    If TextureAdjustments.RenderAll(...) generates correct texture but File.WriteAllBytes(...) saves it as black, then its device or Unity problem.



    VacuumShaders - Facebook Twitter YouTube
     
  41. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138

    Hi Arkhivrag, yes I just made a little test :
    On android :
    I added a UI Image gameObject named "imageTestGO" to receive the texture.

    When I make :
    imageTestGO.GetComponent<UnityEngine.UI.Image>().sprite = Sprite.Create(myOriginalTexture, new Rect(0,0,photo.width, photo.height), new Vector2(0.5f,0.5f));
    => it works

    Bu when I make :
    Code (CSharp):
    1. Adjust_Flip photoFlip = new Adjust_Flip();
    2. Adjust_Rotate photoRotate = new Adjust_Rotate();
    3.  
    4. photoFlip.horizontal = true;
    5. photoFlip.vertical = true;
    6. photoRotate.angle = Adjust_Rotate.ANGLE._180;
    7.  
    8. Texture2D flipped = new Texture2D(myOriginalTexture.width, myOriginalTexture.height, TextureFormat.RGB24, false);
    9.  
    10. TextureAdjustments.RenderAll(myOriginalTexture, ref flipped, photoFlip, photoRotate);
    11.  
    12. imageTestGO.GetComponent<UnityEngine.UI.Image>().sprite = Sprite.Create(flipped, new Rect(0,0,photo.width, photo.height), new Vector2(0.5f,0.5f));
    => it doesn't work (black texture)

    So the issue is not because of File.WriteAllBytes(...)
     
    Last edited: Apr 4, 2017
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Just tested on android 2.3 (Kindle Fire 1st generation) and android 5.0 (Kindle Fire HD 8). Everything works as expected. Currently have no other android devices to test, so I am not able to reconstruct your issue.

    Plugin may not work if:
    1. Device does not support render texture.
    2. If texture just is HUGE and Unity can not allocate enough memory for it.
    3. Missing Texture Adjustment shaders inside Always Included Shaders array.
    4. If those shaders have bugs and can not be compiled on your device.
    5. Problem with Unity or your device.

    To check that shaders have no bugs and can be compiled:
    Select Adjustments_Flip or Adjustments_Rotate shader file and inside Inspector window click Compile and show code. Make sure that All platforms is selected.
    Untitled-1.png
    Unity will compile shader and if it has errors will print them inside Console window.

    If there are no errors then I can not help as it seems as Unity bug or device driver problem.



    VacuumShaders - Facebook Twitter YouTube
     
  43. ClaudioMatsumoto

    ClaudioMatsumoto

    Joined:
    Mar 6, 2017
    Posts:
    1
    Hi, I'm having this problem, I´m trying to use editor in a project with linear workflow.

    warning.jpg

    Is there a way to use linear workflow and this asset?

    Best regards

    Claudio Matsumoto
     
  44. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    Good morning Arkhivrag !
    Ouf after some hours I finally figured it out.
    In the player settings, if you check "Multithreaded Rendering" (my case) :
    Then the texture processed by TextureAdjustments.RenderAll() becomes black.

    Otherwise it works, but I need this option to be check.
    Is there any fix to do ?

    Best regards,
    Sébastien
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    whoops, did not know about that thing, need to make research.



    VacuumShaders - Facebook Twitter YouTube
     
  46. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    Thank you :)
     
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,982
    Seems Unity problem, just google how much people are complaining about that feature not working on android correctly, causing crashing, glitches and rendering black.
    May be you will have to disable it.



    VacuumShaders - Facebook Twitter YouTube
     
  48. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    I see. Well every thing is stable so far for me with this option.
    Is there any way to make an exception with your plugin if multithread is on ?

    Otherwise I will uncheck it...
     
  49. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    I just tried my app and without "Multithreaded Rendering" I lose a lots of FPS.
    I'm using the natcam plugin in order to take photos and videos:
    https://www.assetstore.unity3d.com/en/#!/content/52154

    I would be very grateful if you could make it works in this mode.
    Resize pro is working very well for instance :)
     
  50. rattlesnake

    rattlesnake

    Joined:
    Jul 18, 2013
    Posts:
    138
    Arkhivrag,
    Finally for now I unchecked "Multithreaded" for Android.

    Now I tested your plugin on IOS and I have a new issue. Using "Adjust_Rotate" works fine.
    However using "Adjust_Flip", the texture becomes completely stretched as this :
    Code (CSharp):
    1. public Adjust_Flip photoFlip = new Adjust_Flip();
    2. photoFlip.horizontal = true;
    3. TextureAdjustments.RenderAll(photo, ref flipped, photoFlip, photoRotate);


    Is it possible to fix it ?

    Best regards,
    Sébastien