Refactor material shaders to use separate constant buffer (slot 1) for shared per-view constants

This commit is contained in:
Wojtek Figat
2022-11-27 12:06:31 +01:00
parent 189575efec
commit 835a230323
26 changed files with 92 additions and 194 deletions

View File

@@ -104,6 +104,7 @@ void Skybox::ApplySky(GPUContext* context, RenderContext& renderContext, const M
drawCall.WorldDeterminantSign = Math::FloatSelect(world.RotDeterminant(), 1, -1);
drawCall.PerInstanceRandom = GetPerInstanceRandom();
MaterialBase::BindParameters bindParams(context, renderContext, drawCall);
bindParams.BindViewData();
// Check if use custom material
if (CustomMaterial)