hi everyone, im first this forum
i tried debugging pixelshader in irrlicht 1.5
irrlicht make "irr_d3d9_dbg_hlsl_~.vsh"
...ok, then... where "irr_d3d9_dbg_hlsl_~.psh"??
finally, i found CD3D9HLSLMaterialRenderer.cpp
it don't make "irr_d3d9_dbg_hlsl_~.psh"
this topic discussed previously? i cant find..
[fixed]Pixelshader debug problem..
-
NewerCookie
- Posts: 20
- Joined: Sat Jan 10, 2009 12:53 pm
[fixed]Pixelshader debug problem..
I hope you understand my poor english.
If i used wrong sentence, notify me.
If i used wrong sentence, notify me.
-
NewerCookie
- Posts: 20
- Joined: Sat Jan 10, 2009 12:53 pm
i have been wait reply.. nothing 
anyway, i fixed it. code below..
patch file here : http://www.mediafire.com/?jzo0gmtuogr
anyway, i fixed it. code below..
patch file here : http://www.mediafire.com/?jzo0gmtuogr
Code: Select all
#ifdef _IRR_D3D_NO_SHADER_DEBUGGING
HRESULT h = stubD3DXCompileShader(
pixelShaderProgram,
strlen(pixelShaderProgram),
0, // macros
0, // no includes
shaderEntryPointName,
shaderTargetName,
0, // no flags (D3DXSHADER_DEBUG)
&buffer,
&errors,
&PSConstantsTable);
#else
// compile shader and emitt some debug informations to
// make it possible to debug the shader in visual studio
static int irr_dbg_hlsl_file_nr = 0;
++irr_dbg_hlsl_file_nr;
char tmp[32];
sprintf(tmp, "irr_d3d9_dbg_hlsl_%d.psh", irr_dbg_hlsl_file_nr);
FILE* f = fopen(tmp, "wb");
fwrite(pixelShaderProgram, strlen(pixelShaderProgram), 1, f);
fflush(f);
fclose(f);
HRESULT h = stubD3DXCompileShaderFromFile(
tmp,
0, // macros
0, // no includes
shaderEntryPointName,
shaderTargetName,
D3DXSHADER_DEBUG | D3DXSHADER_SKIPOPTIMIZATION,
&buffer,
&errors,
&PSConstantsTable);
#endifI hope you understand my poor english.
If i used wrong sentence, notify me.
If i used wrong sentence, notify me.
-
NewerCookie
- Posts: 20
- Joined: Sat Jan 10, 2009 12:53 pm
-
NewerCookie
- Posts: 20
- Joined: Sat Jan 10, 2009 12:53 pm
I don't understand you or not.. I don't know 
Sorry, I have poor english
Simply, my question is
Why don't irrlicht make "Psh" files in "CD3D9HLSLMaterialRenderer.cpp"
Even if i undef "_IRR_D3D_NO_SHADER_DEBUGGING", irrlicht make just "Vsh" file only
Sorry, I have poor english
Simply, my question is
Why don't irrlicht make "Psh" files in "CD3D9HLSLMaterialRenderer.cpp"
Even if i undef "_IRR_D3D_NO_SHADER_DEBUGGING", irrlicht make just "Vsh" file only
I hope you understand my poor english.
If i used wrong sentence, notify me.
If i used wrong sentence, notify me.
-
NewerCookie
- Posts: 20
- Joined: Sat Jan 10, 2009 12:53 pm