Merge remote-tracking branch 'origin/master' into 1.7
This commit is contained in:
@@ -258,6 +258,11 @@ struct DrawCall
|
||||
/// </summary>
|
||||
Float3 ObjectPosition;
|
||||
|
||||
/// <summary>
|
||||
/// Object bounding sphere radius that contains it whole (sphere at ObjectPosition).
|
||||
/// </summary>
|
||||
float ObjectRadius;
|
||||
|
||||
/// <summary>
|
||||
/// The world matrix determinant sign (used for geometry that is two sided or has inverse scale - needs to flip normal vectors and change triangles culling).
|
||||
/// </summary>
|
||||
|
||||
@@ -464,6 +464,7 @@ void GBufferPass::DrawDecals(RenderContext& renderContext, GPUTextureView* light
|
||||
transform.Scale *= decal->GetSize();
|
||||
renderContext.View.GetWorldMatrix(transform, drawCall.World);
|
||||
drawCall.ObjectPosition = drawCall.World.GetTranslation();
|
||||
drawCall.ObjectRadius = decal->GetSphere().Radius;
|
||||
|
||||
context->ResetRenderTarget();
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ PACK_STRUCT(struct HistogramData {
|
||||
GPUBuffer* HistogramPass::Render(RenderContext& renderContext, GPUTexture* colorBuffer)
|
||||
{
|
||||
auto device = GPUDevice::Instance;
|
||||
auto context = device->GetMainContext();;
|
||||
auto context = device->GetMainContext();
|
||||
if (checkIfSkipPass() || !_isSupported)
|
||||
return nullptr;
|
||||
|
||||
|
||||
@@ -855,6 +855,7 @@ DRAW:
|
||||
{
|
||||
auto& batch = BatchedDrawCalls.Get()[list.PreBatchedDrawCalls.Get()[i]];
|
||||
auto drawCall = batch.DrawCall;
|
||||
drawCall.ObjectRadius = 0.0f;
|
||||
bindParams.FirstDrawCall = &drawCall;
|
||||
const auto* instancesData = batch.Instances.Get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user