Sfoglia il codice sorgente

change the default scene again

Lucas Stadler 10 anni fa
parent
commit
3491a1057e
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      glsl/raymarching.js

+ 4 - 2
glsl/raymarching.js

@ -124,8 +124,10 @@ float DistanceEstimator(vec3 pos) {
124 124
  pMod1(pos.y, offset.y);
125 125
  pMod1(pos.z, offset.z + sin(iGlobalTime));
126 126
  //return sphere(pos);
127
  return min(sphere(vec3(pos.x, pos.y - 0.5, pos.z), 0.75),
128
             udBox(pos, vec3(1.0, 0.3, 1.0)));
127
  //return min(sphere(vec3(pos.x, pos.y - 0.5, pos.z), 0.75),
128
  //           udBox(pos, vec3(1.0, 0.3, 1.0)));
129
  return min(max(-sphere(pos), udBox(pos, vec3(0.75))),
130
             sphere(pos, 0.05 + 0.25 * (1.0 + sin(iGlobalTime * 0.5)*0.5)));
129 131
}
130 132
131 133
mat3 setCamera( in vec3 ro, in vec3 ta, float cr ) {