-~~~~
-
-## Shaders {#shaders}
-
-The shader section of the JSON file defines a library of shader effect
-instances that are created on demand.
-
-The shaders are referred to by name from the template, style, stage or
-animation sections.
-
-Multiple actors can set the same shader as the name refers to a single
-instance.
-
-Similarly one named shader instance can be set to several actors and can
-be animated by one animation.
-
-~~~~
- { //
- "shader-effects": // Shader Effect section
- { //
- "myshader1": // Shader instance name
- { //
- "program": //
- { // Prefixs are placed before DALi uniforms.
- "vertexPrefix": "", // (Useful for \#defines.)
- "vertex":"", // Glsl vertex program
- "fragmentPrefix": "",
- "fragment": "", // Glsl fragment program.
- "geometry-type": "GEOMETRY_TYPE_IMAGE", // Geometry type(see DALi documentation)
- },
- "geometry-hints": "HINT_NONE": // Geometry hints (see DALi documentation)
- "grid-density": 0, // Grid density(see DALi documentation)
- "image":
- {
- "filename": "" // Effect image available as a second texture unit.
- }
- },
- ...
- },
- "stage":
- [{
- "type": "ImageActor",
- "effect": "myshader1",
- ...
- }]
- }
-~~~~