Просмотр исходного кода

reorder includes in the default shader

Lucas Stadler лет назад: 10
Родитель
Сommit
6017623117
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      glsl/defaultFiles.js

+ 2 - 4
glsl/defaultFiles.js

6
  gl_FragColor = vec4(gl_FragCoord.xy / iResolution, blue, 1.0);
6
  gl_FragColor = vec4(gl_FragCoord.xy / iResolution, blue, 1.0);
7
}`,
7
}`,
8
  "default.frag": `//#include "includes/sphere-tracer.frag"
8
  "default.frag": `//#include "includes/sphere-tracer.frag"
9
//#include "includes/default-main.frag"
9
//#include "includes/iq-primitives.frag"
10
//#include "includes/iq-primitives.frag"
10
//#include "includes/cupe-primitives.frag"
11
//#include "includes/cupe-primitives.frag"
11
12
20
  //           udBox(pos, vec3(1.0, 0.3, 1.0)));
21
  //           udBox(pos, vec3(1.0, 0.3, 1.0)));
21
  return min(max(-sphere(pos), udBox(pos, vec3(0.75))),
22
  return min(max(-sphere(pos), udBox(pos, vec3(0.75))),
22
             sphere(pos, 0.05 + 0.25 * (1.0 + sin(iGlobalTime * 0.5)*0.5)));
23
             sphere(pos, 0.05 + 0.25 * (1.0 + sin(iGlobalTime * 0.5)*0.5)));
23
}
24
25
//#include "includes/default-main.frag"
26
`,
24
}`,
27
  "includes/iq-primitives.frag": `float sphere(vec3 pos) {
25
  "includes/iq-primitives.frag": `float sphere(vec3 pos) {
28
  return length(pos) - 1.0;
26
  return length(pos) - 1.0;
29
}
27
}