Add support for main view information in Surface materials during subpass rendering (eg. shadow depth)
This commit is contained in:
@@ -24,6 +24,8 @@ PACK_STRUCT(struct ForwardMaterialShaderData {
|
||||
Matrix ViewMatrix;
|
||||
Matrix PrevViewProjectionMatrix;
|
||||
Matrix PrevWorldMatrix;
|
||||
Matrix MainViewProjectionMatrix;
|
||||
Float4 MainScreenSize;
|
||||
Float3 ViewPos;
|
||||
float ViewFar;
|
||||
Float3 ViewDir;
|
||||
@@ -94,6 +96,8 @@ void ForwardMaterialShader::Bind(BindParameters& params)
|
||||
Matrix::Transpose(view.View, materialData->ViewMatrix);
|
||||
Matrix::Transpose(drawCall.Surface.PrevWorld, materialData->PrevWorldMatrix);
|
||||
Matrix::Transpose(view.PrevViewProjection, materialData->PrevViewProjectionMatrix);
|
||||
Matrix::Transpose(view.MainViewProjection, materialData->MainViewProjectionMatrix);
|
||||
materialData->MainScreenSize = view.MainScreenSize;
|
||||
materialData->ViewPos = view.Position;
|
||||
materialData->ViewFar = view.Far;
|
||||
materialData->ViewDir = view.Direction;
|
||||
|
||||
Reference in New Issue
Block a user