Added code for "Encapsulating Shaders" part of the tutorial series

This commit adds the code for the 4th part of the tutorial series
“Encapsulating Shaders”