Hey Jeff,
I’m glad you are putting the Dynamic Shader to use. The DS works by using composite images (one of your art and the other the normal map) so when you stop the DS the composite image (in this case the shaded image) “freezes” where it is. With the DS stopped, the image will not be updated to reflect changes in positioning, rotation or lighting, however it will keep the shading effect from the moment the DS was stopped.
To return to a non-shaded object you have to remove the object from the DS via removeObject( )
[lua]
shader.removeObject( object ) – remove object to the Dynamic Shader
[/lua]
You then have to use addObject( ) to return the object to the DS after adding the object.shadeInfo again.
[lua]
-----add shaderInfo table to object------
object.shaderInfo = { – create the object.shaderInfo table
name = “object”, – optional parameter - gives the object a name or the shader will assign one
map1 = “art/object.png”, – reference the image file
map2 = “art/object_n.png” – refernece the normal map file
}
shader.addObject( object ) – add object to the Dynamic Shader
[/lua]
I’ve been thinking of adding an “object pause” or something like
[lua]
object.shaderInfo.pause = true
[/lua]
which would preserve the object.shaderInfo table but otherwise remove the object from the DS until object.shaderInfo.pause = false.
Would something like that be useful?
As for the slowdown in older devices, were you using physics objects? I’m thinking physics objects or old OpenGL processors could account for the slowdown. It could also be that there is a lot of number crunching going on every frame, I was just surprised to hear that a 5s had slowdown trouble. Keep on playing with the plugin and let me know how it goes, thanks Jeff!
Jonathan