Shader weavers are intimidating at first mainly because it is difficult to debug them and connections are quite confusing.
The basic idea of weaver can be learned from here. However, the code written in it is outdated... better to go with code.
Following are some weaver debugging techniques that I learned.
1. Debugging by altering the output color. ex
if(something_happens) bug=1.0; op_col.r+=bug;
2. CS flag to Disable shader cache : -cfgset=Video.ShaderManager.EnableShaderCache=false
3. CS flag to Dump shader program at %temp%\shader : -cfgfile=/config/shader-debug.cfg
4. Dump textures at %temp%\textures
a. CS flag : -plugin=bugplug b. ctrl+d c. ctrl+shift+t
5. Switching between CG/GLSL
a. simplest way is to delete the shader plugin that isn't needed. b. Disable GLSL only : -cfgset=Video.OpenGL.UseExtension.GL_ARB_shader_objects=false c. remove/edit the GLSL/CG technique in main entry weaver.
6. CS flag to check syntax error: -verbose
|<< <||> >>|