Skip to content

Commit

Permalink
Fixed crash with volumetric fog
Browse files Browse the repository at this point in the history
  • Loading branch information
qweasdd136963 committed Sep 26, 2018
1 parent 0dd7254 commit ef4002a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
15 changes: 11 additions & 4 deletions src/Layers/xrRenderDX10/3DFluid/dx103DFluidData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@

namespace
{
const xr_token simulation_type_token[] = {{"Fog", dx103DFluidData::ST_FOG}, {"Fire", dx103DFluidData::ST_FIRE}, {0, 0}};
const xr_token simulation_type_token[] = {
{"Fog", dx103DFluidData::ST_FOG},
{"Fire", dx103DFluidData::ST_FIRE},
{0, 0}
};

const xr_token emitter_type_token[] = {{"SimpleGaussian", dx103DFluidEmitters::ET_SimpleGausian},
{"SimpleDraught", dx103DFluidEmitters::ET_SimpleDraught}, {0, 0}};
const xr_token emitter_type_token[] = {
{"SimpleGaussian", dx103DFluidEmitters::ET_SimpleGausian},
{"SimpleDraught", dx103DFluidEmitters::ET_SimpleDraught},
{0, 0}
};
}

DXGI_FORMAT dx103DFluidData::m_VPRenderTargetFormats[VP_NUM_TARGETS] = {
Expand All @@ -20,7 +27,7 @@ DXGI_FORMAT dx103DFluidData::m_VPRenderTargetFormats[VP_NUM_TARGETS] = {
dx103DFluidData::dx103DFluidData()
{
D3D_TEXTURE3D_DESC desc;
desc.BindFlags = D3D10_BIND_SHADER_RESOURCE | D3D10_BIND_RENDER_TARGET;
desc.BindFlags = D3D_BIND_SHADER_RESOURCE | D3D_BIND_RENDER_TARGET;
desc.CPUAccessFlags = 0;
desc.MipLevels = 1;
desc.MiscFlags = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRenderDX10/3DFluid/dx103DFluidManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void dx103DFluidManager::Initialize(int width, int height, int depth)
InitShaders();

D3D_TEXTURE3D_DESC desc;
desc.BindFlags = D3D10_BIND_SHADER_RESOURCE | D3D10_BIND_RENDER_TARGET;
desc.BindFlags = D3D_BIND_SHADER_RESOURCE | D3D_BIND_RENDER_TARGET;
desc.CPUAccessFlags = 0;
desc.MipLevels = 1;
desc.MiscFlags = 0;
Expand Down
1 change: 1 addition & 0 deletions src/Layers/xrRenderDX10/Blender_Recorder_R3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ void CBlender_Compile::r_Pass(LPCSTR _vs, LPCSTR _gs, LPCSTR _ps, bool bFog, BOO
#ifdef USE_DX11
dest.hs = RImplementation.Resources->_CreateHS("null");
dest.ds = RImplementation.Resources->_CreateDS("null");
dest.cs = RImplementation.Resources->_CreateCS("null");
#endif
ctable.merge(&ps->constants);
ctable.merge(&vs->constants);
Expand Down

0 comments on commit ef4002a

Please sign in to comment.