Rise
The Vieneo Province
Loading...
Searching...
No Matches
WindshieldRainRenderer.cpp
Go to the documentation of this file.
2void WindshieldRainRenderer::Update(float elapsed,float rain,const RiseMath::Vector3& acceleration,const RiseMath::Vector3& wind,
3 const std::vector<RiseMath::Matrix>& transforms,float density,bool wiping,float rainAir)
4{
5 std::vector<DirectX::XMFLOAT4X4> native(transforms.begin(),transforms.end());
6 renderer.Update(elapsed,rain,acceleration,wind,native,density,wiping,rainAir);
7}
9 const RiseMath::Matrix& viewProjection,float opacity,DepthLayout layout,float cockpitLight,ID3D11RenderTargetView* adExclusion)
10{
11 if(!device)return E_INVALIDARG;
12 if(nativeDevice.Get()!=device->Native())
13 {
14 const HRESULT hr=renderer.Initialize(device->Native());if(FAILED(hr))return hr;nativeDevice=device->Native();
15 }
16 const auto target=device->Draws().Capture();std::vector<DirectX::XMFLOAT4X4> native(world.begin(),world.end());
17 return renderer.Render(device->Context(),target.color.Get(),target.depth.Get(),target.viewport,native,viewProjection,opacity,layout,cockpitLight,adExclusion);
18}
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
DrawContext11 & Draws()
ID3D11DeviceContext * Context()
HRESULT Initialize(ID3D11Device *device, const std::filesystem::path &shaderDirectory={})
HRESULT Render(ID3D11DeviceContext *context, ID3D11RenderTargetView *target, ID3D11DepthStencilView *depth, const D3D11_VIEWPORT &viewport, const std::vector< Matrix > &world, const Matrix &viewProjection, float opacity=1, DepthLayout depthLayout=DepthLayout::Unified, float cockpitLight=0, ID3D11RenderTargetView *adExclusion=nullptr)
void Update(float elapsed, float rain, const Vector &acceleration, const Vector &relativeWind, const std::vector< Matrix > &transforms, float airDensity, bool wiping, float rainAir=0)
HRESULT Render(Rendering::RenderDevice *device, Rendering::RenderMaterial *material, const std::vector< RiseMath::Matrix > &world, const RiseMath::Matrix &viewProjection, float opacity=1, DepthLayout layout=DepthLayout::Unified, float cockpitLight=0, ID3D11RenderTargetView *adExclusion=nullptr)
Rendering::WindshieldRain11::DepthLayout DepthLayout
Rendering::WindshieldRain11 renderer
void Update(float elapsed, float rain, const RiseMath::Vector3 &acceleration, const RiseMath::Vector3 &wind, const std::vector< RiseMath::Matrix > &transforms, float density, bool wiping, float rainAir=0)
Microsoft::WRL::ComPtr< ID3D11Device > nativeDevice