Skip to content

Commit

Permalink
Correct Layer/StageDepth texture size calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mortalitas committed Apr 10, 2023
1 parent 6076ef7 commit 55354f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Shaders/Layer.fxh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void PS_Layer(in float4 pos : SV_Position, float2 texCoord : TEXCOORD, out float
const float AspectX = (1.0 - BUFFER_WIDTH * (1.0 / BUFFER_HEIGHT)); \
const float AspectY = (1.0 - BUFFER_HEIGHT * (1.0 / BUFFER_WIDTH)); \
const float3 mulUV = float3(texCoord.x, texCoord.y, 1); \
const float2 ScaleSize = (float2(LAYER_SIZE_X, LAYER_SIZE_Y) * LAYER_SCALE / BUFFER_SCREEN_SIZE); \
const float2 ScaleSize = (float2(Layer_Size_X, Layer_Size_Y) * LAYER_SCALE / BUFFER_SCREEN_SIZE); \
const float ScaleX = ScaleSize.x * AspectX * Layer_ScaleX; \
const float ScaleY = ScaleSize.y * AspectY * Layer_ScaleY; \
float Rotate = Layer_Rotate * (3.1415926 / 180.0); \
Expand Down
2 changes: 1 addition & 1 deletion Shaders/StageDepth.fxh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void PS_StageDepth(in float4 position : SV_Position, in float2 texCoord : TEXCOO
const float AspectX = (1.0 - BUFFER_WIDTH * (1.0 / BUFFER_HEIGHT)); \
const float AspectY = (1.0 - BUFFER_HEIGHT * (1.0 / BUFFER_WIDTH)); \
const float3 mulUV = float3(texCoord.x, texCoord.y, 1); \
const float2 ScaleSize = (float2(STAGE_SIZE_X, STAGE_SIZE_Y) * STAGEDEPTH_SCALE / BUFFER_SCREEN_SIZE); \
const float2 ScaleSize = (float2(StageDepth_Size_X, StageDepth_Size_Y) * STAGEDEPTH_SCALE / BUFFER_SCREEN_SIZE); \
const float ScaleX = ScaleSize.x * AspectX * StageDepth_ScaleX; \
const float ScaleY = ScaleSize.y * AspectY * StageDepth_ScaleY; \
float Rotate = StageDepth_Rotate * (3.1415926 / 180.0); \
Expand Down

0 comments on commit 55354f6

Please sign in to comment.