Game Development Reference
In-Depth Information
There's more...
If we try the recipe with the unshaded material definition for the sky, it will work well in
most cases. However, when it comes to the postprocessor water filter, it will not pick up the
sky color properly. To achieve this, we will have to make some modifications to its materi-
al. We don't need to actually change any of the .vert or .frag files, but can create a
new Material Definition (.j3md) file.
To make things as easy as possible, we can copy the Unshaded.j3md file. Refer to the
following code within the Unshaded.j3md file:
VertexShader GLSL100: Common/MatDefs/Misc/Unshaded.vert
Replace the previous line with the following line:
VertexShader GLSL100: Common/MatDefs/Misc/Sky.vert
This means we'll be using the vertex shader normally used by the Sky material to handle
the positions of the vertices for the renderer.
We also need to change the WorldParameters segment to contain the following:
ViewMatrix
ProjectionMatrix
WorldMatrix
Search WWH ::




Custom Search