Simple cube axes
This shader is a representation of the axes.
Red/Cyan – X
Green/Purple – Y
Blue/Yellow – Z
*The rotation represented in cover image not included
Shader code
shader_type spatial;
render_mode cull_front, unshaded;
void fragment() {
vec3 world_normal = (INV_VIEW_MATRIX * vec4(NORMAL, 0.0)).xyz;
vec3 rounded_normal = round(world_normal);
ALBEDO = dot(vec3(1.0), rounded_normal) < 0.0 ? -rounded_normal : cross(cross(rounded_normal, vec3(1)), rounded_normal);
}