Fix minor warnings in shaders
This commit is contained in:
@@ -62,7 +62,7 @@ PACK_STRUCT(struct Data {
|
||||
|
||||
PACK_STRUCT(struct BlurData {
|
||||
Vector2 InvBufferSize;
|
||||
int32 SampleCount;
|
||||
uint32 SampleCount;
|
||||
float Dummy0;
|
||||
Vector4 Bounds;
|
||||
Vector4 WeightAndOffsets[RENDER2D_BLUR_MAX_SAMPLES / 2];
|
||||
@@ -877,20 +877,16 @@ static Vector2 GetWeightAndOffset(float dist, float sigma)
|
||||
return Vector2(totalWeight, offset);
|
||||
}
|
||||
|
||||
static int32 ComputeBlurWeights(int32 kernelSize, float sigma, Vector4* outWeightsAndOffsets)
|
||||
static uint32 ComputeBlurWeights(int32 kernelSize, float sigma, Vector4* outWeightsAndOffsets)
|
||||
{
|
||||
const int32 numSamples = Math::DivideAndRoundUp(kernelSize, 2);
|
||||
|
||||
const uint32 numSamples = Math::DivideAndRoundUp((uint32)kernelSize, 2u);
|
||||
outWeightsAndOffsets[0] = Vector4(Vector2(GetWeight(0, sigma), 0), GetWeightAndOffset(1, sigma));
|
||||
|
||||
int32 sampleIndex = 1;
|
||||
for (int32 x = 3; x < kernelSize; x += 4)
|
||||
uint32 sampleIndex = 1;
|
||||
for (uint32 x = 3; x < kernelSize; x += 4)
|
||||
{
|
||||
outWeightsAndOffsets[sampleIndex] = Vector4(GetWeightAndOffset((float)x, sigma), GetWeightAndOffset((float)(x + 2), sigma));
|
||||
|
||||
sampleIndex++;
|
||||
}
|
||||
|
||||
return numSamples;
|
||||
}
|
||||
|
||||
|
||||
@@ -194,9 +194,9 @@ bool VolumetricFogPass::Init(RenderContext& renderContext, GPUContext* context,
|
||||
_cache.Data.GlobalExtinctionScale = options.ExtinctionScale;
|
||||
_cache.Data.GlobalEmissive = options.Emissive.ToVector3() * options.Emissive.A;
|
||||
_cache.Data.GridSize = _cache.GridSize;
|
||||
_cache.Data.GridSizeIntX = (int32)_cache.GridSize.X;
|
||||
_cache.Data.GridSizeIntY = (int32)_cache.GridSize.Y;
|
||||
_cache.Data.GridSizeIntZ = (int32)_cache.GridSize.Z;
|
||||
_cache.Data.GridSizeIntX = (uint32)_cache.GridSize.X;
|
||||
_cache.Data.GridSizeIntY = (uint32)_cache.GridSize.Y;
|
||||
_cache.Data.GridSizeIntZ = (uint32)_cache.GridSize.Z;
|
||||
_cache.Data.HistoryWeight = _cache.HistoryWeight;
|
||||
_cache.Data.FogParameters = options.FogParameters;
|
||||
_cache.Data.InverseSquaredLightDistanceBiasScale = _cache.InverseSquaredLightDistanceBiasScale;
|
||||
|
||||
@@ -46,9 +46,9 @@ private:
|
||||
Vector3 GridSize;
|
||||
uint32 MissedHistorySamplesCount;
|
||||
|
||||
int32 GridSizeIntX;
|
||||
int32 GridSizeIntY;
|
||||
int32 GridSizeIntZ;
|
||||
uint32 GridSizeIntX;
|
||||
uint32 GridSizeIntY;
|
||||
uint32 GridSizeIntZ;
|
||||
float PhaseG;
|
||||
|
||||
Vector2 Dummy0;
|
||||
|
||||
Reference in New Issue
Block a user