Thanks for that - much appreciated. Hope you enjoy....
Viewing post in CopperCube - upgraded API's v2 comments
I tried it out, it's great, but it realized that using the custom binary for the shader is more optimised than using the action
Also,can you help me with how to progressively increase the value of the shaders intensity(like animatedly)justice in your video?
Secondly, can I access the aurora with the custom binary instead of action since the action seems to reduce my fps to about 24,which is bad
To increase the value - just setup a javascript variable initially as 0, and every few ms (maybe 100) add to that variable from 0-1 or up to what maximum amount you want.
The Aurora effect is the most demanding of all the post processing shaders - I had lower frame rate with this also so its a limitations it seems unless you want to adjust how it runs and see if it looks ok. I cant improve it much beyond what it is already and unable to include into my compiled binary as the info is too much for CC default shader model 2.0 to use. Maybe one day I might work out how to increase it from shader model 2.0 to like 5.0 I think is the max for DX9.
on before start
var PP = 0;
var Root = ccbGetRootSceneNode();
ccbSetSceneNodeProperty(Root, "DreamOn", true);
ccbSetSceneNodeProperty(Root, "Dream", 0);
on every 100ms
PP += 0.01;
ccbSetSceneNodeProperty(Root, "Dream", PP);
You setup a variable before start as 0 and then update every few ms or whenever you click etc (up to you) in the range of 0 to 1 and apply that For 2D overlays: use 'ccbSetSceneNodeProperty" and property type 'Image Alpha' - ie something like:
ccbSetSceneNodeProperty(node, "Image Alpha", 0-1);
For 3D statiuc mesh use:
ccbSetTransparency3D(node, 0-1);
if you are already using 'Transparent Alpha' material you can also instead just adjust Param1 (0-1) also.
Thanks, what about crouch(change collision shape) for fps cam, when you press E the second time the camera just snaps back to top instead of animatedly just like when you press E firstly and fps cam crouches, is there a fix for that
Also is there a way to disable PP shaders during runtime with js code
If you want to slowly bring back the player from crouch, you will have to adjust its shape over time so that happen as you like more slowly.
To turn off PP shaders (binary method) just set 'Shader_nameOn' to false but with the Action method just set the main variables adjust to 0 and it will not run then -ie for Chromatic abberation, set: Chroma = 0;