read bmp file (via stb, m_header is coming later) -> stb_image.h; added monochrom imagetype (load_tga_file); git-svn-id: svn://ammerhai.com/home/mike/pokemon_repo@19 24008968-59e6-ed4c-a10b-0b2c954b24ab
24 lines
515 B
HLSL
24 lines
515 B
HLSL
struct PixelShaderInput {
|
|
float4 pos : SV_POSITION;
|
|
float4 uvst : COORDINATES;
|
|
uint tile_type : TILE_TYPE;
|
|
};
|
|
|
|
struct PixelShaderOutput {
|
|
float4 color : SV_TARGET;
|
|
};
|
|
|
|
Texture2D<float> tex1 : register(t0);
|
|
|
|
SamplerState texture_sampler : register(s0);
|
|
|
|
PixelShaderOutput main(PixelShaderInput input) {
|
|
PixelShaderOutput output;
|
|
|
|
#if 1
|
|
output.color = float4(1, 1, 1, tex1.Sample(texture_sampler, float2(input.uvst.xy)));
|
|
#else
|
|
output.color = float4(1, 0, 1, 1);
|
|
#endif
|
|
return output;
|
|
} |