fix texture format
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user