Advertisement

Port of Rastertek Tutorial 42 Soft Shadows showing black screen

Started by January 15, 2018 01:30 PM
2 comments, last by mister345 7 years ago

I finally ported Rastertek's tutorial # 42 on soft shadows and blur shading. This tutorial has a ton of really useful effects and there's no working version anywhere online.

Unfortunately it just draws a black screen. Not sure what's causing it. I'm guessing the camera or ortho matrix transforms are wrong, light directions, or maybe texture resources not being properly initialized.  I didnt change any of the variables though, only upgraded all types and functions DirectX3DVector3 to XMFLOAT3, and used DirectXTK for texture loading. If anyone is willing to take a look at what might be causing the black screen, maybe something pops out to you, let me know, thanks.

https://github.com/mister51213/DX11Port_SoftShadows

 

Also, for reference, here's tutorial #40 which has normal shadows but no blur, which I also ported, and it works perfectly.

https://github.com/mister51213/DX11Port_ShadowMapping

 

since your using d3d, visual studio has a graphics debugger which you could use to check all the values on the gpu, like constant buffers for example. You'd also be able to debug shaders too, to make sure your getting the values you expect within your shaders

click debug->graphics->start graphics debugger

then press the print screen button to take a snapshot of a frame. double click that frame and it'll open up the graphics debugger

Advertisement

Thanks very useful to know. I dont see the Graphics debugger in my toolbar. This old port still uses d3dcompilefromfile to compile the shader files, which have .ps and .vs extensions and they arr marked as does not participate in build. Do I need to change them to hlsl to use graphics debugger? Also w graphics debugger can I look inside an id3d11shaderresourceview pointer? Bc while debugging in visual studio you can only tell if that kind of pointer is null or not, but cannot check if the daya is garbage. Thanks again.

This topic is closed to new replies.

Advertisement