Skip to content
Snippets Groups Projects
Commit b6489611 authored by Florent Berthaut's avatar Florent Berthaut
Browse files

Add checkerboard visu

parent 01404384
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ render_mode unshaded;
varying float dist;
void vertex() {
float t=0.49;
float t=0.99;
if((abs(VERTEX.x)>t && abs(VERTEX.y)>t)
|| (abs(VERTEX.x)>t && abs(VERTEX.z)>t)
|| (abs(VERTEX.y)>t && abs(VERTEX.z)>t)) {
......
shader_type spatial;
render_mode ambient_light_disabled;
varying vec2 pos;
uniform float cell = 1.0;
void vertex() {
pos = (MODEL_MATRIX*vec4(VERTEX,1.0)).xz;
}
void fragment() {
float x = floor(mod(pos.x,cell*2.0)/cell);
float y = floor(mod(pos.y,cell*2.0)/cell);
float v = abs(x-y)*0.1+0.1;
ALBEDO = vec3(v);
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment