ãUnityãShaderGraphã§é ç¹ã·ã§ã¼ãã¼ã使ç¨ãã¦ã¿ã
Unity 2018.2ãã使ç¨ã§ããShaderGraph 3.0ããé ç¹ã·ã§ã¼ãã¼ã®æ©è½ã使ç¨ã§ããããã«ãªã£ãã®ã§ã使ã£ã¦ã¿ã¾ããã
Â
- ShaderGraph3.0
- ã¨ããããä¸ä¸ã«ç§»åããã ãã®ã·ã§ã¼ãã¼ãä½ã
- æãä½ã£ã¦ã¿ã
- ææ³
Â
ShaderGraph3.0
ãããåããã«ã¯ãShaderGraphã¨LWRPã3.0ã«ä¸ããå¿ è¦ãããã¾ããã
Unity 2018.2ã®ShaderGraph 3.0ããããã¹ã¿ã¼ãã¼ãã«ã¯Positionã¨ããæ°ããé ç®ã追å ããã¾ããããã®é ç®ãé ç¹ä¸ã¤ä¸ã¤ã®åº§æ¨ã«ãªãã¾ãã
ãªã®ã§ããã®é ç¹æ å ±ã«Cosï¼Timeï¼ã®åã ã座æ¨ãä¸ä¸ãã¦ããã°ãä¸ä¸ã«çãåãã¨ããããªæãã§ãã
Â
ã¨ããããä¸ä¸ã«ç§»åããã ãã®ã·ã§ã¼ãã¼ãä½ã
ã¾ãã¯é ç¹ã·ã§ã¼ãã¼ã®åä½ã確èªããçºããªãã¸ã§ã¯ããä¸ä¸ã«åãã ãã®ã·ã§ã¼ãã¼ãä½ã£ã¦ã¿ã¾ãã
Â
ã¾ããç¹ã«ä½ããã¦ããªãç¶æ
ã§ãã
Positionï¼Objectï¼ã§åå¾ãã座æ¨ãããã®ã¾ã¾Positionã¸åºåãã¦ãã¾ãã
æéã§ä¸ä¸ãããã¯ãã«ãä½ãã¾ãã
float3(0, cos(_Time.x))ãªæãã§ãã
é ç¹ã®åæ座æ¨ã¨ãæéã§ä¸ä¸ãããã¯ãã«ãå ç®ãã¦ãæçµãã¼ãã«åºåããããã«ãã¾ãã
ããã§ãªãã¸ã§ã¯ããä¸ä¸ã«åãã·ã§ã¼ãã¼ãåºæ¥ã¾ããã
Â
ãªããåãã®ã¯é ç¹ã ãã§ãã¦ã³ãã£ã³ã°ããã¯ã¹ã¯åãã¦ãªãã®ã§ããã¾ãä¸ä¸ã«åããã¨éä¸ã§æ¶ãããããã®ã§æ³¨æã§ãã
Â
æãä½ã£ã¦ã¿ã
ã¨ãã¡ãã©ãããã®è¨äºãåèã«ãæã®åãã¨ããä½ã£ã¦ã¿ã¾ããã
ã³ã¼ãããã®ã¾ã¾ã·ã§ã¼ãã¼ã°ã©ãã®ãã¼ãã«æ¸ãç´ãããåããæãã§ãã
ææ³
çµæ§ç°¡åã«é ç¹ã·ã§ã¼ãã¼ã§ã¢ãã«ãåãããã¨ãåºæ¥ã¾ããã
ShaderGraphã§è²ãè²ã 試è¡é¯èª¤ããããã¯ãå®æå½¢ãããã§ä½ãæããã¾ãããä¸ã ã«æ¥½ããã§ãã