Help us understand the problem. What is going on with this article?

Unity5.xでuGUIのImageを白くする

More than 3 years have passed since last update.

このへん
http://tsubakit1.hateblo.jp/entry/2014/09/17/015251
http://elix-jp.sakura.ne.jp/wordpress/?p=953
を参考にしながら実装してみたメモ。
1. Unity5.x用のbuilt-in shaderをリンク先のDowunloadsからダウンロード
  (http://unity3d.com/jp/get-unity/download/archive)
2. アーカイブ内のSprits-Default.shaderを開く
3. 1行目の
Shader "Sprites/Default"
 を
Shader "Sprites/Custom"
 とかに変更
4. fixed4 frag(v2f IN) : SV_Target の中身を

            fixed4 frag(v2f IN) : SV_Target
            {
                fixed4 c = SampleSpriteTexture (IN.texcoord) * IN.color;
                c.rgb = c.rgb*2+max(fixed3(0,0,0),IN.color.rgb-0.5)*2;
                c.rgb *= c.a;
                return c;
            }

 の様に修正
5. ファイル名をSprits-Custom.shaderなどとして保存し、Projectに持ってくる
6. Unity上でシェーダを右クリックCreate→Material
7. 生成されたMaterialを該当ImageのMaterialにセット
8. ColorのRGB値0〜128〜255で、黒〜原色〜白と変色可能になります

mache
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした