mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-15 12:39:38 +00:00
Scale quads after rendering to a screen texture instead of scaling directly. Fixes discontinuities in room editor and menu edges.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "DrawQuad.h"
|
||||
|
||||
SamplerState surfaceSampler : register(s0);
|
||||
Texture2D<float> surfaceTexture : register(t0);
|
||||
Texture2D<float3> surfaceTexture : register(t0);
|
||||
|
||||
struct SDrawQuadPixelOutput
|
||||
{
|
||||
@@ -10,9 +10,9 @@ struct SDrawQuadPixelOutput
|
||||
|
||||
SDrawQuadPixelOutput PSMain(SDrawQuadPixelInput input)
|
||||
{
|
||||
float surfaceColor = surfaceTexture.Sample(surfaceSampler, input.texCoord.xy).r;
|
||||
float3 surfaceColor = surfaceTexture.Load(int3(input.texCoord.xy, 0)).rgb;
|
||||
|
||||
SDrawQuadPixelOutput result;
|
||||
result.color = float4(surfaceColor, input.texCoord.x, input.texCoord.y, 1.0);
|
||||
result.color = float4(surfaceColor, 1.0);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user