4 std::vector<Rendering::CloudRenderer11::Headlight> native;native.reserve(lights.size());
5 for(
const auto& light:lights)native.push_back({light.position,light.direction,{light.color.r,light.color.g,light.color.b,light.color.a},light.rangeKm,light.up,light.profile,light.extinctionPerKm});
13 if(!device)
return E_INVALIDARG;
15 eye,parameters,sunlight,{light.r,light.g,light.b,light.a},{ambient.r,ambient.g,ambient.b,ambient.a},
16 {airglow.r,airglow.g,airglow.b,airglow.a},horizon,atmosphere,nightVisionGain);
21 if(!device || !atmosphere || !vertices)
return E_INVALIDARG;
29 if(!device)
return E_INVALIDARG;
const auto state=device->
Capture();
if(!state.vertices)
return E_UNEXPECTED;
30 Microsoft::WRL::ComPtr<ID3D11Buffer> buffer;
const HRESULT hr=state.vertices->Geometry().NativeBuffer(device->
Context(),&buffer);
if(FAILED(hr))
return hr;
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
Rendering::CloudRenderer11 renderer
HRESULT RenderRain(Rendering::RenderDevice *device, const RiseMath::Matrix &world, UINT drops)
void SetHeadlights(const std::vector< Headlight > &lights)
HRESULT RenderSkyRing(Rendering::RenderDevice *device, Rendering::RenderTexture *atmosphere, Rendering::RenderBuffer *vertices, const RiseMath::Matrix &world, UINT segments, float physicalScale=1)
HRESULT Render(Rendering::RenderDevice *device, const RiseMath::Matrix &view, const RiseMath::Matrix &projection, const RiseMath::Vector3 &eye, const CloudVolume::Parameters ¶meters, const RiseMath::Vector3 &sunlight, const RiseMath::Color &light, const RiseMath::Color &ambient, const RiseMath::Color &airglow=RiseMath::Color(.125f,.375f,.25f, 1), const RiseMath::Vector4 &horizon=RiseMath::Vector4(0, 0, 0, 0), const RiseMath::Vector4 &atmosphere=RiseMath::Vector4(0, 0, 0, 0), const RiseMath::Vector4 &nightVisionGain=RiseMath::Vector4(1, 1, 1, 0))
HRESULT RenderRainLines(ID3D11DeviceContext *context, Parameters11 ¶meters, ID3D11RenderTargetView *scene, const SceneDepth11 &depth, const D3D11_VIEWPORT &viewport, ID3D11Buffer *vertices, const DirectX::XMFLOAT4X4 &world, UINT drops)
HRESULT RenderSkyRing(ID3D11DeviceContext *context, Parameters11 ¶meters, ID3D11RenderTargetView *scene, const SceneDepth11 &depth, const D3D11_VIEWPORT &viewport, ID3D11ShaderResourceView *atmosphere, ID3D11Buffer *vertices, const DirectX::XMFLOAT4X4 &world, UINT segments, float physicalScale)
HRESULT Render(ID3D11DeviceContext *context, ID3D11RenderTargetView *scene, const SceneDepth11 &depth, const D3D11_VIEWPORT &viewport, const Matrix &view, const Matrix &projection, const Vector &planetEye, const CloudVolume::Parameters ¶ms, const Vector &sunlight, const Color &light, const Color &ambient, const Color &airglow=Color(.125f,.375f,.25f, 1), const Color &horizonHaze=Color(0, 0, 0, 0), const Color &atmosphereHaze=Color(0, 0, 0, 0), const Color &nightVisionGain=Color(1, 1, 1, 0))
void SetHeadlights(const std::vector< Headlight > &lights)
const Parameters11 & Parameters() const
ID3D11RenderTargetView * SceneTarget() const
const SceneDepth11 & Depth() const
const D3D11_VIEWPORT & Viewport() const
HRESULT NativeBuffer(ID3D11DeviceContext *context, ID3D11Buffer **result)
ID3D11DeviceContext * Context()
ID3D11ShaderResourceView * View() const