Shader Weaver

2013-09-26

Shader Weaver

Permalink 05:12:14 am, Categories: Weaver  

Hello,

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

-Naman

Trackback address for this post:

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Comments, Trackbacks, Pingbacks:

No Comments/Trackbacks/Pingbacks for this post yet...

Comments are not allowed from anonymous visitors.

July 2017
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

Search

Categories

Misc

XML Feeds

What is this?

powered by
b2evolution