Skip to content

Instantly share code, notes, and snippets.

@PumpkinPaul
Created January 21, 2021 13:51
Show Gist options
  • Save PumpkinPaul/df7fde63a5d5345f62356c5bb0fddcea to your computer and use it in GitHub Desktop.
Save PumpkinPaul/df7fde63a5d5345f62356c5bb0fddcea to your computer and use it in GitHub Desktop.
Simple sprite shader
#include "Macros.fxh"
#include "Structures.fxh"
DECLARE_TEXTURE(UserTexture, 0);
BEGIN_CONSTANTS
MATRIX_CONSTANTS
float4x4 MatrixTransform _vs(c0) _cb(c0);
END_CONSTANTS
#include "Vertex.fxh"
float4 PixelShaderMain(PSInput input) : SV_Target0
{
return SAMPLE_TEXTURE(UserTexture, input.texCoord) * input.color;
}
TECHNIQUE(SpriteEffect, CommmonVertexShader, PixelShaderMain);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment