本文主要是介绍ShaderJoy ——螺旋线闪光粒子效果【GLSL】,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
效果图
完整代码和注释
const float rad = 0.9;
const float dots = 64.0;
const float duration = 180.0;
const vec3 colorsep = vec3(0, 2.09, 4.18);
const float PI = 3.1415926535897932384626433832795;
const float PI2 = 2.0 * PI;#iUniform float power = 1.5 in {0., 6.}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{/// [0., 1.] -> [-.5, .5]vec2 p = -1.0 + 2.0 * fragCoord.xy / iResolution.xy;float tm = mod(iTime, duration) / duration; ///< 时间周期性p.y *= iResolution.y / iResolution.x;vec3 gradient = vec3(0.0);for (float i = 1.0; i <= dots;
这篇关于ShaderJoy ——螺旋线闪光粒子效果【GLSL】的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!