27 void AddGlass(
int component,
const Vertex* vertices,
size_t count);
28 void AddWiper(
int component,
const Vertex* vertices,
size_t count);
30 void Update(
float elapsed,
float rain,
const Vector& acceleration,
const Vector& relativeWind,
31 const std::vector<Matrix>& transforms,
float airDensity,
bool wiping,
float rainAir=0);
32 HRESULT Render(ID3D11DeviceContext* context,ID3D11RenderTargetView* target,
33 ID3D11DepthStencilView* depth,
const D3D11_VIEWPORT& viewport,
34 const std::vector<Matrix>& world,
const Matrix& viewProjection,
float opacity=1,
36 ID3D11RenderTargetView* adExclusion=
nullptr);
45 Microsoft::WRL::ComPtr<ID3D11Texture2D>
texture;
46 Microsoft::WRL::ComPtr<ID3D11ShaderResourceView>
srv;
47 Microsoft::WRL::ComPtr<ID3D11RenderTargetView>
rtv;
64 HRESULT CreateImage(
Image& image,UINT width,UINT height,DXGI_FORMAT format,
bool dynamic=
false,DXGI_SAMPLE_DESC samples={1,0});
73 std::vector<WindshieldRain::Surface::BeadSample>
beadUpload;
74 std::vector<WindshieldRain::Surface::WakeSample>
wakeUpload;
76 Microsoft::WRL::ComPtr<ID3D11Device>
device;
77 Microsoft::WRL::ComPtr<ID3DDeviceContextState>
isolated;
80 std::vector<Microsoft::WRL::ComPtr<ID3D11SamplerState>>
samplers;
88 std::string
status=
"native windshield rain not initialized";
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
Program11 damageWithAdMask
void SetSimulator(bool value)
std::vector< Microsoft::WRL::ComPtr< ID3D11SamplerState > > samplers
Microsoft::WRL::ComPtr< ID3D11Device > device
std::vector< Wiper > wipers
const std::string & Status() const
Program11 visibilityProgram
HRESULT Initialize(ID3D11Device *device, const std::filesystem::path &shaderDirectory={})
std::vector< WindshieldRain::Surface::BeadSample > beadUpload
HRESULT CreateImage(Image &image, UINT width, UINT height, DXGI_FORMAT format, bool dynamic=false, DXGI_SAMPLE_DESC samples={1, 0})
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 SetGlassCondition(int condition)
static Matrix ToPhysicsTransform(const Matrix &cockpitToView)
Microsoft::WRL::ComPtr< ID3DDeviceContextState > isolated
Microsoft::WRL::ComPtr< ID3D11BlendState > alphaWithAdMask
friend struct WindshieldRain11TestAccess
std::vector< float > distanceUpload
D3D11_TEXTURE2D_DESC targetDescription
DXGI_FORMAT visibilityFormat
std::vector< WindshieldRain::Surface::WakeSample > wakeUpload
HRESULT PrepareTargets(const D3D11_TEXTURE2D_DESC &description)
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > worldDepth
void Update(float elapsed, float rain, const Vector &acceleration, const Vector &relativeWind, const std::vector< Matrix > &transforms, float airDensity, bool wiping, float rainAir=0)
static WindshieldRain::Point ProjectAcceleration(const Vector &acceleration, const Matrix &inverse, const Vector &normal, const Vector &u, const Vector &v)
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > cockpitDepth
std::vector< uint32_t > filmUpload
std::vector< Matrix > previousTransforms
void AddWiper(int component, const Vertex *vertices, size_t count)
void AddGlass(int component, const Vertex *vertices, size_t count)
HRESULT Upload(ID3D11DeviceContext *context, Pane &pane)
Microsoft::WRL::ComPtr< ID3D11BlendState > alpha
std::vector< Pane > panes
Program11 waterWithAdMask
DirectX::XMFLOAT4X4 Matrix
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > unifiedDepth
Microsoft::WRL::ComPtr< ID3D11DepthStencilState > noDepth
Microsoft::WRL::ComPtr< ID3D11BlendState > opaque
DirectX::XMFLOAT4X4 Matrix
Microsoft::WRL::ComPtr< ID3D11Texture2D > texture
Microsoft::WRL::ComPtr< ID3D11RenderTargetView > rtv
Microsoft::WRL::ComPtr< ID3D11ShaderResourceView > srv
std::vector< Facet > facets
std::vector< WindshieldFractures::Segment > fractureNetwork
WindshieldRain::Surface water
uint64_t uploadedRevision
Microsoft::WRL::ComPtr< ID3D11Buffer > geometry
std::vector< Vertex > vertices
std::vector< Vertex > vertices