more project structure cleanup, removing spaghetti code, using traits

This commit is contained in:
Piotrek
2021-04-26 21:39:20 +02:00
parent 3a444d6e3a
commit ad62a29263
14 changed files with 224 additions and 179 deletions
Binary file not shown.
+1 -3
View File
@@ -13,9 +13,7 @@ void main()
vec3 color = texture(sampler2D(_InTexture, _InTextureSampler), uv).rgb;
// Viniette
color = vec3(1,1,1);
color *= smoothstep(0.0, 0.2, pow(1.0-length(_InUV), 1.5)) + 0.5;
//color = vec3(1,1,1);
// Return
_OutColor = vec4(color, 1.0);
Binary file not shown.
+2 -2
View File
@@ -96,8 +96,8 @@ HitResult castNodes(Ray ray, uint maxSteps)
pos += incAxis * raySign;
// Outside bounds
if(pos.x < 0 || pos.y < 0 || pos.z < 0) { break; }
if(pos.x >= BLOCK_TEX_SIZE || pos.y > BLOCK_TEX_SIZE || pos.z >= NODE_TEX_SIZE) { break; }
// if(pos.x < 0 || pos.y < 0 || pos.z < 0) { break; }
// if(pos.x >= BLOCK_TEX_SIZE || pos.y > BLOCK_TEX_SIZE || pos.z >= NODE_TEX_SIZE) { break; }
}
// Not found