Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: consistent padding in shaders for older cards #268

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions features/Cloud Shadows/Shaders/CloudShadows/output.cs.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@
struct PerPassCloudShadow
{
uint EnableCloudShadows;

float CloudHeight;
float PlanetRadius;

float EffectMix;

float TransparencyPower;

float RcpHPlusR;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cbuffer ShadowUpdateCB : register(b1)
float2 LightDeltaZ : packoffset(c0.z); // per lightUVDir, normalised, [upper, lower] penumbra, should be negative
uint StartPxCoord : packoffset(c1.x);
float2 PxSize : packoffset(c1.y);
float pad : packoffset(c1.w);
}

float GetInterpolatedHeight(float2 pxCoord, bool isVertical)
Expand Down
6 changes: 0 additions & 6 deletions src/Features/CloudShadows.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,16 @@ struct CloudShadows : Feature
struct Settings
{
uint EnableCloudShadows = true;

float CloudHeight = 2e3f / 1.428e-2f;
float PlanetRadius = 6371e3f / 1.428e-2f;

float EffectMix = 1.f;

float TransparencyPower = 0.1f;
} settings;

struct PerPass
{
Settings Settings;

float RcpHPlusR;

float padding;
};
std::unique_ptr<StructuredBuffer> perPass = nullptr;

Expand Down
Loading