1 /*! \page shader-intro Shader Effects
4 <h2 class="pg">Introduction</h2>
6 The shader effects allow the developer to apply visual deformations on the actors.
7 They can affect the geometry, the colors and textures of the actor.
12 <h2 class="pg">Custom Shader Effects</h2>
13 The \ref Dali::ShaderEffect "ShaderEffect" lets the developers create their own shader effects by specifying the vertex and pixel shaders.
15 A custom shader effect can be created like this:
17 String myVertexShader; // This variable would contain the code for a vertex shader.
18 Dali::ShaderEffect myEffect = Dali::ShaderEffect::New( myVertexShader,
19 "" // use default pixel shader
23 The value of a uniform can be set like this:
25 // if the uniform was declared like this in the shader: uniform float myUniform;
26 myEffect.SetUniform( "myUniform", 0.5f );
29 The custom shader effect can be applied to an actor like any other shader:
31 actor.SetShaderEffect( myEffect );