复杂的星空
参考星空效果
// Star Nest by Pablo Roman Andrioli
#define iterations 17
#define formuparam 0.53
#define volsteps 20
#define stepsize 0.1
#define zoom 0.800
#define tile 0.850
#define speed 0.010
#define brightness 0.0015
#define darkmatter 0.300
#define distfading 0.730
#define saturation 0.850
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
//get coords and direction
vec2 uv=fragCoord.xy/iResolution.xy-.5;
uv.y*=iResolution.y/iResolution.x;
vec3 dir=vec3(uv*zoom,1.);
float time=iTime*speed+.25;
//mouse rotation
float a1=.5+iMouse.x/iResolution.x*2.;
float a2=.8+iMouse.y/iResolution.y*2.;
mat2 rot1=mat2(cos(a1),sin(a1),-sin(a1),cos(a1));
mat2 rot2=mat2(cos(a2),sin(a2),-sin(a2),cos(a2));
dir.xz*=rot1;

博客围绕复杂星空展开,参考星空效果,结合Unity技术来实现相关内容,聚焦于信息技术领域的游戏开发方面。
最低0.47元/天 解锁文章
2205

被折叠的 条评论
为什么被折叠?



