mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 20:19:38 +00:00
Add FreeType, progress to title screen
This commit is contained in:
22
ShaderSrc/DrawQuadPaletteP.hlsl
Normal file
22
ShaderSrc/DrawQuadPaletteP.hlsl
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "DrawQuad.h"
|
||||
|
||||
SamplerState nearestNeighborSampler : register(s0);
|
||||
Texture2D<uint> surfaceTexture : register(t0);
|
||||
Texture1D<float4> paletteTexture : register(t1);
|
||||
|
||||
struct SDrawQuadPixelOutput
|
||||
{
|
||||
float4 color : SV_TARGET;
|
||||
};
|
||||
|
||||
SDrawQuadPixelOutput PSMain(SDrawQuadPixelInput input)
|
||||
{
|
||||
int2 texCoord = input.texCoord.xy;
|
||||
|
||||
uint surfaceColor = surfaceTexture.Load(int3(texCoord, 0)).r;
|
||||
float3 paletteColor = paletteTexture.Load(int2(surfaceColor, 0)).rgb;
|
||||
|
||||
SDrawQuadPixelOutput result;
|
||||
result.color = float4(paletteColor.rgb, 1.0);
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user