
At the core these components are plain shader files providing a set of functions e.g. These "effects" include Fixed Function transformation and lighting. The RTSS manages a set of opaque isolated components (SubRenderStates) where each implements a specific effect. Srs-> setParameter( "texture", "Default_normal.jpg") In case you need to set the properties programmatically, see the following example for how the script is mapped to the API.

Number of the custom shader parameter that controls the operation One of src1_modulate, src2_modulate, src1_inverse_modulate, src2_inverse_modulate One of default, normal, lighten, darken, multiply, average, add, subtract, difference, negation, exclusion, screen, overlay, hard_light, soft_light, color_dodge, color_burn, linear_dodge, linear_burn, linear_light, vivid_light, pin_light, hard_mix, reflect, glow, phoenix, saturation, color, luminosityĪpply custom modulate effect to texture layer Format: source_modifier custom Example: source_modifier src1_inverse_modulate custom 2 Note only applicable inside a texture_unit section Parameters operation Here are the attributes you can use in a rtshader_system block of a pass :Īpply photoshop-like blend effects to texture layers Format: layered_blend Example: layered_blend luminosity Note only applicable inside a texture_unit section Parameters effect For more examples see Media/RTShaderLib/materials/RTShaderSystem.material. To modify the default lighting stage see below. To request per-pixel lighting, you would add the following block to a pass: To enable features that go beyond the possibilities of the FFP, you have to define an additional rtshader_system block with the respective properties.įor instance, the FFP only allows per-vertex lighting. Unlike hand written shader code, which may require many adjustments to be plugged into your own shader code, using the extensions library requires minimum changes.įor fixed function function properties, the RTSS will read the standard pass and texture_unit definitions, so no changes are required.
#Feral heart ogre engine code


The Run Time Shader System or RTSS for short is the Ogre way of managing Shaders and their variations. While GPU Program Scripts offer you maximal control and flexibility over how your objects are rendered, writing and maintaining them is also a very time consuming task. Meaning you can only render objects using shaders. With D3D11 and G元, support for fixed pipeline functionality was removed.
