Page 1 of 1

weird issue with vertex shader

Posted: January 14th, 2020, 6:13 am
by hello3d
Hi everyone,
I'm following Direct3D hardware series. I was trying to draw plane with hills and box in the same scene. I does work. However if I try to draw box only doesn't draw. However, I can draw plane with hills alone and with box. Strange thing is I don't change anything just comment out draw call function if I don't want to draw. When I need to draw just uncomment the code. I checked vertex shader with graphics debugger when I draw it alone its vertices 0,0,0 but without changing anything if I draw both of them it works fine.Any help appreciated. Thanks.

Re: weird issue with vertex shader

Posted: January 14th, 2020, 12:39 pm
by chili
It sounds to me like you're missing some crucial bindable with your box. When you draw with other entities those entities bind it and then it carries over to your box draw.

Sharing code over a pdf filled with screencaps is weird. Post a link to your repo on github.

Re: weird issue with vertex shader

Posted: January 14th, 2020, 7:06 pm
by hello3d
Sorry for inconvenience about pdf thing. Here is my https://github.com/Caalp/Direct3D/tree/BufferProblems github repo. I was also suspecting that what you said however, I couldn't figure out.

Re: weird issue with vertex shader

Posted: January 15th, 2020, 5:19 pm
by hello3d
Thanks Chili I looked at more closer. As you mentioned before something was missing in box shape. Problem fixed.

Re: weird issue with vertex shader

Posted: January 15th, 2020, 6:48 pm
by albinopapa
Whew, glad you figured it out.

Re: weird issue with vertex shader

Posted: January 16th, 2020, 7:55 am
by chili
Saves me the trouble of cloning :D

Eventually I'd like to have some kind of analysis in place that checks for missing bindables like this.