//
// Asura_D3D_PS_VisionMode.cpp
//
// Created by RJF - 23 June 2005
//
// Copyright (C) 2005 Rebellion, All Rights Reserved.
//

#include "Core/Asura.h"

// This file's header.
#include "Rendering/Asura_Direct3D_Shaders.h"

static Asura_Direct3D_PixelShader xVisionModeShader( ASURA_D3D_PS_VISIONMODE,

    "ps.1.1							\n"

	"tex t0							\n"		// backbuffer
	"tex t1							\n"		// grid thing

	"dp3_sat r0, t0, c0				\n"		// red/green score into r0
	"mul_x2 t0, r0, c1				\n"		// red/green -> blue into t0
	"mul r1, r0, c2					\n"		// red/green -> red+green into v0
	"add t0, t0, r1					\n"
	"dp3_x2 r1, t0, c1				\n"		// bluegrey into r1
	"lrp r0.rgb, r0, t0, r1			\n"
	"+mov r0.a, c0.a				\n"
	"mul r0.rgb, r0, t1				\n"
);

static Asura_Direct3D_PixelShader xVisionModeSilhouetteShader( ASURA_D3D_PS_VISIONMODE_SILHOUETTE,

	"ps.1.1							\n"
	"tex t0							\n"	// Need to sample from texture so that alphakill can be applied
	"mov r0, c0						\n" // even though the result is just a constant colour.

);
