poistettu valot
This commit is contained in:
@ -6,10 +6,6 @@ const float TAU = (2. * PI);
|
||||
const float PHI = sqrt(5.) * 0.5 + 0.5;
|
||||
layout(location = 0) uniform float syncs[11];
|
||||
layout(location = 20) uniform float fft_output[512]; // FFT_SIZE / 4
|
||||
layout(location = 600) uniform vec3 shapes[15]; // shapes - x = horizontal position, y = vertical position, z = length
|
||||
layout(location = 700) uniform vec3 test; // shapes test
|
||||
//layout(binding = 1) uniform sampler2D u_hexGridTex; //uniform sampler2D u_fft_texture;
|
||||
|
||||
layout(binding = 0) uniform sampler2D u_ShapesTex; // uniform sampler2D shapes texture
|
||||
// float u_time = syncs[0];
|
||||
|
||||
@ -136,28 +132,6 @@ vec2 mapScene(in vec3 p) {
|
||||
|
||||
res = (d1 < res) ? d1 : res;
|
||||
|
||||
/* const float gridSize = 16.;
|
||||
|
||||
for(float j = 0.; j < gridSize; j++) {
|
||||
for(float i = 0.; i < gridSize; i++) {
|
||||
ivec2 texSize = textureSize(u_ShapesTex, 0);
|
||||
vec2 texCoord = (vec2(i, j)) / vec2(texSize);
|
||||
vec4 shapeData = texture(u_ShapesTex, texCoord); // RGBA: x, y, length, active
|
||||
float shapeActive = shapeData.a;
|
||||
|
||||
if(shapeActive < 0.5)
|
||||
continue;
|
||||
|
||||
vec3 shapePos = p - vec3(-70.0 + (shapeData.x * 2.), 12. + (shapeData.y * 80.), 0.0);
|
||||
|
||||
float a = sdSphere(shapePos, 0.8);
|
||||
res = min(res, a);
|
||||
if(res == a) {
|
||||
mat = 1.0;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
return vec2(res, mat);
|
||||
}
|
||||
|
||||
@ -353,34 +327,7 @@ vec3 shading(vec3 p, vec3 n, vec3 dir, float material) {
|
||||
lights += addPointLight(vec3(0., 20.0, 10.), vec3(0.77, 0.26, 0.73), 15.0, p, dir, n, shininess);
|
||||
lights += addPointLight(vec3(-10., 20.0, -10.), vec3(0.18, 0.61, 0.86), 15., p, dir, n, shininess);
|
||||
|
||||
// LIGHTS IN HEX GRID PATTERN
|
||||
/*
|
||||
float gridsize = 16.0; // or GRID if you want full size
|
||||
vec3 p = vec3(0.);
|
||||
for(float j = 0.; j < gridsize; j++) {
|
||||
for(float i = 0.; i < gridsize; i++) {
|
||||
ivec2 texSize = textureSize(u_hexGridTex, 0);
|
||||
vec2 texCoord = (vec2(i, j)) / vec2(texSize);
|
||||
|
||||
vec4 hexData = texture(u_hexGridTex, texCoord); // RGBA: x, y, z, dist
|
||||
|
||||
vec3 hexPos = hexData.rgb;
|
||||
float hexDist = hexData.a;
|
||||
|
||||
// Optionally use hexDist for ripple effect with FFT
|
||||
int index = clamp(int((hexDist / 34.)*512.), 0, 511);
|
||||
float hexSize = getScaledFFT(index, 15. ,0.);
|
||||
//float a = sdHex(p - hexPos, 1.0 + hexSize, 0.0);
|
||||
|
||||
lights += addPointLightNoShadow(vec3(hexPos.x, (hexPos.y + hexSize) + 2., hexPos.z), palette(hexSize* 1.5), clamp(hexSize * 5., 0., 1.), 3.4 ,v, dir, n, shininess);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
vec3 lightDir = vec3(0., 2., 3);
|
||||
//float sun_dif = clamp(dot(n, lightDir), 0., 1.);
|
||||
//float shadow = softshadow(v + n * 0.01, lightDir, .01, 30., 18.);
|
||||
//lights += vec3(0.6431, 0.7804, 0.8588) * sun_dif * shadow * occ;
|
||||
|
||||
float ind = clamp(dot(n, normalize(lightDir * vec3(.0, 1.0, -2.0))), 0.0, 1.0);
|
||||
lights += vec3(0.08, 0.62, 0.75) * ind * 0.8;
|
||||
|
||||
Reference in New Issue
Block a user