/*********************************************************************NVMH3**** ******************************************************************************* $Revision$ Copyright NVIDIA Corporation 2008 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED *AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. % Put a simple image texture behind the current scene keywords: image_processing date: 070330 To learn more about shading, shaders, and to bounce ideas off other shader authors and users, visit the NVIDIA Shader Library Forums at: http://developer.nvidia.com/forums/ ******************************************************************************* ******************************************************************************/ /*****************************************************************/ /*** HOST APPLICATION IDENTIFIERS ********************************/ /*** Potentially predefined by varying host environments *********/ /*****************************************************************/ // #define _XSI_ /* predefined when running in XSI */ #ifndef FXCOMPOSER_VERSION /* for very old versions */ #define FXCOMPOSER_VERSION 180 #endif /* FXCOMPOSER_VERSION */ // #define FLIP_TEXTURE_Y /* Different in OpenGL & DirectX */ /*****************************************************************/ /*** EFFECT-SPECIFIC CODE BEGINS HERE ****************************/ /*****************************************************************/ #include "include/Quad.cgh" float Script : STANDARDSGLOBAL < string UIWidget = "none"; string ScriptClass = "scene"; string ScriptOrder = "preprocess"; string ScriptOutput = "color"; string Script = "Technique=Main;"; > = 0.8; float gClearDepth = 1.0; texture gColorTexture < string ResourceName = "Veggie.dds"; string UIName = "Background Texture"; string ResourceType = "2D"; >; sampler2D gColorSampler = sampler_state { Texture = ; MinFilter = LinearMipMapLinear; MagFilter = Linear; WrapS = Repeat; WrapT = Repeat; }; /////////////////////////////////////// /// TECHNIQUES //////////////////////// /////////////////////////////////////// technique Main < string Script = "ClearSetDepth=gClearDepth;" "Clear=Depth;" // no need for color clear, our technique will do it "Pass=PreP0;" "ScriptExternal=Scene;"; > { pass PreP0 < string Script = "Draw=Buffer;"; > { VertexProgram = compile vp40 ScreenQuadVS2(QuadTexelOffsets); DepthTestEnable = false; DepthMask = false; BlendEnable = false; CullFaceEnable = false; DepthFunc = LEqual; FragmentProgram = compile fp40 TexQuadPS(gColorSampler); } } /***************************** eof ***/