This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int charsToInt(const char[] chars){ | |
| int ret = 0;//返り値 | |
| int digits = chars.size()-1;//桁 | |
| for(int i = 0; i < digits; i++){ | |
| int num = charToInt(chars[i]); | |
| ret += number * pow(10,i); | |
| } | |
| return ret; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <cstdlib> | |
| using namespace std; | |
| //アクセサを定義しないIntervalクラス | |
| class Interval | |
| { | |
| private: | |
| double upperLimit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //関数内で大量に変数を定義するとGPU時間がめちゃ遅くなるのでスコープを使って書き直している部分があるので可読性が少し落ちている。ので注意。 | |
| ///ret : 0.0 - <1.0 | |
| float rand(float n) | |
| { | |
| return frac(sin(n) * 63452.5453123); | |
| } | |
| ///ret : 0.0 - <1.0 | |
| float rand(float2 co) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Unlit/Gouge2" | |
| { | |
| Properties | |
| { | |
| _Color ("Color", Color) = (1,0,0) | |
| _NoiseScale ("Noise Scale", float) = 100 | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Transparent" "Queue"="Transparent+300" } |
NewerOlder