You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb none Should be just copyright updates [CL 4680440 by Marcus Wassmer in Dev-Rendering branch]
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
PixelShaderUtils.cpp: Implementations of utilities for pixel shaders.
|
|
=============================================================================*/
|
|
|
|
#include "PixelShaderUtils.h"
|
|
#include "CommonRenderResources.h"
|
|
#include "RenderGraph.h"
|
|
|
|
|
|
// static
|
|
void FPixelShaderUtils::DrawFullscreenTriangle(FRHICommandList& RHICmdList, uint32 InstanceCount)
|
|
{
|
|
RHICmdList.SetStreamSource(0, GScreenRectangleVertexBuffer.VertexBufferRHI, 0);
|
|
|
|
RHICmdList.DrawIndexedPrimitive(
|
|
GScreenRectangleIndexBuffer.IndexBufferRHI,
|
|
/*BaseVertexIndex=*/ 0,
|
|
/*MinIndex=*/ 0,
|
|
/*NumVertices=*/ 3,
|
|
/*StartIndex=*/ 6,
|
|
/*NumPrimitives=*/ 1,
|
|
/*NumInstances=*/ InstanceCount);
|
|
}
|
|
|
|
// static
|
|
void FPixelShaderUtils::DrawFullscreenQuad(FRHICommandList& RHICmdList, uint32 InstanceCount)
|
|
{
|
|
RHICmdList.SetStreamSource(0, GScreenRectangleVertexBuffer.VertexBufferRHI, 0);
|
|
|
|
RHICmdList.DrawIndexedPrimitive(
|
|
GScreenRectangleIndexBuffer.IndexBufferRHI,
|
|
/*BaseVertexIndex=*/ 0,
|
|
/*MinIndex=*/ 0,
|
|
/*NumVertices=*/ 4,
|
|
/*StartIndex=*/ 0,
|
|
/*NumPrimitives=*/ 2,
|
|
/*NumInstances=*/ InstanceCount);
|
|
}
|