Update examples

This commit is contained in:
jakub-swiniarski 2024-02-07 11:03:56 +01:00
commit 8b3959d974
14 changed files with 6413 additions and 662 deletions

View file

@ -50,6 +50,7 @@ int main(void)
camera.target = (Vector3){ 0.0f, 0.5f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load plane model from a generated mesh

View file

@ -92,6 +92,7 @@ int main()
camera.target = (Vector3){ 0.0f, 0.5f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load PBR shader and setup all required locations

View file

@ -46,6 +46,7 @@ int main(void)
camera.target = (Vector3){ 0.0f, 1.5f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
Model model = LoadModel("resources/models/barracks.obj"); // Load OBJ model
@ -126,4 +127,4 @@ int main(void)
//--------------------------------------------------------------------------------------
return 0;
}
}

View file

@ -69,6 +69,7 @@ int main(void)
camera.target = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 60.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load plane model from a generated mesh

View file

@ -50,6 +50,7 @@ int main(void)
camera.target = (Vector3){ 0.0f, 0.5f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load models and texture

View file

@ -80,6 +80,7 @@ int main(void)
.target = (Vector3){ 0.0f, 0.5f, 0.0f }, // Camera looking at point
.up = (Vector3){ 0.0f, 1.0f, 0.0f }, // Camera up vector (rotation towards target)
.fovy = 45.0f, // Camera field-of-view Y
.sensitivity = 0.003f, // Camera sensitivity
.projection = CAMERA_PERSPECTIVE // Camera projection type
};
@ -205,4 +206,4 @@ void UnloadRenderTextureDepthTex(RenderTexture2D target)
// queried and deleted before deleting framebuffer
rlUnloadFramebuffer(target.id);
}
}
}

View file

@ -50,6 +50,7 @@ int main(void)
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
Mesh mesh = GenMeshPlane((float)MAP_SIZE, (float)MAP_SIZE, 1, 1);

View file

@ -48,6 +48,7 @@ int main(void)
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Define mesh to be instanced

View file

@ -46,6 +46,7 @@ int main(void)
camera.target = (Vector3){ 0.0f, 1.0f, -1.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
Model model = LoadModel("resources/models/watermill.obj"); // Load OBJ model
@ -104,4 +105,4 @@ int main(void)
//--------------------------------------------------------------------------------------
return 0;
}
}

View file

@ -80,6 +80,7 @@ int main(void)
camera.target = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
Model model = LoadModel("resources/models/church.obj"); // Load OBJ model

View file

@ -40,6 +40,7 @@ int main(void)
camera.target = (Vector3){ 0.0f, 0.0f, 0.7f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 65.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load raymarching shader

View file

@ -47,6 +47,7 @@ int main(void)
camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Define our three models to show the shader on

View file

@ -39,6 +39,7 @@ int main(void)
camera.target = (Vector3){ 0.0f, 0.5f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.sensitivity = 0.003f; // Camera sensitivity
camera.projection = CAMERA_PERSPECTIVE; // Camera projection type
// Load a cube model

View file

@ -56,6 +56,7 @@ int main(void)
.target = (Vector3){ 0.0f, 0.5f, 0.0f }, // Camera looking at point
.up = (Vector3){ 0.0f, 1.0f, 0.0f }, // Camera up vector (rotation towards target)
.fovy = 45.0f, // Camera field-of-view Y
.sensitivity = 0.003f, // Camera sensitivity
.projection = CAMERA_PERSPECTIVE // Camera projection type
};
@ -164,4 +165,4 @@ void UnloadRenderTextureDepthTex(RenderTexture2D target)
// queried and deleted before deleting framebuffer
rlUnloadFramebuffer(target.id);
}
}
}