From 41791ccaa2eb337bc374034d9ad5fac7bdc08607 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 20 Jul 2012 16:44:40 +0200 Subject: [PATCH] add file --- files/materials/quad2.shader | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 files/materials/quad2.shader diff --git a/files/materials/quad2.shader b/files/materials/quad2.shader new file mode 100644 index 0000000000..e54d83ef4e --- /dev/null +++ b/files/materials/quad2.shader @@ -0,0 +1,23 @@ +#include "core.h" + +#ifdef SH_VERTEX_SHADER + + SH_BEGIN_PROGRAM + shUniform(float4x4, wvp) @shAutoConstant(wvp, worldviewproj_matrix) + SH_START_PROGRAM + { + shOutputPosition = shMatrixMult(wvp, shInputPosition); + } + +#else + + SH_BEGIN_PROGRAM + shUniform(float3, viewportBackground) @shSharedParameter(viewportBackground) + shDeclareMrtOutput(1) + SH_START_PROGRAM + { + shOutputColour(0) = float4(viewportBackground, 1); + shOutputColour(1) = float4(1,1,1,1); + } + +#endif