From 59e2228b2a7bca89b7b98681515f33099b784270 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 2 Oct 2010 07:40:02 +1300 Subject: [PATCH] shader fallback path for cg-2.1, which misinterprets 'latest' --- shaders/chrome-rgba.fx | 13 +++++++++++++ shaders/chrome-shp.fx | 12 ++++++++++++ shaders/line.fx | 14 ++++++++++++++ shaders/world-shp.fx | 13 +++++++++++++ 4 files changed, 52 insertions(+) diff --git a/shaders/chrome-rgba.fx b/shaders/chrome-rgba.fx index 119ebd4e75..4dad0637e8 100644 --- a/shaders/chrome-rgba.fx +++ b/shaders/chrome-rgba.fx @@ -48,3 +48,16 @@ technique high_quality { BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha ); } } + +technique high_quality_cg21 { + pass p0 { + BlendEnable = true; + DepthTestEnable = false; + CullFaceEnable = false; + VertexProgram = compile arbvp1 Simple_vp(); + FragmentProgram = compile arbfp1 Simple_fp(); + + BlendEquation = FuncAdd; + BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha ); + } +} \ No newline at end of file diff --git a/shaders/chrome-shp.fx b/shaders/chrome-shp.fx index 99d5cdb6b0..750d8c9a6c 100644 --- a/shaders/chrome-shp.fx +++ b/shaders/chrome-shp.fx @@ -66,3 +66,15 @@ technique low_quality { } } +technique low_quality_cg21 { + pass p0 { + BlendEnable = true; + DepthTestEnable = false; + CullFaceEnable = false; + VertexProgram = compile arbvp1 Simple_vp(); + FragmentProgram = compile arbfp1 Palette_fp(); + + BlendEquation = FuncAdd; + BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha ); + } +} diff --git a/shaders/line.fx b/shaders/line.fx index 1d547dcb1b..ea423ec30f 100644 --- a/shaders/line.fx +++ b/shaders/line.fx @@ -41,3 +41,17 @@ technique high_quality { BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha ); } } + +technique high_quality_cg21 { + pass p0 { + BlendEnable = true; + DepthTestEnable = false; + //CullMode = None; + //FillMode = Wireframe; + VertexProgram = compile arbvp1 Simple_vp(); + FragmentProgram = compile arbfp1 Simple_fp(); + + BlendEquation = FuncAdd; + BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha ); + } +} \ No newline at end of file diff --git a/shaders/world-shp.fx b/shaders/world-shp.fx index 14d67decfb..c5ba7ae69b 100644 --- a/shaders/world-shp.fx +++ b/shaders/world-shp.fx @@ -65,3 +65,16 @@ technique low_quality { BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha ); } } + +technique low_quality_cg21 { + pass p0 { + BlendEnable = true; + DepthTestEnable = false; + CullFaceEnable = false; + VertexProgram = compile arbvp1 Simple_vp(); + FragmentProgram = compile arbfp1 Palette_fp(); + + BlendEquation = FuncAdd; + BlendFunc = int2( SrcAlpha, OneMinusSrcAlpha ); + } +} \ No newline at end of file