In this repository you will find an engine made for the subject of Advanced graphics programing with Jesus diaz as our teacher.
Before we begin I would like to talk a bit about how the properties of the objects can be observed more closely:
On the top-right corner you can find a list of all of the objects, if you were to click on them it would display its transform matrix as well as another button below that opens the list of submeshes that form the object.
Clicking on any of these would open the material properties that affect that submesh, showing all of the textures as well as some sliders to change how they affect the final outcome of the texture.
CONTROLS
-
Left mouse: while held on the render view it allows for the user to change the camera orientation
-
WASD: used for camera movement.
-
SPACE: it toggles between the regular camera and orbital camera, when it is on orbital mode it centers on (0,0,0) and allows for camera movement forward and backward.
This engine was developed from the base engine provided for the subject by me in order to be able to apply some of the techniques that were explained in class. Now I will review the techniques applied.
This is a technique for lighting that pretends to save computational power by only making lighting calculations on the fragments that will be afected by them.
This is achieved by rendering the scene onto separate images (known as GBuffer) containing information such as the albedo color, fragment position, normals...
Then those maps are used in order to compute the lighting
Here we have an example:
GBuffer images:
| Albedo buffer | Position buffer | Normals buffer | Specular buffer |
![]() |
![]() |
![]() |
![]() |
here we have the resulting image
In this engine you have the posibility of selecting to render with the "normal" method, rather known as forward shading or rendering with the deferred shading method by using these buttons on the left, you can also visualize the individual textures of the GBuffer when you are rendering with the deferred shading method
You can also control the position, color and intensity of the lights present in the scene by using the panel on the bottom-right corner of the window
The shaders files that contain this effect are map_calculation.glsl to calculate the maps for the GBuffer and deferred.glsl to calculate the lights and how they affect the scene.
This effect attempts to simulate how water reflects and refracts as well as how it distorts both of those images, here we have a comparison of how it affects a scene to have this effect on:
| Water off | Water on |
![]() |
![]() |
In this case the effect can only be turned off or on using this checkbox on the bottom-left corner
The shaders files that contain this effect are water_render.glsl to calculate the reflection and refraction maps and water_plane.glsl to actually shade the plane using the previously calculated maps.
This technique attempts to simulate depth on an object by changing the surface normals, allowing light and other effects to create detail without rendering additional geometry.
| Normal mapping off | Normal mapping on |
![]() |
![]() |
In this engine you can use the afromentioned interface in order to change how much is the normal map going to affect the normals, the higher the number the more the normals will change according to the texture
This technique is allocated on the normal calculation that we can find in the files of forward_shading.glsl and map_calculation.glsl
This technique focuses on creating a depth illusion by changing the position of the pixels when deciding its coordinates, it does it by applying some transformations according to a bump map. It is normally combined with a normal map in order to apply lighting calculations correctly onto the scene.
Here we have the three step process of applying these maps in our engine, we first apply the normals and then the bump map:
| Basic lighting | Normal mapping on | Bump mapping on |
![]() |
![]() |
![]() |
Just like the normal maps, you can change how much these calculations affect the result with the sliders mentioned previously on top of the texture showcased on the materials properties
Finally the application of this technique also means that the interaction of the surface with the surrounding objects should also change according to this new depth value added, we can find it here implemented on the engine
The calculations performed here are also part of the forward_shading.glsl and map_calculation.glsl shaders, because of the same reasons as the normal maps.



















