Skip to content
Permalink
Browse files
Add tree tutorials
  • Loading branch information
ac7020 committed Sep 16, 2021
1 parent a30106a commit 1d38a7c98b348bc3245e356fac0974907e4d4afb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
@@ -4,7 +4,7 @@
1. [Camera and Skybox](https://github.coventry.ac.uk/ac7020/322COM_TeachingMaterial/blob/master/Session%208#Camera-and-Skybox)
2. [Animated Water](https://github.coventry.ac.uk/ac7020/322COM_TeachingMaterial/blob/master/Session%208#Animated-Water)
3. [Terran Texture](https://github.coventry.ac.uk/ac7020/322COM_TeachingMaterial/blob/master/Session%208#Terran-Texture)
4. [Multiple textures](https://github.coventry.ac.uk/ac7020/322COM_TeachingMaterial/blob/master/Session%208#Multiple-textures)
4. [2D Fractal Tree](https://github.coventry.ac.uk/ac7020/322COM_TeachingMaterial/blob/master/Session%208#2D-Fractal-Tree)

## Camera and Skybox

@@ -67,21 +67,16 @@ int i = 0;
}
```

## Terran Texture
## 2D Fractal Tree

The instruction for lab task can be found in _"Workshop 7 Instructions.pdf"_.
The instruction for lab task can be found in _"Workshop 8A Instructions.pdf"_.

You need to add texture import codes in the C++ program. The texture tutorials can be found in
https://github.coventry.ac.uk/ac7020/212CR_TeachingMaterial/tree/master/Session%204

You need to change fragment shader codes to include texture. For example
```C++
fieldTexColor = texture(grassTex, texCoordsExport);
//final color is combination of diffuse color and texture color
colorsExport = fAndBDif*fieldTexColor;
```
Final result look like this:

![TerrainTex picture](https://github.coventry.ac.uk/ac7020/322COM_TeachingMaterial/blob/master/Session%207/Readme%20Pictures/TerrainTexture.JPG)
![Tree picture](https://github.coventry.ac.uk/ac7020/322COM_TeachingMaterial/blob/master/Session%208/Readme%20Pictures/Tree.JPG)



Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1d38a7c

Please sign in to comment.