Advertisement

Stage did not run. No output. Pixel Shader

Started by May 01, 2019 09:35 AM
2 comments, last by romashka911 5 years, 9 months ago

Hi everybody!

After moving from XNA math to DX math, during rendering multiple objects (WorldObject instances, which have a reference to ModelClass instance as member), some objects are not drawn.  For example, i deploy 4 teapots in the world, but only 2 of them are drawn. With help of DirectX Debugger i found that when i call Render function for WorldObjects, their vertex buffers are successfully loaded into input assembler, but vertex shader's output has nothing, and pixel shader stage didn't run. Firstly, i thought that i have trouble with mapping contant buffer where matrices (world, view, projection) are held, but if it is, why are not draw only certain models? I'm confused, maybe somebody can prompt where can be issue...

Rendering chain: GameScene -> WorldObjects -> ModelClass -> ShaderClass

Attached report and source files.

ModelClass.h https://pastebin.com/wug0agt0

ModelClass.cpp https://pastebin.com/qdLneLaF

ShaderClass.h https://pastebin.com/RuY23iwM

ShaderClass.cpp https://pastebin.com/fT1Ek0TL

Structures.h https://pastebin.com/2p9tapZL

Vertex shader https://pastebin.com/LM3rVmgE

Pixel shader https://pastebin.com/JvYT4u2b

report.diagsession

 

1.png

2.png

3.png

4.png

report.diagsession

Advertisement

Solved. The problem was that i was passing D3DXMATRIX instances to Render functions via references. Maybe somebody could explain what reason figures here?

This topic is closed to new replies.

Advertisement