Skip to content

Commit

Permalink
Update esVoxel.h
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbid authored Jul 30, 2023
1 parent c652296 commit 616a696
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inc/esVoxel.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,11 @@ const GLchar* f0 =
"mat4 modelview = view * model;\n"
"vec4 vertPos4 = modelview * position;\n"
"vec3 vertPos = vertPos4.xyz / vertPos4.w;\n"
//"lambertian = max(dot(normalize(-vertPos), normalize(vec3(modelview * vec4(normal, 0.0)))), 0.0);\n"
#ifdef SKYBLUE
"lambertian = max(dot(normalize(-vertPos), normalize(vec3(modelview * vec4(normal, 0.0)))), 0.0);\n"
#else
"lambertian = max(dot(normalize(-vertPos), normalize(vec3(modelview * vec4(normal, 0.0)))), 0.0) * clamp(1.0 - (length(vertPos)*0.002), 0.0, 1.0);\n"
#endif
"vto = voxel.w;\n"
"gl_Position = projection * vertPos4;\n"
"}\n";
Expand Down

0 comments on commit 616a696

Please sign in to comment.