main
Dominik Madarász 2024-08-19 11:20:23 +02:00
parent 8e7d590991
commit ff7f42aeb9
3 changed files with 7 additions and 7 deletions

View File

@ -29,9 +29,9 @@ int main() {
// 32*32 max instances
int NUM_INSTANCES = 1;
array_resize(M, 32*32);
for(int z = 0, i = 0; z < 32; ++z) {
for(int x = 0; x < 32; ++x, ++i) {
array_resize(M, 128*128);
for(int z = 0, i = 0; z < 128; ++z) {
for(int x = 0; x < 128; ++x, ++i) {
vec3 pos = vec3(-x*3,0,-z*3);
vec3 rot = vec3(0,-90,0); // kgirl: 0,0,0
vec3 sca = vec3(1,1,1); // kgirl: 2,2,2

View File

@ -65,8 +65,8 @@ int main() {
compose44(girl.pivot, girl_p, eulerq(girl_r), girl_s);
model_render(girl, cam.proj, cam.view, girl.pivot, 0);
compose44(witch.pivot, witch_p, eulerq(witch_r), witch_s);
model_render(witch, cam.proj, cam.view, witch.pivot, 0);
// compose44(witch.pivot, witch_p, eulerq(witch_r), witch_s);
// model_render(witch, cam.proj, cam.view, witch.pivot, 0);
// render end (postfx)
fx_end();

View File

@ -38,13 +38,13 @@ int main() {
glBindVertexArray(0);
// basic shader
const char *vertex_shader_src = "#version 330 core\n"
const char *vertex_shader_src = "\n"
"layout (location = 0) in vec3 aPos;\n"
"void main() {\n"
" gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);\n"
"}\0";
const char *fragment_shader_src = "#version 330 core\n"
const char *fragment_shader_src = "\n"
"out vec4 FragColor;\n"
"void main() {\n"
" FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f);\n"