@@ -6,8 +6,6 @@
#include "gaming-core/wrapper/GL.h"
int main() {
- MarchingCubes::test();
- // return 0;
WindowOptions options(4, 0, {1024, 620}, false, "test");
TextInput* input = nullptr;
Window w(input, options);
@@ -10,7 +10,10 @@ in vec3 varNormalG;
out vec4 color;
+const vec3 light = vec3(-0.746, -0.373, -0.224);
+
void main(void) {
- //vec3 f = texture(textureSamp, (varTextureG + vec3(0.0, height, 0.0)) * 8.0).xyz;
+ vec3 f = texture(textureSamp, (varTextureG + vec3(0.0, height, 0.0)) * 8.0).xyz;
- color = vec4(varNormalG, 1.0);
+ float l = max(dot(light, varNormalG), 0.0) * 0.7 + 0.3;
+ color = vec4(f * l, 1.0);
}