Closed Gaetz closed 9 months ago
Yes, some of the changes are not strictly related to the chapter - we should have probably added them to chapter 1 as a starting point. I admit it's a bit hard to isolate the code that is purely related to the chapter. However I think we highlighted most (if not all) of the relevant code for chapter 2 in the book. There might be some lines missing to avoid making the code too long or verbose, but it should provide a good guide to isolate the intended changes.
These boil down to:
[TAG: BINDLESS]
(although not in the shaders). Most of the code is in gpu_device.cpp
and, for the shaders, the main change of note is the use of the nonuniformEXT
qualifier. There is also some plumbing - i.e. passing the index of the material textures instead of the textures themselves for a draw. You can follow the changes made to the MeshDraw
structure for this aspect.spirv_parser.h/cpp
. For the actual usage, you can find it here and here, where we create the descriptor set layout from the reflected data.Hope this helps, let us know if you have any further questions!
Ok, thank you very much. I code-compared chapter 2 and 1 and reintegrated changes.
Hello, I am using your book, and comparing chapter 1's and 2's code, I have spotted a lot of differences, not directly linked with chapter's 2 content.
I can see the lighting changed, and there is mipmap support. Would it be possible to get a list of intended changes so that I can understand the code by comparing it ?