--- /dev/null
+import postprocess;
+
+uniform vec4 color;
+
+#pragma MSP stage(fragment)
+void main()
+{
+ vec4 tex_sample = texture(source, texcoord);
+ frag_color = mix(tex_sample, color, color.a);
+}
#include <msp/gl/texture2d.h>
#include "demo.h"
#include "fadeoverlay.h"
+#include "resources.h"
using namespace std;
namespace Msp {
namespace DemoScene {
-FadeOverlay::FadeOverlay(DataFile::Collection &resources):
+FadeOverlay::FadeOverlay():
mesh(get_fullscreen_quad()),
- shprog(resources.get<GL::Program>("fade.glsl")),
+ shprog(Resources::get_builtins().get<GL::Program>("fade.glsl")),
color(0.0f, 0.0f, 0.0f, 0.0f)
{
shdata.uniform("color", color);