| |||
| Home > The Shader Development Studio > Creating a new Shader effect > Creating a new Shader Configuration File | |||
This section describes how to create a shader configuration file. The configuration file is required to link the fragment shader and vertex shader source files together to produce an overall effect. The shader configuration file configures the type of effect that is produced.
To create a new shader configuration file:
Right-click on the SimpleTest project in the Package Explorer pane and select New → Shader Configuration.
The Shader Configuration dialog box is displayed.
Click SimpleTest.
Click Finish.
The Shader Configuration file (named shaders.shaderconfig)
is created in the SimpleTest project and
the Shader Configuration Editor pane is displayed.
See Figure 3.6:
For more information about the shader configuration editor, see Shader Configuration editor.
The shader configuration editor enables you to manage shader effects for a project. A default effect, called New Effect, is created when the shader configuration is created. The default effect is used for this example.
The shader configuration editor separates vertex and fragment shaders into two lists. You can add any source file in the project to these lists. This enables utility shader sources, that are neither specifically vertex or fragment shader sources, to be reused.
Click Add Shader in the Vertex Shaders section.
The Resource Selection dialog box is displayed.
Click the + icon next to SimpleTest and then click the src folder. See Figure Figure 3.7:
Click the check box next to simple.vert.
The vertex shader source is added to the effect.
To add a shader to the Fragment shader section:
Click Add Shader in the Fragment Shaders section.
Click the + icon next to SimpleTest and then click the src folder.
Click simple.frag in the Resource Selection dialog box.
Click OK.
The Shader Configuration Editor contains the shaders. See Figure 3.8:
Select File → Save to save the configuration.
You have created your first shader effect called New Effect.
Eclipse displays warning messages in the Problems pane when the shader effect is created. These warnings are a result of uninitiated uniform and attribute variables in the shader programs. These can be ignored and eventually disappear after completing the Rendering the shader effect section.