Rise
The Vieneo Province
Loading...
Searching...
No Matches
ExteriorRainRenderer.cpp
Go to the documentation of this file.
2void ExteriorRainRenderer::Update(float elapsed,const ExteriorRain::Parameters& source,const RiseMath::Matrix& localToWorld)
3{
5 value.intensity=source.intensity;value.precipitation=source.precipitation;value.snow=source.snow;
6 value.airDensityKgM3=source.airDensityKgM3;value.gravityMs2=source.gravityMs2;
7 value.groundVelocity=source.groundVelocity;value.wind=source.wind;value.upWorld=source.upWorld;value.angularVelocity=source.angularVelocity;
8 value.sunlight={source.sunlight.r,source.sunlight.g,source.sunlight.b,source.sunlight.a};
9 value.headlightCount=(std::min)(source.headlightCount,2u);
10 for(unsigned i=0;i<value.headlightCount;++i)
11 {
12 const auto& lamp=source.headlights[i];auto& target=value.headlights[i];
13 target.color={lamp.color.r,lamp.color.g,lamp.color.b,lamp.color.a};
14 target.position=lamp.position;target.direction=lamp.direction;target.range=lamp.range;
15 target.up=lamp.up;target.profile=lamp.profile;target.extinctionPerKm=lamp.extinctionPerKm;
16 }
17 renderer.Update(elapsed,value,localToWorld);
18}
20{
21 if(!device)return E_INVALIDARG;const auto& fixed=device->Draws().Fixed();
22 return renderer.Render(device->Context(),device->Owner().SceneTarget(),device->Owner().Depth(),device->Draws().Viewport(),fixed.view,fixed.projection,clouds);
23}
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
Rendering::ExteriorRain11 renderer
HRESULT Render(Rendering::RenderDevice *device, Rendering::CloudRenderer11 *clouds=nullptr)
void Update(float elapsed, const ExteriorRain::Parameters &parameters, const RiseMath::Matrix &localToWorld)
ID3D11RenderTargetView * SceneTarget() const
Definition Device11.h:68
const SceneDepth11 & Depth() const
Definition Device11.h:70
const D3D11_VIEWPORT & Viewport() const
FixedState11 & Fixed()
ExteriorRain::BasicParameters< Vector, Color > Parameters
HRESULT Render(ID3D11DeviceContext *context, ID3D11RenderTargetView *scene, const SceneDepth11 &depth, const D3D11_VIEWPORT &viewport, const Matrix &view, const Matrix &projection, CloudRenderer11 *clouds=nullptr)
void Update(float elapsed, const Parameters &parameters, const Matrix &localToWorld)
DrawContext11 & Draws()
ID3D11DeviceContext * Context()
BasicParameters< RiseMath::Vector3, RiseMath::Color > Parameters
Definition ExteriorRain.h:7