How to blend texture in material script?
I want to blend two png images to create ground texture, following this tutorial http://wiki.ogre3d.org/Materials#Simple_texture_transition. I want to take the dirt.png and grass.png and blend it using the terraing.png blend image.
dirt.png
grass.png
terrain.png
I'm using following material script
material GrassGround/Blend
{
technique
{
pass
{
scene_blend alpha_blend
texture_unit
{
texture dirt.png
scale 0.01 0.01
}
texture_unit
{
texture terrain.png
colour_op alpha_blend
}
texture_unit
{
texture grass.png
scale 0.01 0.01
colour_op_ex blend_current_alpha src_texture src_current
}
}
}
}
But the resulting texture is only the grass texture.
I have also noticed a note in the ogre documentation that says:
colour_op
Note
Only has an effect with the fixed-function pipeline or the RTSS: Run Time Shader System
Might that have anything to do with the fact, that the script doesn't work as I expect it to? I don't know what fixed-function pipeline or RTSS is. Can I switch it on or something? Might there be another problem?
Asked by kumpakri on 2018-10-08 09:48:24 UTC
Comments