to create multiple textures in one array is now possible; swapping textures with mouseclick; added some textures; git-svn-id: svn://ammerhai.com/home/mike/pokemon_repo@7 24008968-59e6-ed4c-a10b-0b2c954b24ab
24 lines
521 B
HLSL
24 lines
521 B
HLSL
struct PixelShaderInput {
|
|
float4 pos : SV_POSITION;
|
|
float4 uvst : COORDINATES;
|
|
uint tile_type : TILE_TYPE;
|
|
};
|
|
|
|
struct PixelShaderOutput {
|
|
float4 color : SV_TARGET;
|
|
};
|
|
|
|
Texture2DArray<float4> tex1 : register(t0);
|
|
|
|
SamplerState texture_sampler : register(s0);
|
|
|
|
PixelShaderOutput main(PixelShaderInput input) {
|
|
PixelShaderOutput output;
|
|
|
|
#if 1
|
|
output.color = tex1.Sample(texture_sampler, float3(input.uvst.xy, input.tile_type));
|
|
#else
|
|
output.color = float4(1, 0, 1, 1);
|
|
#endif
|
|
return output;
|
|
} |