/*********************************************************************NVMH3**** File: $Id: //sw/devtools/SDK/9.5/SDK/MEDIA/HLSL/scene_textureclear.fx#3 $ Copyright NVIDIA Corporation 2004 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. Comments: This scene clears the background to a color using hardware T&L - no explicit pixel shader. ******************************************************************************/ #include float Script : STANDARDSGLOBAL < string UIWidget = "none"; string ScriptClass = "scene"; string ScriptOrder = "standard"; string ScriptOutput = "color"; string Script = "Technique=TextureClear;"; > = 0.8; // version # ////////////// texture diffuseTexture : DIFFUSE < string ResourceName = "lena.png"; string ResourceType = "2D"; >; // Very simple shader to draw a texture to the background technique TextureClear < string ScriptClass = "scene"; string ScriptOrder = "standard"; string ScriptOutput = "color"; string Script = "Pass=p0;"; > { pass p0 < string Script = "RenderColorTarget0=;" "Draw=Buffer;"; > { VertexShader = compile vs_1_1 ScreenQuadVS(); // Diffuse texture Texture[0] = ; MinFilter[0] = Linear; MagFilter[0] = Linear; MipFilter[0] = Linear; ZEnable = false; ZWriteEnable = false; CullMode = None; ColorOp[0] = SelectArg1; ColorArg1[0] = Texture; ColorArg2[0] = Current; AlphaOp[0] = SelectArg1; AlphaArg1[0] = Texture; ColorOp[1] = Disable; AlphaOp[1] = Disable; } }