Computer Graphics, Animaition, OpenGL, DirectX, OpenCL
-
cngooboy
- 初来炸道
- 帖子: 1
- 注册时间: 2017年03月21日 14:41
-
联系:
帖子
由 cngooboy »
送一个四叶草:
unsigned char RD(int i,int j){
return 0;
}
unsigned char GR(int i,int j){
double x = -(i - 512), y = j - 512, a = 0, b = 0;
int k;
x = x/255;
y = y/255;
for(k = 0;k <= 256;k++){
if(x*x+y*y > 4)break;
a = x;b = y;
x = (a*a-b*b) + 2.5;
y = (a*b+b*a);
}
if(k >=256)return 0;
k*=16;
if(k >= 256)k = 255;
return k;
}
unsigned char BL(int i,int j){
return 0;
}
效果之后发
-
523066680
- Administrator
- 帖子: 573
- 注册时间: 2016年07月19日 12:14
-
联系:
帖子
由 523066680 »
cngooboy 写了:效果之后发
运行过了,有点像几个外星人头……
-
523066680
- Administrator
- 帖子: 573
- 注册时间: 2016年07月19日 12:14
-
联系:
帖子
由 523066680 »
10楼效果,Shadertoy 版本
https://www.shadertoy.com/view/4s2BRh
float RGB(float x, float y, float e)
{
return ( x * tan(x/y) ) * ( y * tan( x/y + iGlobalTime/2.0 * e ) ) / (iMouse.x*10.0+500.0);
}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 coord;
coord = (fragCoord - iResolution.xy/2.0)*5.0;
fragColor = vec4(
float(int(RGB(coord.x, coord.y, 0.33)) %255) / 255.0,
float(int(RGB(coord.x, coord.y, 0.66)) %255) / 255.0,
float(int(RGB(coord.x, coord.y, 0.99)) %255) / 255.0,
1.0);
}
正浏览此版面之用户: Ahrefs [Bot] 和 0 访客