Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

► Curved World ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Jul 28, 2015.

  1. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    72
    how to use in the game spot ,area and point light? If you could give me an idea?

    (sorry bad english)
     
    Last edited: Dec 25, 2016
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    Check 3. Little Planet (Follow script) example scene where various objects position are updated from script to match Curved World's transformation.



    VacuumShaders - Facebook Twitter YouTube
     
  3. MetaDOS

    MetaDOS

    Joined:
    Nov 10, 2013
    Posts:
    141
    Hi. I'd like to ask some question before purchasing the plugin:
    - Do you integrate PlayMaker action to bend the shader?
    - Is it possible to blend randomly (or controlled by script) different parts of the object instead of blending the whole scene?
    - Is it ok to use your shader for mobile devices?

    Sorry I cannot find the Message button in your Facebook.
     
    Last edited: Dec 27, 2016
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    1. I do not provide PlayMaker integration. The only one script that may need run-time update is CurvedWorld_Controller script, that has the only one job - update shader global parameter. That parameter can be updated manually too.
    2. All shaders bend size are effected globally. CurvedWorld_Controller script controls it.
    3. Mobile shaders are hand-optimized and guarantee fastest rendering.



    VacuumShaders - Facebook Twitter YouTube
     
  5. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @Arkhivrag

    Hi, some questions about Curved World - Classic Runner;

    1. Do the images represent features of asset, as it seems like the images are showing bending along x-axis (half-pipe shape), instead of just depth and sideways "bending" typical of road/track based "classic" runners?

    2. I didn't find any link to manual. Is there a public manual? I did quickly read all the pages in this thread but it would be nice to see the manual in advance.

    3. Is there a direct method to control bending effect in real-time from code?

    4. Do I have to take special care for collision objects along path, say, if I have blocks on the road, and road is moving closer to player like on threadmill, do I have to care about player-object collisions or do I hit colliders on correct location despite of deformation? I see there is some sort script support for point lights and such, that is why I ask.

    5. I got the impression this is world space effect - So can I:
    - Roll/tilt the camera?
    - Turn my head 45 degrees to left or right (for example)
    - Move track / objects in world space instead of camera and they will just move inside deformed space?

    I'm mostly interested in mobile use and only about path-like deformation so this looks pretty good fit.

    Thanks in advance!
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    1. Images do represent asset features. All images are captured inside Unity using Curved World asset. Bending is applied along world XY axis.

    2. Package contains example scenes to help you begin. There are just 2 simple rules: 1) All materials use Curved World shaders and 2) Curvature strength is controlled globally from a custom script.

    3. Yes, curvature is updated in real-time from the script. All that script is does is, updating 3 global shader parameters: curvature strength, pivot point position and bias (from pivot point).

    4. Package includes tool for updating objects (point lights, coliders, etc) position that can not use shaders.

    5. It's a world space transformation, you can freely rotate camera but you may do not like what you see if go too far from pivot point. Check the #1 post in this thread how effects are rendered from various position.



    VacuumShaders - Facebook Twitter YouTube
     
    eses likes this.
  7. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @Arkhivrag

    Hi and thank you for your reply.

    I'm still bit unsure how I can manipulate deformation effect; for Classic runner, do I have a numeric control for left/right bend, and separate numeric control for uphill/downhill bend?.

    Does pivot point location mean that you place an object in game world and then the warping happens around it, similar to pivot being top of a hill.

    I'm asking because I would only need this asset if it fills my needs.
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    You controll bend amount along X and Y axis (separately or together), it's numerical control.


    Pivoit point example



    I think this guy is using Curved Word shader




    VacuumShaders - Facebook Twitter YouTube
     
  9. BjoUnity3d

    BjoUnity3d

    Joined:
    Jul 24, 2012
    Posts:
    56
    I purchased both Curved World and Toony Colors Pro 2. Can you tell us how to enable Curved World with Toony Colors Pro 2? I have tried to find a solution, but I don't see anything that specifically tells you how to do it. I tried the process for enabling custom shaders but I got stuck trying to figure out where to paste the #include statement and the vertex transformation call. Wherever I put it I got compiler errors.
     
  10. BjoUnity3d

    BjoUnity3d

    Joined:
    Jul 24, 2012
    Posts:
    56
    Well I found the documentation in Toony Colors 2 Pro for generating a shader to use with Curved World. Unfortunately the Shader Generator makes a broken shader file when using the Curved World template (seems to be only half there). I had to generate the missing parts of the shader manually.
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    Ask package publisher to update his shaders.



    VacuumShaders - Facebook Twitter YouTube
     
  12. Aohajin

    Aohajin

    Joined:
    Sep 18, 2014
    Posts:
    10
    hi

    I have just upgrade to unity5.5, and download the new curved world pack version 2.4. After I recompile all shaders, Everything works fine but this error info:

    Shader error in 'VacuumShaders/Curved World/U5 Standard/Standard': invalid subscript 'boxMax' at Assets/VacuumShaders/Curved World/Shaders/cginc/CurvedWorld_UnityStandardCore.cginc(266) (on glcore)

    Compiling Vertex program
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA

    I don't use this standard shader so it's ok to just ignore it, but it's sort of annoying ... I hope I could get some help to fix this. >"< thank you~~~
     
    Last edited: Jan 11, 2017
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    If you had previous version in the Asset Store catch folder, it may not download proper version.

    1) Remove Curved World asset from the project.
    2) Clean Asset Store cache:
    PC - C:\Users\[Your Profile Name]\AppData\Roaming\Unity\Asset Store
    MAC - "~/Library/Unity/Asset\ Store".
    3) Now download fresh package from the Asset Store.



    VacuumShaders - Facebook Twitter YouTube
     
  14. lyndontroy

    lyndontroy

    Joined:
    Dec 12, 2012
    Posts:
    31
  15. norwegianski

    norwegianski

    Joined:
    Jan 17, 2017
    Posts:
    1
    Hello

    I get an error when I try to build to iOS with xcode:

    -------- failed compiling:
    fragment evaluation shader
    WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
    ERROR: 0:38: Use of undeclared identifier 'gl_FragDepthEXT'

    Note: Creation of internal variant of shader 'Hidden/Internal-MotionVectors' failed.
    WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Setting to default shader.
    WARNING: Shader Unsupported: 'Hidden/VacuumShaders/Curved World/VertexLit/Diffuse' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/VacuumShaders/Curved World/VertexLit/Diffuse' - Setting to default shader.

    Help please?
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    Curved World full version contains all bend types: Classic Runner, Little Planet, Roll-off, Cylindrical Tower, Perspective 2D and Universal bend types.



    VacuumShaders - Facebook Twitter YouTube
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    Seems something got wrong inside Unity Engine itself as it can not compile some shaders, including its own.
    Curved World shaders compilation may be failed because of it too.



    VacuumShaders - Facebook Twitter YouTube
     
  18. blitzcloud

    blitzcloud

    Joined:
    Aug 18, 2015
    Posts:
    27
    Hello!

    Great plugin, i'm loving it because it brings exactly the vibe I wanted for my game.

    However i'd like to know how to control fog better. Right now I can't get it to work and I don't know if it's because of the units i'm using on the elements, or because i'm missing something. Because it simply gives a checkbox and no parameters whatsoever, nor a document file explaining how to get fog?

    That's my only complaint, because it's a great asset


    PS: just realized it doesn't work with unlit, but others are fine.


    I really can't get it to work. I checked the example scene with the cars, which has the same material, but on my scene it doesnt work. I'm not seeing anything special in the scene that i'm missing?
     
    Last edited: Feb 1, 2017
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    Curved World uses Unity built-in fog system. Mobile shaders (Unlit, One Directional) have check-box to turn it On/Off, of course if Fog is already enabled inside Unity Lighting settings.



    VacuumShaders - Facebook Twitter YouTube
     
    blitzcloud likes this.
  20. blitzcloud

    blitzcloud

    Joined:
    Aug 18, 2015
    Posts:
    27
    That was it, fog wasn't enabled on lighting settings. Thanks. Lovely asset!
     
  21. jeffries7

    jeffries7

    Joined:
    Jun 25, 2014
    Posts:
    59
    I am also getting the "Shader error in 'VacuumShaders/Curved World/U5 Standard/Standard (Specular setup)': invalid subscript 'boxMax' at Assets/VacuumShaders/Curved World/Shaders/cginc/CurvedWorld_UnityStandardCore.cginc(266) (on d3d11)" issue in 5.5. I'm using the classic runner and have updated to the latest version as well as doing what you mention about clearing asset store cache. These don't seem to fix the issue. I'm having to use the Unlit shader currently to test.
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    Errors you receive is due to importing Unity 5.4 shaders inside Unity 5.4. Download proper version from the Asset Store.



    VacuumShaders - Facebook Twitter YouTube
     
  23. blitzcloud

    blitzcloud

    Joined:
    Aug 18, 2015
    Posts:
    27
    Hi,

    I'm currently facing a challenge, and i'd like to share it:

    I have many many gameObjects constructing a world forming a tunnel. Curved world helps me create the twisted tunnel horizon feeling.

    Since there's so many gameobjects (imagine 215*6 sides) for example, there's a lot of transforms inside the parent where I stick them all.

    Since i'm doing some optimization, the first thing that came to mind: many objects=many transforms moving, can't have them all moving creating the treadmill illusion because it will lower performance. Instead i'll make the ball character move forward.

    However the complication comes because I want to make so when the ball changes lane (6 tunnel-like lanes), the camera and the ball would rotate. For the most part, this did the trick of changing the lane without having to move anything but two transforms. Now the problem is with curved world, because it will take world coordinates for rotation and i'm struggling to find a way to rotate the influence on each angle accordingly to the camera rotation.

    example: if i have a tunnel that is using 10 influence on the X axis, it will bend upwards. If I do two lanes to the right, it will be bent to the right.

    Now, I think I can solve this by applying some calculations, but maybe it would be nice if you were able to give us an option where the pivot can also be taken as a reference point for rotations? it's more of a suggestion than anything else.

    If I missed anything and there's an option to do this, please do tell!
     
  24. blitzcloud

    blitzcloud

    Joined:
    Aug 18, 2015
    Posts:
    27
    As an update, I did manage to get the rotation from the pivot through a custom script. However I have to tune it up a bit because it does some jerky stuff sometimes.

    curved._V_CW_Bend_X=Xcont*Mathf.Cos(Mathf.Deg2Rad*pivot.eulerAngles.z);
    curved._V_CW_Bend_Y=Xcont*Mathf.Sin(Mathf.Deg2Rad*pivot.eulerAngles.z);

    curved._V_CW_Bend_X+=Ycont*Mathf.Cos(Mathf.Deg2Rad*(pivot.eulerAngles.z-90));
    curved._V_CW_Bend_Y+=Ycont*Mathf.Sin(Mathf.Deg2Rad*(pivot.eulerAngles.z-90));

    curved is a reference to the curved controller, Xcont and Ycont are the current values for the dynamic transitioning I have. I multiply each of the values by the respective sinus and cosinus. For the Y angle, getting the -90 degrees of difference seemed imperative.

    These work on Update method, and for the moment, aside from the jerkiness of changing lane quickly, it works pretty smooth. Considering I was working with many objects (up to a thousand, considering the worst scenario), rotating the game area caused dips from 900 to 300 fps almost, due to update method with triggers rotating and a lot of gameobjects rotating too. This keeps a stable 900. The code I made is inexpensive (0.02ms).


    The reasoning comes from the following picture:


    Imagine the black horizontal line axis as the _V_CW_Bend_X parameter
    The vertical axis line is the curved._V_CW_Bend_Y paramenter
    Now, I rotate the camera around the remaining Z axis 45 degrees. How do I apply, considering the Z rotation (of the object) was 0, the appropriate amount to bend_X and _Y to look exactly the same curvature? The answer relies on trigonometry. We have to find both lengths (green lines). That's what the formula up there does. And because both axis are moving (X and Y) I sum the values.

    In other words, blue is for X bend, red is for Y bend


    curved._V_CW_Bend_X=Xcont*Mathf.Cos(Mathf.Deg2Rad*pivot.eulerAngles.z);
    curved._V_CW_Bend_Y=Xcont*Mathf.Sin(Mathf.Deg2Rad*pivot.eulerAngles.z);


    curved._V_CW_Bend_X+=Ycont*Mathf.Cos(Mathf.Deg2Rad*(pivot.eulerAngles.z-90));
    curved._V_CW_Bend_Y+=Ycont*Mathf.Sin(Mathf.Deg2Rad*(pivot.eulerAngles.z-90));

     
    Last edited: Feb 10, 2017
    Arkhivrag likes this.
  25. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    Free voucher for Curved World:
    ASV-34K6-LFK3-73T9-WKAE-JJYH (redeemed)

    Note, one digit symbol (not alphabet) is changed ;)



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Feb 16, 2017
  26. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,844
    'd take years to guess, Can you please atleast tell which one is changed
     
  27. jeffries7

    jeffries7

    Joined:
    Jun 25, 2014
    Posts:
    59
    How on earth did someone work that out already!?

    ....Oh I read that as it was alphabetical.
     
  28. AN11E

    AN11E

    Joined:
    Feb 23, 2017
    Posts:
    2
    Hi, I am using a curved shader for a game proyect, and i have a little problem, when i see my proyect in PC at Unity everithing its OK, but when put my proyect on any mobile the tiles of my environment are a change of colour or separation, or something like that.

    image left on mobile. image right. Editor Unity
    upload_2017-2-23_11-43-37.png


    I don´t know whats happend with that.
    Somebody could help me please?

    Thanks
     
  29. updart

    updart

    Joined:
    Jul 8, 2015
    Posts:
    1
    can someone help with glow shader? i try to combine unlit (curved world shader) and glow Glow Effect (Mobile Friendly) or MK Glow but glow not follow to object




     

    Attached Files:

  30. fritzinhen

    fritzinhen

    Joined:
    May 28, 2013
    Posts:
    4
    hi! just bought the little planet asset and im wondering if we can get a tri planar shader for mobile (unlit) thaks for this great asset keep with the good work!
     
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    It is difficult from picture to guess what is going wrong there, but may be its shadowing problem. Try adding vertex lit shaders from Assets\VacuumShaders\Curved World\Shaders\VertexLit to the Always Included Shaders array in Graphics Settings.


    VacuumShaders - Facebook Twitter YouTube
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    Go to Graphics Settings, enable Debug mode (from right click), change Depth Normals mode from Built-In to Custom shader and change shader to VacuumShaders\Curved World\Shaders\Resources\Camera-DepthNormalTexture
    Untitled-1.png



    VacuumShaders - Facebook Twitter YouTube
     
  33. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    There are no tri-planar shaders inside Curved World, but if you have one you can make it CW compatible.



    VacuumShaders - Facebook Twitter YouTube
     
  34. AN11E

    AN11E

    Joined:
    Feb 23, 2017
    Posts:
    2
    Thank you very much!
    I'll do tests and then i will publish the results
     
  35. cmos

    cmos

    Joined:
    Aug 6, 2012
    Posts:
    10
    I really thought this worked running in a sphere (as if it is a planet)... but it doesn't I don't think unless I am doing something wrong :/

    Any ideas how to get that to work? Walk around the world as if it is really a planet?
     
  36. cmos

    cmos

    Joined:
    Aug 6, 2012
    Posts:
    10
    Hi again...

    I have this working with grid based of tiles.

    The tiles on the edges of the screen show up weird, for example they just appear
    choppy as if they don't get rendered by the camera until enough of the tile shows up.

    I am making the grid of tiles 30x30 show up to look like a sphere if that helps.
    As I walk around the edge tiles just appear rendering last second instead of showing up normally.

    Any ideas?
     
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    Check ReadMe file inside Doc folder, page 7.



    VacuumShaders - Facebook Twitter YouTube
     
  38. BNJMO

    BNJMO

    Joined:
    Dec 6, 2015
    Posts:
    11
    Hello,

    I just updated Curved World to the last version and I've noticed that the "Z Axis Ben Size" parameter has just disappeared from the "Curved World_Controller" script.
    What happened to that? I was using that parameter for my game and now the value I give to the z component of the Vector3 simply gets ignored.
    Is there any way to get back the old version of the package?

    Thank you.
     
  39. blitzcloud

    blitzcloud

    Joined:
    Aug 18, 2015
    Posts:
    27
    It sounds like the Curved Shader mode might be back on The "runner" mode. Try changing the mode.
     
  40. Instability

    Instability

    Joined:
    Apr 16, 2012
    Posts:
    288
    Hi,

    I am quite interested in this asset but from your asset description I do not understand a number of things. Most importantly, how do you handle topology? Say I have a snake game on a 2d square grid, and I would like it to be rendered on a torus. This means that the top&bottom grid edge are identified, and the left&right edge are identified. How does this work in Curved World? How do you handle the singularity on a sphere?

    Also, is it possible to supply an explicitly parametrised surface to be rendered in Curved World? Even implicit surfaces?
     
  41. fritzinhen

    fritzinhen

    Joined:
    May 28, 2013
    Posts:
    4
    Hi, we bought the little planet asset and you mentioned that the projector is included but we can not find it in the little planet pakage, where we can find it? thanks.
     
  42. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    It applies offset to the vertex by parabola equation, no support of any heavy explicitly parametric surfaces.
    Each bend type included in Curved World is supposed to be observed from specific point to have 'correct' effect.
    Here are several examples how various bend effects look from side (wrong) and correct view positions:

    Classic Runner


    Little Planet


    Cylindrical Tower




    VacuumShaders - Facebook Twitter YouTube
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    Check Assets\VacuumShaders\Curved World\Packages folder.



    VacuumShaders - Facebook Twitter YouTube
     
  44. fritzinhen

    fritzinhen

    Joined:
    May 28, 2013
    Posts:
    4
    Thank you! :D
     
  45. gio_987654321

    gio_987654321

    Joined:
    Jan 25, 2017
    Posts:
    37
    hello
    Im working on project using megasplat asset .

    Im visual artist and not coder . shaders is martian language for me . sorry

    I find your asset very very interesting . and i would like to use CW
    Is there a way to adapt megasplat shader to curved world shader?
    do you know someone thats can help me ?

    or alternative question can i use others environment asset like Gaia ,Landscape Auto Material or relief terrain pack to use directly with your CW ( may be with baking method ) do you have an advice ?

    many thanks
    GiO
     
  46. gio_987654321

    gio_987654321

    Joined:
    Jan 25, 2017
    Posts:
    37
    Hello again
    Ive contacted Mr JBooth , Megasplat Author about my shader unknoledge and show him your CustomShader.pdf .
    he ask me : ". Do you know if he ( you) adds a define for other asset store authors to use? If so, I could likely add an option that appears in the shader compiler when CurvedWorld is installed and inserts those functions into the shaders."

    Is it possible ? it would be great for all users .

    Many thanks for your feedback
    GiO
     
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,936
    It is enough to check if file "Assets/VacuumShaders/Curved World/Shaders/cginc/CurvedWorld_Base.cginc" exists in the project - means Curved World is installed and its API can be used inside any custom shader.



    VacuumShaders - Facebook Twitter YouTube
     
  48. gio_987654321

    gio_987654321

    Joined:
    Jan 25, 2017
    Posts:
    37
    many thanks for your feedback
    and good job for your efficient asset.
    Best
     
  49. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,445
    So, I've just submitted version 1.02 of MegaSplat to the asset store. It includes support for Curved World with a single click of a checkbox. If you're not familiar with MegaSplat, check out this video of it being used on terrain and feel free to ask questions in the MegaSplat thread. Thanks!

     
    Beloudest and Arkhivrag like this.
  50. snailguides

    snailguides

    Joined:
    Feb 3, 2017
    Posts:
    1
    I'm modifying UnityChan Shader to Curved World like this, but it say
    'vert': output parameter 'o' missing semantics. How to fix it.
    Code (CSharp):
    1. Shader "UnityChan/Curved/Clothing"
    2. {
    3.     Properties
    4.     {
    5.         _Color ("Main Color", Color) = (1, 1, 1, 1)
    6.         _ShadowColor ("Shadow Color", Color) = (0.8, 0.8, 1, 1)
    7.         _SpecularPower ("Specular Power", Float) = 20
    8.         _EdgeThickness ("Outline Thickness", Float) = 1
    9.         _DepthBias  ("Outline Depth Bias", Float) = 0.00012
    10.        
    11.         _MainTex ("Diffuse", 2D) = "white" {}
    12.         _FalloffSampler ("Falloff Control", 2D) = "white" {}
    13.         _RimLightSampler ("RimLight Control", 2D) = "white" {}
    14.         _SpecularReflectionSampler ("Specular / Reflection Mask", 2D) = "white" {}
    15.         _EnvMapSampler ("Environment Map", 2D) = "" {}
    16.         _NormalMapSampler ("Normal Map", 2D) = "" {}
    17.     }
    18.  
    19.     SubShader
    20.     {
    21.         CGINCLUDE
    22.        
    23.         //Curved World include - change the path here if you moved the file out of its default directory
    24.         #include "Assets/VacuumShaders/Curved World/Shaders/cginc/CurvedWorld_Base.cginc"
    25.        
    26.         ENDCG
    27.        
    28.         Tags
    29.         {
    30.             "RenderType"="Opaque"
    31.             "Queue"="Geometry"
    32.             "LightMode"="ForwardBase"
    33.         }
    34.  
    35.         Pass
    36.         {
    37.             Cull Back
    38.             ZTest LEqual
    39. CGPROGRAM
    40. #pragma multi_compile_fwdbase
    41. #pragma target 3.0
    42. #pragma vertex vert
    43. #pragma fragment frag
    44. #include "UnityCG.cginc"
    45. #include "AutoLight.cginc"
    46. #define ENABLE_NORMAL_MAP
    47. #include "CharaMain.cg"
    48.  
    49.  
    50.        
    51.    
    52.        
    53.        
    54.         struct Input
    55.         {
    56.             half2 uv_MainTex;
    57.         };
    58.         /*struct Input
    59.         {
    60.             //half2 uv_MainTex;
    61.         };*/
    62.  
    63.         void vert(inout appdata_full v, out Input o)
    64.         {
    65.             UNITY_INITIALIZE_OUTPUT(Input, o);
    66.    
    67.             //Curved World
    68.             V_CW_TransformPointAndNormal(v.vertex, v.normal, v.tangent);
    69.         }
    70.        
    71. ENDCG
    72.         }
    73.  
    74.         Pass
    75.         {
    76.             Cull Front
    77.             ZTest Less
    78. CGPROGRAM
    79. #pragma target 3.0
    80. #pragma vertex vert
    81. #pragma fragment frag
    82. #include "UnityCG.cginc"
    83. #include "CharaOutline.cg"
    84. ENDCG
    85.         }
    86.  
    87.     }
    88.  
    89.     FallBack "Transparent/Cutout/Diffuse"
    90.     //Fallback "Hidden/VacuumShaders/Curved World/VertexLit/Diffuse"
    91. }
    92.  

    This is original Unity Chan shader:
    Code (CSharp):
    1. Shader "UnityChan/Clothing"
    2. {
    3.     Properties
    4.     {
    5.         _Color ("Main Color", Color) = (1, 1, 1, 1)
    6.         _ShadowColor ("Shadow Color", Color) = (0.8, 0.8, 1, 1)
    7.         _SpecularPower ("Specular Power", Float) = 20
    8.         _EdgeThickness ("Outline Thickness", Float) = 1
    9.         _DepthBias  ("Outline Depth Bias", Float) = 0.00012
    10.        
    11.         _MainTex ("Diffuse", 2D) = "white" {}
    12.         _FalloffSampler ("Falloff Control", 2D) = "white" {}
    13.         _RimLightSampler ("RimLight Control", 2D) = "white" {}
    14.         _SpecularReflectionSampler ("Specular / Reflection Mask", 2D) = "white" {}
    15.         _EnvMapSampler ("Environment Map", 2D) = "" {}
    16.         _NormalMapSampler ("Normal Map", 2D) = "" {}
    17.     }
    18.  
    19.     SubShader
    20.     {
    21.         Tags
    22.         {
    23.             "RenderType"="Opaque"
    24.             "Queue"="Geometry"
    25.             "LightMode"="ForwardBase"
    26.         }
    27.  
    28.         Pass
    29.         {
    30.             Cull Back
    31.             ZTest LEqual
    32. CGPROGRAM
    33. #pragma multi_compile_fwdbase
    34. #pragma target 3.0
    35. #pragma vertex vert
    36. #pragma fragment frag
    37. #include "UnityCG.cginc"
    38. #include "AutoLight.cginc"
    39. #define ENABLE_NORMAL_MAP
    40. #include "CharaMain.cg"
    41. ENDCG
    42.         }
    43.  
    44.         Pass
    45.         {
    46.             Cull Front
    47.             ZTest Less
    48. CGPROGRAM
    49. #pragma target 3.0
    50. #pragma vertex vert
    51. #pragma fragment frag
    52. #include "UnityCG.cginc"
    53. #include "CharaOutline.cg"
    54. ENDCG
    55.         }
    56.  
    57.     }
    58.  
    59.     FallBack "Transparent/Cutout/Diffuse"
    60. }
    61.  
    Thanks in advance