# Veldrid: Only execute fragment shader

Having an HLSL shader like this:

struct FragmentIn
{
float4 Position : SV_Position;
float4 Color : COLOR0;
};

struct Oct
{
...
};

float3 Camera;
Oct data[9];

float4 FS(FragmentIn input) : SV_Target0
{
...
}


... how would one supply the uniforms and execute it directly for all pixels?

Using the Veldrid framework.

• I don't know anything about Veldrid, but usually this is accomplished by having a single full-screen quad with a trivial geometry shader. – Dan Hulme Jun 26 '18 at 13:43
• @DanHulme Thanks, but how would I set the uniforms on the fragment shader? – Tau Jun 26 '18 at 13:45
• From a quick look at the docs you linked I'd guess you use GraphicsDevice.UpdateBuffer on a DeviceBuffer whose type is BufferUsage.UniformBuffer. – Dan Hulme Jun 26 '18 at 16:11