//**************************************************************************/ // Copyright (c) 2014 Autodesk, Inc. // All rights reserved. // // These coded instructions, statements, and computer programs contain // unpublished proprietary information written by Autodesk, Inc., and are // protected by Federal copyright law. They may not be disclosed to third // parties or copied or duplicated in any form, in whole or in part, without // the prior written consent of Autodesk, Inc. //**************************************************************************/ // // Simple shader to output different colors to different output targets // #include "Common.ogsfh" // Colors to set for output targets uniform vec4 gTargetColor1 = {1.0,0.0,0.0,1.0}; uniform vec4 gTargetColor2 = {0.0,1.0,0.0,1.0}; // Output to 2 diferent targets as an example attribute PixelShaderOutput { vec4 colorOut[2]; }; // PixelShaderOutput PS_BlitToMRT(VS_TO_PS_ScreenQuad In) GLSLShader PS_BlitToMRT { void main() { colorOut[0] = gTargetColor1; colorOut[1] = gTargetColor2; } } technique Main { pass p0 { VertexShader (in VS_INPUT_ScreenQuad, out VS_TO_PS_ScreenQuad) = VS_ScreenQuad; PixelShader (in VS_TO_PS_ScreenQuad, out PixelShaderOutput) = PS_BlitToMRT; } }