LearnOpenGL.FSharp Save

Exercises based on the https://learnopengl.com/ tutorials, using F# and Silk.NET as the OpenGL wrapper.

Project README

LearnOpenGL.FSharp

Exercises based on the https://learnopengl.com/ tutorials, using F# and SILK.NET as the OpenGL wrapper. Each title that has a link is pointing to the original chapter from the learnopengl.com site, in which the theory is explained and all of the math is being copied from.

This repo can be useful if you are following the excelent tutorials on your own and get stuck on some of them (pointer manipulation is a bitch), but please note that this code is not supposed to set any guideline about how you should structure your own projects. It´s just the result of me trying to learn OpenGL, F#, FRP and functional programming in general, so expect the code to be suboptimal at best.

Also note that the 'Galante' library i wrote here is just a set of helpers i needed along the way and will need a complete refactor once i have a better understanding about OpenGl, but that´s not likely to happen within this repo.

From exercise 47 and onward, DearImGui is used to display an informative overlay, but this seems to be working only in my PC for some reason. I don't know what's going on (might be driver related) but I'll try to get it to work properly.

Table of contents

Getting started

Hello window

01_Window

Hello triangle + Shaders

02_Triangle

03_Quad

Textures

04_Quad_Texture

05_Quad_Texture_Colored

06_Quad_Texture_Double

Transformations

07_Transformations

This one looks kind of weird because the images are not centered vertically, the intention is to be forced to realize that rotations in OpenGL are calculated taking the origin as the rotation center (and not the object's center) and if a rotation of an object is needed around itself, then said object must be translated to the origin, rotated and then translated back to it's initial position, which may be somewhat counterintuitive.

Coordinate systems

08_Coordinate_Systems_Perspective

09_Coordinate_Systems_Cube

10_Coordinate_Systems_Cube_With_Depth_Testing

11_Coordinate_Systems_Many_Cubes

Camera

12_Camera_Automove

13_Camera_Walk_Around_With_Inputs

W forward | A left | S back | D right | SHIFT_LEFT down | SPACEBAR up | MOUSE_MOVE for camera | MOUSE_WHEEL zoom in/out

Lighting

Colors

14_A_Lighting_Scene

Basic Lighting

15_Phong_Ambient_Lighting

16_Phong_Diffuse_Lighting

17_Phong_Specular_Lighting

Note how the reflection of the light moves on each face of the cube when the camera moves.

Materials

18_Setting_Materials

19_Light_Properties

20_Different_Light_Colors

Lighting maps

21_Diffuse_Maps

22_Specular_Maps

23_Emission_Maps

Light casters

24_Directional_Light

25_Point_Light

Note that although this light source looks similar as in the previous examples, this time it's not reaching the objects that are too far away from it, giving a more realisting feel to the source.

26_Spotlight

Multiple lights

27_Multiple_Lights

Model loading

Model loading

28_Model_Loading

Advanced OpenGL

Depth testing

29_Visualizing_The_Depth_Buffer

Stencil testing

30_Stencil_Testing

Blending

31_Discarding_Fragments

32_Blending

Face culling

33_Face_Culling

Only half of the faces are rendered. For demonstration purposes, the front faces were removed this time.

Framebuffers

34_Rendering_To_A_Texture

35_PostProcessing_Kernel_Effects

Cubemaps

36_Skybox

37_Reflection

38_Refraction

Advanced data

No visual representation.

Advanced GLSL

39_Vertex_Shader_Variables

40_Fragment_Shader_Variables

41_Uniform_Buffer_Objects

Geometry shader

42_Building_Houses

43_Exploding_Objects

44_Visualizing_Normal_Vectors

Instancing

45_Instancing

Rendering 100.000 asteroids went from 4 FPS to 80+ FPS when started using the instanced model matrix array.

Anti aliasing

46_Antialiasing

Advanced lighting

Advanced lighting

47_Blinn_Phong

Gamma Correction

48_Gamma_Correction

Shadow mapping

49_Shadow_Mapping

Point shadows

50_Point_Shadows

50_Point_Shadows_MJYPqhwRcr

Normal mapping

51_Normal_Mapping

ezgif-5-987bcc8c2a

Parallax mapping

52_Parallax_Mapping

52_Parallax_Mapping_kjBTyTKLka

HDR

Coming soon.

Bloom

Coming soon.

Deferred Shading

Coming soon.

SSAO

Coming soon.

PBR

Lighting

Coming soon.

IBL - Image Based Lighting - Diffuse irradiance

Coming soon.

IBL - Image Based Lighting - Specular IBL

Coming soon.

In practice

Coming soon.

Open Source Agenda is not affiliated with "LearnOpenGL.FSharp" Project. README Source: Agnael/LearnOpenGL.FSharp
Stars
50
Open Issues
0
Last Commit
11 months ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating