@@ -11,35 +11,6 @@ namespace xray::render::RENDER_NAMESPACE
1111{
1212dx113DFluidManager FluidManager;
1313
14- namespace
15- {
16- // For render call
17- // DrawTextureShaderVariable = pEffect->GetVariableByName( "textureNumber")->AsScalar();
18- shared_str strDrawTexture (" textureNumber" );
19- // For project, advect
20- // ModulateShaderVariable = pEffect->GetVariableByName( "modulate")->AsScalar();
21- shared_str strModulate (" modulate" );
22- // For gaussian
23- // ImpulseSizeShaderVariable = pEffect->GetVariableByName("size")->AsScalar();
24- // shared_str strImpulseSize("size");
25- // ImpulseCenterShaderVariable = pEffect->GetVariableByName("center")->AsVector();
26- // shared_str strImpulseCenter("center");
27- // SplatColorShaderVariable = pEffect->GetVariableByName("splatColor")->AsVector();
28- // shared_str strSplatColor("splatColor");
29- // For confinement
30- // EpsilonShaderVariable = pEffect->GetVariableByName( "epsilon")->AsScalar();
31- shared_str strEpsilon (" epsilon" );
32- // For confinement, advect
33- shared_str strTimeStep (" timestep" );
34- // For advect BFECC
35- // ForwardShaderVariable = pEffect->GetVariableByName( "forward")->AsScalar();
36- shared_str strForward (" forward" );
37- // HalfVolumeDimShaderVariable = pEffect->GetVariableByName( "halfVolumeDim")->AsVector();
38- shared_str strHalfVolumeDim (" halfVolumeDim" );
39-
40- shared_str strGravityBuoyancy (" GravityBuoyancy" );
41- }
42-
4314LPCSTR dx113DFluidManager::m_pEngineTextureNames[NUM_RENDER_TARGETS] = {
4415 " $user$Texture_velocity1" , // RENDER_TARGET_VELOCITY1 = 0,
4516 // Swap with object's
@@ -387,6 +358,11 @@ void dx113DFluidManager::DetachAndSwapFluidData(dx113DFluidData& FluidData)
387358
388359void dx113DFluidManager::AdvectColorBFECC (float timestep, bool bTeperature)
389360{
361+ static shared_str strModulate (" modulate" );
362+ static shared_str strTimeStep (" timestep" );
363+ static shared_str strForward (" forward" );
364+ static shared_str strHalfVolumeDim (" halfVolumeDim" );
365+
390366 PIX_EVENT (AdvectColorBFECC);
391367
392368 // Clear to zero
@@ -485,6 +461,10 @@ void dx113DFluidManager::AdvectColorBFECC(float timestep, bool bTeperature)
485461
486462void dx113DFluidManager::AdvectColor (float timestep, bool bTeperature)
487463{
464+ static shared_str strModulate (" modulate" );
465+ static shared_str strTimeStep (" timestep" );
466+ static shared_str strForward (" forward" );
467+
488468 PIX_EVENT (AdvectColor);
489469 // if(ColorTextureNumber == 0)
490470 // {
@@ -519,6 +499,11 @@ void dx113DFluidManager::AdvectColor(float timestep, bool bTeperature)
519499
520500void dx113DFluidManager::AdvectVelocity (float timestep, float fGravity )
521501{
502+ static shared_str strModulate (" modulate" );
503+ static shared_str strTimeStep (" timestep" );
504+ static shared_str strForward (" forward" );
505+ static shared_str strGravityBuoyancy (" GravityBuoyancy" );
506+
522507 PIX_EVENT (AdvectVelocity);
523508
524509 // pShaderResourceVariables[RENDER_TARGET_VELOCITY1]->SetResource( NULL );
@@ -549,6 +534,9 @@ void dx113DFluidManager::AdvectVelocity(float timestep, float fGravity)
549534
550535void dx113DFluidManager::ApplyVorticityConfinement (float timestep)
551536{
537+ static shared_str strEpsilon (" epsilon" );
538+ static shared_str strTimeStep (" timestep" );
539+
552540 PIX_EVENT (ApplyVorticityConfinement);
553541
554542 // Compute vorticity
@@ -683,6 +671,8 @@ void dx113DFluidManager::ComputePressure(float /*timestep*/)
683671
684672void dx113DFluidManager::ProjectVelocity (float /* timestep*/ )
685673{
674+ static shared_str strModulate (" modulate" );
675+
686676 PIX_EVENT (ProjectVelocity);
687677
688678 // pShaderResourceVariables[RENDER_TARGET_VELOCITY0]->SetResource( NULL );
0 commit comments