Refactor shader structures naming with a prefix

This commit is contained in:
Wojtek Figat
2024-03-25 17:52:48 +01:00
parent 0e00f1e0eb
commit cdbb2cc813
25 changed files with 66 additions and 66 deletions

View File

@@ -61,7 +61,7 @@ bool EnvironmentProbe::IsUsingCustomProbe() const
return _isUsingCustomProbe;
}
void EnvironmentProbe::SetupProbeData(const RenderContext& renderContext, ProbeData* data) const
void EnvironmentProbe::SetupProbeData(const RenderContext& renderContext, ShaderEnvProbeData* data) const
{
const float radius = GetScaledRadius();
data->Data0 = Float4(GetPosition() - renderContext.View.Origin, 0);

View File

@@ -95,7 +95,7 @@ public:
/// </summary>
/// <param name="renderContext">Rendering context</param>
/// <param name="data">Packed probe data to set</param>
void SetupProbeData(const RenderContext& renderContext, struct ProbeData* data) const;
void SetupProbeData(const RenderContext& renderContext, struct ShaderEnvProbeData* data) const;
/// <summary>
/// Gets the custom probe (null if using baked one or none).

View File

@@ -144,7 +144,7 @@ void ExponentialHeightFog::GetVolumetricFogOptions(VolumetricFogOptions& result)
result.FogParameters = Float4(density, height, heightFalloff, 0.0f);
}
void ExponentialHeightFog::GetExponentialHeightFogData(const RenderView& view, ExponentialHeightFogData& result) const
void ExponentialHeightFog::GetExponentialHeightFogData(const RenderView& view, ShaderExponentialHeightFogData& result) const
{
const float height = (float)GetPosition().Y;
const float density = FogDensity / 1000.0f;
@@ -180,8 +180,8 @@ void ExponentialHeightFog::GetExponentialHeightFogData(const RenderView& view, E
}
PACK_STRUCT(struct Data {
GBufferData GBuffer;
ExponentialHeightFogData ExponentialHeightFog;
ShaderGBufferData GBuffer;
ShaderExponentialHeightFogData ExponentialHeightFog;
});
void ExponentialHeightFog::DrawFog(GPUContext* context, RenderContext& renderContext, GPUTextureView* output)

View File

@@ -155,7 +155,7 @@ public:
// [IFogRenderer]
void GetVolumetricFogOptions(VolumetricFogOptions& result) const override;
void GetExponentialHeightFogData(const RenderView& view, ExponentialHeightFogData& result) const override;
void GetExponentialHeightFogData(const RenderView& view, ShaderExponentialHeightFogData& result) const override;
void DrawFog(GPUContext* context, RenderContext& renderContext, GPUTextureView* output) override;
protected:

View File

@@ -21,8 +21,8 @@ PACK_STRUCT(struct Data {
Matrix WVP;
Float3 ViewOffset;
float Padding;
GBufferData GBuffer;
AtmosphericFogData Fog;
ShaderGBufferData GBuffer;
ShaderAtmosphericFogData Fog;
});
Sky::Sky(const SpawnParams& params)
@@ -52,7 +52,7 @@ Sky::~Sky()
SAFE_DELETE_GPU_RESOURCE(_psFog);
}
void Sky::InitConfig(AtmosphericFogData& config) const
void Sky::InitConfig(ShaderAtmosphericFogData& config) const
{
config.AtmosphericFogDensityScale = 1.0f;
config.AtmosphericFogSunDiscScale = SunDiscScale;

View File

@@ -54,7 +54,7 @@ private:
_psFog = nullptr;
}
#endif
void InitConfig(AtmosphericFogData& config) const;
void InitConfig(ShaderAtmosphericFogData& config) const;
public:
// [Actor]