fix texture format

This commit is contained in:
Piotrek
2021-04-23 14:32:45 +02:00
parent 936c0f2e18
commit 8368545e6c
5 changed files with 22 additions and 12 deletions
+6 -1
View File
@@ -19,6 +19,11 @@ vec3 solve(vec3 point, vec3 view, vec3 normal)
return (ambient + diffuse + specular) * object_color;
}
vec3 castBricks(vec3 origin, vec3 dir)
{
}
vec3 castNodes(vec3 origin, vec3 dir)
{
// Round input pos to nearest voxel
@@ -37,7 +42,7 @@ vec3 castNodes(vec3 origin, vec3 dir)
for(int i=0;i<50;i++)
{
// Get node
uint node = texelFetch(diffuseTex, ivec3(pos), 0).r;
uint node = texelFetch(nodesTexture, ivec3(pos), 0).r;
if(node != 0)
{
// Hit point