Skip to content

Instantly share code, notes, and snippets.

//unityのUnlitShaderを改造
fixed4 frag (v2f i) : SV_Target
{
//中央からパルスを発するのこぎり関数
float offset = (_Time.y - floor(_Time.y)) / _Time.y;
float CurrentTime = (_Time.y)*(offset);
         //衝撃波のパラメーター
fixed3 WaveParams = fixed3(10.0, 0.8, 0.1 );
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
//Sawtooth function to pulse from centre.
float offset = (iTime- floor(iTime))/iTime;
float CurrentTime = (iTime)*(offset);
vec3 WaveParams = vec3(10.0, 0.8, 0.1 );
float ratio = iResolution.y/iResolution.x;