Ive gota third-person camera with 8 fixed angles and my terrain is blocky like minecraft and sometimes I cut off the skyward face of my cubes so you can see inside
My goal is to identify if I'm drawing on a backface (inside of a cube) and if so then cover it up with a solid color or maybe a special design.
But I don't know what the NORMALs look like, I assume they are all normalized.
I tried this code to try and figure out what different normals literally look like
if (NORMAL == vec3(0, -1, 0)) {
ALBEDO = vec3(.5, .5, .5)
}
if (NORMAL == vec3(0, 1, 0)) {
ALBEDO = vec3(.1, .1, .5)
}
if (NORMAL == vec3(1, 0, 0)) {
ALBEDO = vec3(.1, .9, .9)
}
if (NORMAL == vec3(-1, 0, 0)) {
ALBEDO = vec3(.2, .2, 0)
}
if (NORMAL == vec3(0, 0, 1)) {
ALBEDO = vec3(.7, .3, .3)
}
if (NORMAL == vec3(0, 0, -1)) {
ALBEDO = vec3(.2, .7, .7)
}
None of the inside faces were
colored, however outer right facing sides were colored light blue
, but no other faces changed color
Any idea how to get the downward or backward facing parts of the cubes?