mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Removes ARB shaders
This commit is contained in:
parent
0432b86de7
commit
145e1c116d
80 changed files with 2 additions and 1388 deletions
|
|
@ -182,7 +182,6 @@ function RunDetection(settings)
|
|||
var disable_shadowpcf;
|
||||
var disable_allwater;
|
||||
var disable_fancywater;
|
||||
var enable_glsl;
|
||||
var enable_postproc;
|
||||
var enable_smoothlos;
|
||||
var override_renderpath;
|
||||
|
|
@ -214,16 +213,6 @@ function RunDetection(settings)
|
|||
var GL_VERSION = settings.renderer_backend.GL_VERSION;
|
||||
var GL_EXTENSIONS = settings.renderer_backend.GL_EXTENSIONS.split(" ");
|
||||
|
||||
// Enable GLSL on OpenGL 3+, which should be able to properly
|
||||
// manage GLSL shaders, needed for effects like windy trees
|
||||
if (GL_VERSION.match(/^[3-9]/))
|
||||
enable_glsl = true;
|
||||
|
||||
// Enable GLSL on OpenGL ES 2.0+, which doesn’t support the fixed
|
||||
// function fallbacks
|
||||
if (GL_VERSION.match(/^OpenGL ES /))
|
||||
enable_glsl = true;
|
||||
|
||||
// Enable most graphics options on OpenGL 4+, which should be
|
||||
// able to properly manage them
|
||||
if (GL_VERSION.match(/^[4-9]/))
|
||||
|
|
@ -239,7 +228,6 @@ function RunDetection(settings)
|
|||
{
|
||||
warnings.push("You are using '" + GL_RENDERER + "' graphics driver, expect very poor performance!");
|
||||
warnings.push("If possible install a proper graphics driver for your hardware.");
|
||||
enable_glsl = false;
|
||||
enable_postproc = false;
|
||||
enable_smoothlos = false;
|
||||
// s3tc on software renderers halves fps and makes textures weird
|
||||
|
|
@ -315,8 +303,6 @@ function RunDetection(settings)
|
|||
|
||||
// https://gitea.wildfiregames.com/0ad/0ad/issues/964
|
||||
// SiS Mirage 3 drivers apparently crash with shaders, so fall back to non-shader
|
||||
// (The other known SiS cards don't advertise GL_ARB_fragment_program so we
|
||||
// don't need to do anything special for them)
|
||||
if (os_win && GL_RENDERER.match(/^Mirage Graphics3$/))
|
||||
{
|
||||
override_renderpath = "fixed";
|
||||
|
|
@ -331,7 +317,6 @@ function RunDetection(settings)
|
|||
"disable_shadowpcf": disable_shadowpcf,
|
||||
"disable_allwater": disable_allwater,
|
||||
"disable_fancywater": disable_fancywater,
|
||||
"enable_glsl": enable_glsl,
|
||||
"enable_postproc": enable_postproc,
|
||||
"enable_smoothlos": enable_smoothlos,
|
||||
"override_renderpath": override_renderpath,
|
||||
|
|
@ -340,8 +325,8 @@ function RunDetection(settings)
|
|||
|
||||
global.RunHardwareDetection = function(settings)
|
||||
{
|
||||
// Currently we don't have limitations for other backends than GL and GL ARB.
|
||||
if (settings.renderer_backend.name != 'gl' && settings.renderer_backend.name != 'glarb')
|
||||
// Currently we don't have limitations for other backends than GL.
|
||||
if (settings.renderer_backend.name != 'gl')
|
||||
return;
|
||||
|
||||
// print(JSON.stringify(settings, null, 1)+"\n");
|
||||
|
|
@ -385,9 +370,6 @@ global.RunHardwareDetection = function(settings)
|
|||
Engine.ConfigDB_CreateValue("hwdetect", "watershadows", (!output.disable_fancywater).toString());
|
||||
}
|
||||
|
||||
if (output.enable_glsl !== undefined)
|
||||
Engine.ConfigDB_CreateValue("hwdetect", "preferglsl", (output.enable_glsl).toString());
|
||||
|
||||
if (output.enable_postproc !== undefined)
|
||||
Engine.ConfigDB_CreateValue("hwdetect", "postproc", (output.enable_postproc).toString());
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
|
||||
TEMP colorTex;
|
||||
TEX colorTex, fragment.texcoord[0], texture[0], 2D;
|
||||
|
||||
TEMP grayscale;
|
||||
MOV grayscale.r, 0.3;
|
||||
MOV grayscale.g, 0.59;
|
||||
MOV grayscale.b, 0.11;
|
||||
MOV grayscale.a, 0.0;
|
||||
|
||||
PARAM colorAdd = program.local[1];
|
||||
PARAM colorMul = program.local[2];
|
||||
PARAM grayscaleFactor = program.local[3];
|
||||
|
||||
TEMP colorGray;
|
||||
DP3 colorGray.rgb, colorTex, grayscale;
|
||||
MOV colorGray.a, colorTex.a;
|
||||
|
||||
TEMP color;
|
||||
LRP color, grayscaleFactor.r, colorGray, colorTex;
|
||||
MUL color, color, colorMul;
|
||||
ADD color, color, colorAdd;
|
||||
|
||||
MOV result.color, color;
|
||||
|
||||
END
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
PARAM transform = program.local[0];
|
||||
PARAM translation = program.local[1];
|
||||
|
||||
TEMP position;
|
||||
|
||||
MUL position, transform, vertex.position.xyxy;
|
||||
ADD position.x, position.x, position.y;
|
||||
ADD position.y, position.z, position.w;
|
||||
ADD position, position, translation;
|
||||
MOV position.z, 0.0;
|
||||
MOV position.w, 1.0;
|
||||
|
||||
MOV result.position, position;
|
||||
|
||||
MOV result.texcoord[0], vertex.texcoord[0];
|
||||
|
||||
END
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/canvas2d.vp">
|
||||
<stream name="pos"/>
|
||||
<stream name="uv0"/>
|
||||
<uniform name="transform" loc="0" type="vec4"/>
|
||||
<uniform name="translation" loc="1" type="vec2"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/canvas2d.fp">
|
||||
<uniform name="tex" loc="0" type="sampler2D"/>
|
||||
<uniform name="colorAdd" loc="1" type="vec4"/>
|
||||
<uniform name="colorMul" loc="2" type="vec4"/>
|
||||
<uniform name="grayscaleFactor" loc="3" type="float"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
|
||||
#if DEBUG_TEXTURED
|
||||
ATTRIB v_tex = fragment.texcoord[0];
|
||||
|
||||
TEX result.color, v_tex, texture[0], 2D;
|
||||
#else
|
||||
PARAM color = program.local[0];
|
||||
|
||||
MOV result.color, color;
|
||||
#endif
|
||||
|
||||
END
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
PARAM transform[4] = { program.local[0..3] };
|
||||
#if DEBUG_TEXTURED
|
||||
PARAM textureTransform = program.local[4];
|
||||
#endif
|
||||
|
||||
ATTRIB position = vertex.position;
|
||||
#if DEBUG_TEXTURED
|
||||
ATTRIB uv = vertex.texcoord[0];
|
||||
#endif
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
#if DEBUG_TEXTURED
|
||||
OUTPUT v_tex = result.texcoord[0];
|
||||
|
||||
MUL v_tex.x, textureTransform.x, uv.x;
|
||||
MUL v_tex.y, textureTransform.y, uv.z;
|
||||
#endif
|
||||
|
||||
END
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/debug_overlay.vp">
|
||||
<uniform name="transform" loc="0" type="mat4"/>
|
||||
<uniform name="textureTransform" loc="4" type="vec2" if="DEBUG_TEXTURED"/>
|
||||
<stream name="pos"/>
|
||||
<stream name="uv0" if="DEBUG_TEXTURED"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/debug_overlay.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D" if="DEBUG_TEXTURED"/>
|
||||
<uniform name="color" loc="0" type="vec4" if="!DEBUG_TEXTURED"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
MOV result.color, program.local[0];
|
||||
END
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
ATTRIB position = vertex.position;
|
||||
|
||||
PARAM transform[4] = { program.local[0..3] };
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
END
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/dummy.vp">
|
||||
<stream name="pos"/>
|
||||
<uniform name="transform" loc="0" type="mat4"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/dummy.fp">
|
||||
<uniform name="color" loc="0" type="vec4"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
|
||||
PARAM colorMul = program.local[0];
|
||||
TEMP color;
|
||||
TEX color, fragment.texcoord[0], texture[0], 2D;
|
||||
MUL color, color, colorMul;
|
||||
MOV result.color, color;
|
||||
|
||||
END
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
ATTRIB position = vertex.position;
|
||||
ATTRIB uv = vertex.texcoord[0];
|
||||
|
||||
PARAM transform[4] = { program.local[0..3] };
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
MOV result.texcoord, uv;
|
||||
|
||||
END
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/foreground_overlay.vp">
|
||||
<stream name="pos"/>
|
||||
<stream name="uv0"/>
|
||||
<uniform name="transform" loc="0" type="mat4"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/foreground_overlay.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D"/>
|
||||
<uniform name="colorMul" loc="0" type="vec4"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
|
||||
ATTRIB v_los = fragment.texcoord[0];
|
||||
PARAM delta = program.local[0];
|
||||
|
||||
TEMP los1_tex;
|
||||
TEMP los2_tex;
|
||||
|
||||
TEX los1_tex, v_los, texture[0], 2D;
|
||||
TEX los2_tex, v_los, texture[1], 2D;
|
||||
|
||||
TEMP smoothing;
|
||||
MOV_SAT smoothing, delta.x;
|
||||
|
||||
LRP result.color, smoothing, los1_tex.rrrr, los2_tex.rrrr;
|
||||
|
||||
END
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
MOV result.position, vertex.position;
|
||||
MOV result.texcoord, vertex.texcoord[0];
|
||||
|
||||
END
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
<vertex file="arb/los_interp.vp">
|
||||
<stream name="pos"/>
|
||||
<stream name="uv0"/>
|
||||
</vertex>
|
||||
<fragment file="arb/los_interp.fp">
|
||||
<uniform name="delta" loc="0" type="float"/>
|
||||
<uniform name="losTex1" loc="0" type="sampler2D"/>
|
||||
<uniform name="losTex2" loc="1" type="sampler2D"/>
|
||||
</fragment>
|
||||
</program>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
|
||||
#if MINIMAP_BASE
|
||||
TEX result.color, fragment.texcoord[0], texture[0], 2D;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_LOS
|
||||
TEMP tex;
|
||||
|
||||
TEX tex, fragment.texcoord[0], texture[0], 2D;
|
||||
|
||||
MOV result.color.r, tex.r;
|
||||
MOV result.color.g, tex.r;
|
||||
MOV result.color.b, tex.r;
|
||||
MOV result.color.a, tex.r;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_POINT
|
||||
MOV result.color, fragment.color;
|
||||
MOV result.color.a, 1.0;
|
||||
#endif
|
||||
|
||||
END
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
PARAM transform = program.local[0];
|
||||
PARAM translation = program.local[1];
|
||||
PARAM textureTransform = program.local[2];
|
||||
OUTPUT v_tex = result.texcoord[0];
|
||||
|
||||
TEMP position;
|
||||
MUL position, transform, vertex.position.xyxy;
|
||||
ADD position.x, position.x, position.y;
|
||||
ADD position.y, position.z, position.w;
|
||||
ADD position, position, translation.xyxy;
|
||||
MOV position.z, 0.0;
|
||||
MOV position.w, 1.0;
|
||||
MOV result.position, position;
|
||||
|
||||
#if MINIMAP_BASE || MINIMAP_LOS
|
||||
TEMP tex;
|
||||
MUL tex, textureTransform, vertex.texcoord.xyxy;
|
||||
ADD tex.x, tex.x, tex.y;
|
||||
ADD tex.y, tex.z, tex.w;
|
||||
ADD tex, tex, translation.zwzw;
|
||||
MOV tex.z, 0.0;
|
||||
MOV tex.w, 1.0;
|
||||
MOV v_tex, tex;
|
||||
#endif
|
||||
|
||||
#if MINIMAP_POINT
|
||||
MOV result.color, vertex.color;
|
||||
#endif
|
||||
|
||||
END
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/minimap.vp">
|
||||
<stream name="pos"/>
|
||||
<stream name="uv0" if="MINIMAP_BASE || MINIMAP_LOS"/>
|
||||
<stream name="color" if="MINIMAP_POINT"/>
|
||||
<uniform name="transform" loc="0" type="vec4"/>
|
||||
<uniform name="translation" loc="1" type="vec4"/>
|
||||
<uniform name="textureTransform" loc="2" type="vec4"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/minimap.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D" if="MINIMAP_BASE || MINIMAP_LOS"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
|
||||
PARAM color = program.local[0];
|
||||
|
||||
MOV result.color, color;
|
||||
|
||||
END
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
PARAM transform[4] = { program.local[0..3] };
|
||||
PARAM instancingTransform = program.local[4];
|
||||
|
||||
TEMP position;
|
||||
|
||||
MAD position.x, vertex.position.x, instancingTransform.w, instancingTransform.x;
|
||||
MAD position.y, vertex.position.y, instancingTransform.w, instancingTransform.y;
|
||||
MAD position.z, vertex.position.z, instancingTransform.w, instancingTransform.z;
|
||||
MOV position.w, 1.0;
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
END
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/overlay_solid.vp">
|
||||
<uniform name="transform" loc="0" type="mat4"/>
|
||||
<uniform name="instancingTransform" loc="4" type="vec4"/>
|
||||
<stream name="pos"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/overlay_solid.fp">
|
||||
<uniform name="color" loc="0" type="vec4"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
PARAM objectColor = program.local[0];
|
||||
TEMP base;
|
||||
TEMP mask;
|
||||
TEMP color;
|
||||
|
||||
// Combine base texture and color, using mask texture
|
||||
TEX base, fragment.texcoord[0], texture[0], 2D;
|
||||
TEX mask, fragment.texcoord[0], texture[1], 2D;
|
||||
#if USE_OBJECTCOLOR
|
||||
LRP color.rgb, mask, objectColor, base;
|
||||
#else
|
||||
LRP color.rgb, mask, fragment.color, base;
|
||||
#endif
|
||||
|
||||
#if IGNORE_LOS
|
||||
MOV result.color.rgb, color;
|
||||
#else
|
||||
// Multiply RGB by LOS texture (red channel)
|
||||
TEMP los;
|
||||
TEX los, fragment.texcoord[1], texture[2], 2D;
|
||||
SUB los.r, los.r, 0.03;
|
||||
MUL los.r, los.r, 0.97;
|
||||
MUL result.color.rgb, color, los.r;
|
||||
#endif
|
||||
|
||||
// Use alpha from base texture, combined with the object color/fragment alpha.
|
||||
#if USE_OBJECTCOLOR
|
||||
MUL result.color.a, objectColor.a, base.a;
|
||||
#else
|
||||
MUL result.color.a, fragment.color.a, base.a;
|
||||
#endif
|
||||
|
||||
END
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
PARAM transform[4] = { program.local[0..3] };
|
||||
#if !IGNORE_LOS
|
||||
PARAM losTransform = program.local[4];
|
||||
#endif
|
||||
ATTRIB position = vertex.position;
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
MOV result.texcoord[0], vertex.texcoord[0];
|
||||
#if !IGNORE_LOS
|
||||
MAD result.texcoord[1], position.xzzz, losTransform.x, losTransform.y;
|
||||
#endif
|
||||
|
||||
MOV result.color, vertex.color;
|
||||
|
||||
END
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<!-- This shader is used for rendering overlay lines (e.g. territory boundaries), and also for
|
||||
rendering the unit selection ring quad overlays, since they are almost identical. The only
|
||||
difference is that in unit selection ring mode, the uniform objectColor is ignored and instead
|
||||
replaced by a color stream from the vertices. The USE_OBJECTCOLOR define is used to switch
|
||||
between either mode. -->
|
||||
|
||||
<vertex file="arb/overlayline.vp">
|
||||
<stream name="pos"/>
|
||||
<stream name="uv0"/>
|
||||
<stream name="color" if="!USE_OBJECTCOLOR"/>
|
||||
<uniform name="transform" loc="0" type="mat4"/>
|
||||
<uniform name="losTransform" loc="4" type="vec2" if="!IGNORE_LOS"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/overlayline.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D"/>
|
||||
<uniform name="maskTex" loc="1" type="sampler2D"/>
|
||||
<uniform name="losTex" loc="2" type="sampler2D" if="!IGNORE_LOS"/>
|
||||
<uniform name="objectColor" loc="0" type="vec4" if="USE_OBJECTCOLOR"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
|
||||
ATTRIB v_los = fragment.texcoord[1];
|
||||
PARAM sunColor = program.local[0];
|
||||
|
||||
TEMP tex, losTex, color;
|
||||
|
||||
TEX tex, fragment.texcoord[0], texture[0], 2D;
|
||||
|
||||
TEMP temp;
|
||||
MOV temp, 0.5;
|
||||
|
||||
ADD color.rgb, fragment.color, sunColor;
|
||||
MUL color.rgb, color, temp;
|
||||
|
||||
MUL color.rgb, color, tex;
|
||||
|
||||
// Multiply everything by the LOS texture
|
||||
TEX losTex, v_los, texture[1], 2D;
|
||||
SUB losTex.r, losTex.r, 0.03;
|
||||
MUL losTex.r, losTex.r, 0.97;
|
||||
MUL result.color.rgb, color, losTex.r;
|
||||
MUL result.color.a, tex, fragment.color;
|
||||
|
||||
END
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
ATTRIB uv = vertex.texcoord[0];
|
||||
ATTRIB offset = vertex.texcoord[1];
|
||||
PARAM transform[4] = { program.local[0..3] };
|
||||
PARAM modelViewMatrix[4] = { program.local[4..7] };
|
||||
PARAM losTransform = program.local[8];
|
||||
TEMP axis1;
|
||||
MOV axis1, modelViewMatrix[0];
|
||||
TEMP axis2;
|
||||
MOV axis2, modelViewMatrix[1];
|
||||
|
||||
TEMP position;
|
||||
|
||||
MAD position.xyz, axis1, offset.x, vertex.position;
|
||||
MAD position.xyz, axis1, offset.y, position;
|
||||
MAD position.xyz, axis2, offset.x, position;
|
||||
MAD position.xyz, axis2, -offset.y, position;
|
||||
MOV position.w, vertex.position.w;
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
MOV result.texcoord[0], uv;
|
||||
MOV result.color, vertex.color;
|
||||
MAD result.texcoord[1], vertex.position.xzzz, losTransform.x, losTransform.y;
|
||||
|
||||
END
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/particle.vp">
|
||||
<stream name="pos"/>
|
||||
<stream name="color"/>
|
||||
<stream name="uv0"/>
|
||||
<stream name="uv1"/>
|
||||
<uniform name="transform" loc="0" type="mat4"/>
|
||||
<uniform name="modelViewMatrix" loc="4" type="mat4"/>
|
||||
<uniform name="losTransform" loc="8" type="vec2"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/particle.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D"/>
|
||||
<uniform name="losTex" loc="1" type="sampler2D"/>
|
||||
<uniform name="sunColor" loc="0" type="vec3"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/particle.vp">
|
||||
<stream name="pos"/>
|
||||
<stream name="uv0"/>
|
||||
<stream name="uv1"/>
|
||||
<uniform name="transform" loc="0" type="mat4"/>
|
||||
<uniform name="losTransform" loc="5" type="vec2"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/solid.fp"/>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
# cgc version 3.1.0013, build date Apr 24 2012
|
||||
# command line args: -oglsl -profile arbfp1
|
||||
# source file: sky.fs
|
||||
#vendor NVIDIA Corporation
|
||||
#version 3.1.0.13
|
||||
#profile arbfp1
|
||||
#program main
|
||||
#semantic baseTex
|
||||
#var float4 gl_FragColor : $vout.COLOR : COL : -1 : 1
|
||||
#var samplerCUBE baseTex : : texunit 0 : -1 : 1
|
||||
#var float3 v_tex : $vin.TEX0 : TEX0 : -1 : 1
|
||||
#const c[0] = 0.25 0 1 4
|
||||
PARAM c[1] = { { 0.25, 0, 1, 4 } };
|
||||
TEMP R0;
|
||||
TEMP R1;
|
||||
TEMP R2;
|
||||
SLT R2.x, c[0].y, fragment.texcoord[0].y;
|
||||
ABS R2.x, R2;
|
||||
TEX R0, fragment.texcoord[0], texture[0], CUBE;
|
||||
ADD R1.x, -fragment.texcoord[0].y, c[0];
|
||||
MUL R1, R0, R1.x;
|
||||
MUL R1, R1, c[0].w;
|
||||
CMP R2.x, -R2, c[0].y, c[0].z;
|
||||
CMP result.color, -R2.x, R0, R1;
|
||||
END
|
||||
# 8 instructions, 3 R-regs
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
ATTRIB position = vertex.position;
|
||||
ATTRIB uv = vertex.texcoord[0];
|
||||
|
||||
PARAM transform[4] = { program.local[0..3] };
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
MOV result.texcoord, uv;
|
||||
|
||||
END
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/sky.vp">
|
||||
<stream name="pos"/>
|
||||
<stream name="uv0"/>
|
||||
<uniform name="transform" loc="0" type="mat4"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/sky.fp">
|
||||
<uniform name="baseTex" loc="0" type="samplerCube"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
|
||||
PARAM color = program.local[0];
|
||||
|
||||
MOV result.color, color;
|
||||
|
||||
END
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
PARAM transform[4] = { program.local[0..3] };
|
||||
|
||||
TEMP position;
|
||||
|
||||
DP4 position.x, transform[0], vertex.position;
|
||||
DP4 position.y, transform[1], vertex.position;
|
||||
DP4 position.z, transform[2], vertex.position;
|
||||
MOV position.w, 1.0;
|
||||
|
||||
MOV result.position, position;
|
||||
|
||||
END
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/solid.vp">
|
||||
<uniform name="transform" loc="0" type="mat4"/>
|
||||
<stream name="pos"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/solid.fp">
|
||||
<uniform name="color" loc="0" type="vec4"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
MOV result.color, program.local[0];
|
||||
END
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
#ifdef REQUIRE_ALPHA_GEQUAL
|
||||
TEMP tex;
|
||||
TEMP temp;
|
||||
TEX tex, fragment.texcoord[0], texture[0], 2D;
|
||||
SUB temp.x, tex.a, REQUIRE_ALPHA_GEQUAL;
|
||||
KIL temp.x; // discard if < 0.0
|
||||
MOV result.color, tex;
|
||||
#else
|
||||
TEX result.color, fragment.texcoord[0], texture[0], 2D;
|
||||
#endif
|
||||
END
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
#ifdef USE_INSTANCING
|
||||
PARAM instancingTransform[4] = { program.local[0..3] };
|
||||
TEMP position;
|
||||
DP4 position.x, instancingTransform[0], vertex.position;
|
||||
DP4 position.y, instancingTransform[1], vertex.position;
|
||||
DP4 position.z, instancingTransform[2], vertex.position;
|
||||
MOV position.w, 1.0;
|
||||
#else
|
||||
ATTRIB position = vertex.position;
|
||||
#endif
|
||||
|
||||
PARAM transform[4] = { program.local[4..7] };
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
MOV result.texcoord[0], vertex.texcoord[0];
|
||||
END
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/terrain_common.vp">
|
||||
<uniform name="sunColor" loc="0" type="vec3"/>
|
||||
<uniform name="textureTransform" loc="1" type="vec2"/>
|
||||
<uniform name="losTransform" loc="2" type="vec2"/>
|
||||
<uniform name="shadowTransform" loc="3" type="mat4"/>
|
||||
<uniform name="shadowScale" loc="7" type="vec4"/>
|
||||
<uniform name="sunDir" loc="8" type="vec3"/>
|
||||
<uniform name="transform" loc="9" type="mat4"/>
|
||||
<stream name="pos"/>
|
||||
<stream name="normal"/>
|
||||
<stream name="uv0"/>
|
||||
<stream name="uv1" if="BLEND"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/terrain_common.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D"/>
|
||||
<uniform name="blendTex" loc="1" type="sampler2D" if="BLEND"/>
|
||||
<uniform name="shadowTex" loc="2" type="sampler2DShadow"/>
|
||||
<uniform name="losTex" loc="3" type="sampler2D"/>
|
||||
<uniform name="shadingColor" loc="1" type="vec3" if="DECAL"/>
|
||||
<uniform name="ambient" loc="0" type="vec3"/>
|
||||
<uniform name="shadowScale" loc="2" type="vec4"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<define name="BLEND" value="1"/>
|
||||
|
||||
<vertex file="arb/terrain_common.vp">
|
||||
<uniform name="sunColor" loc="0" type="vec3"/>
|
||||
<uniform name="textureTransform" loc="1" type="vec2"/>
|
||||
<uniform name="losTransform" loc="2" type="vec2"/>
|
||||
<uniform name="shadowTransform" loc="3" type="mat4"/>
|
||||
<uniform name="shadowScale" loc="7" type="vec4"/>
|
||||
<uniform name="sunDir" loc="8" type="vec3"/>
|
||||
<uniform name="transform" loc="9" type="mat4"/>
|
||||
<stream name="pos"/>
|
||||
<stream name="normal"/>
|
||||
<stream name="uv0"/>
|
||||
<stream name="uv1"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/terrain_common.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D"/>
|
||||
<uniform name="blendTex" loc="1" type="sampler2D"/>
|
||||
<uniform name="shadowTex" loc="2" type="sampler2DShadow"/>
|
||||
<uniform name="losTex" loc="3" type="sampler2D"/>
|
||||
|
||||
<uniform name="ambient" loc="0" type="vec3"/>
|
||||
<uniform name="shadowScale" loc="2" type="vec4"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
#if USE_FP_SHADOW
|
||||
OPTION ARB_fragment_program_shadow;
|
||||
#endif
|
||||
|
||||
PARAM ambient = program.local[0];
|
||||
|
||||
#if DECAL
|
||||
PARAM shadingColor = program.local[1];
|
||||
#endif
|
||||
|
||||
#if USE_FP_SHADOW && USE_SHADOW_PCF
|
||||
PARAM shadowScale = program.local[2];
|
||||
TEMP offset, size, weight, depthSample;
|
||||
#endif
|
||||
|
||||
TEMP tex;
|
||||
TEMP temp;
|
||||
TEMP diffuse;
|
||||
TEMP color;
|
||||
|
||||
#if BLEND
|
||||
// Use alpha from blend texture
|
||||
// TODO: maybe we should invert the texture instead of doing SUB here?
|
||||
TEX tex.a, fragment.texcoord[1], texture[1], 2D;
|
||||
SUB result.color.a, 1.0, tex.a;
|
||||
#endif
|
||||
|
||||
// Load diffuse color
|
||||
TEX color, fragment.texcoord[0], texture[0], 2D;
|
||||
|
||||
#if DECAL
|
||||
// Use alpha from main texture
|
||||
MOV result.color.a, color;
|
||||
#endif
|
||||
|
||||
// Compute color = texture * (ambient + diffuse*shadow)
|
||||
// (diffuse is 2*fragment.color due to clamp-avoidance in the vertex program)
|
||||
#if USE_SHADOW && !DISABLE_RECEIVE_SHADOWS
|
||||
TEMP shadowBias;
|
||||
TEMP biasedShdw;
|
||||
MOV shadowBias.x, 0.0005;
|
||||
MOV biasedShdw, fragment.texcoord[2];
|
||||
SUB biasedShdw.z, fragment.texcoord[2].z, shadowBias.x;
|
||||
#if USE_FP_SHADOW
|
||||
#if USE_SHADOW_PCF
|
||||
SUB offset.xy, fragment.texcoord[2], 0.5;
|
||||
FRC offset.xy, offset;
|
||||
ADD size.xy, offset, 1.0;
|
||||
SUB size.zw, 2.0, offset.xyxy;
|
||||
|
||||
MAD offset.xy, -0.5, offset, fragment.texcoord[2];
|
||||
MOV offset.z, biasedShdw.z;
|
||||
ADD weight, { 1.0, 1.0, -0.5, -0.5 }, offset.xyxy;
|
||||
MUL weight, weight, shadowScale.zwzw;
|
||||
|
||||
MOV offset.xy, weight.zwww;
|
||||
TEX depthSample.r, offset, texture[2], SHADOW2D;
|
||||
MOV temp.x, depthSample.r;
|
||||
MOV offset.x, weight.x;
|
||||
TEX depthSample.r, offset, texture[2], SHADOW2D;
|
||||
MOV temp.y, depthSample.r;
|
||||
MOV offset.xy, weight.zyyy;
|
||||
TEX depthSample.r, offset, texture[2], SHADOW2D;
|
||||
MOV temp.z, depthSample.r;
|
||||
MOV offset.x, weight.x;
|
||||
TEX depthSample.r, offset, texture[2], SHADOW2D;
|
||||
MOV temp.w, depthSample.r;
|
||||
|
||||
MUL size, size.zxzx, size.wwyy;
|
||||
DP4 temp.x, temp, size;
|
||||
MUL temp.x, temp.x, 0.111111;
|
||||
#else
|
||||
TEX temp.x, biasedShdw, texture[2], SHADOW2D;
|
||||
#endif
|
||||
#else
|
||||
TEX tex, fragment.texcoord[2], texture[2], 2D;
|
||||
MOV_SAT temp.z, biasedShdw.z;
|
||||
SGE temp.x, tex.x, temp.z;
|
||||
#endif
|
||||
MUL diffuse.rgb, fragment.color, 2.0;
|
||||
MAD temp.rgb, diffuse, temp.x, ambient;
|
||||
MUL color.rgb, color, temp;
|
||||
#else
|
||||
MAD temp.rgb, fragment.color, 2.0, ambient;
|
||||
MUL color.rgb, color, temp;
|
||||
#endif
|
||||
|
||||
// Multiply everything by the LOS texture
|
||||
TEX tex.r, fragment.texcoord[3], texture[3], 2D;
|
||||
SUB tex.r, tex.r, 0.03;
|
||||
MUL tex.r, tex.r, 0.97;
|
||||
MUL color.rgb, color, tex.r;
|
||||
|
||||
#if DECAL
|
||||
MUL result.color.rgb, color, shadingColor;
|
||||
#else
|
||||
MOV result.color.rgb, color;
|
||||
#endif
|
||||
|
||||
END
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
PARAM sunColor = program.local[0];
|
||||
PARAM textureTransform = program.local[1];
|
||||
PARAM losTransform = program.local[2];
|
||||
PARAM shadowTransform[4] = { program.local[3..6] };
|
||||
PARAM sunDir = program.local[8];
|
||||
PARAM transform[4] = { program.local[9..12] };
|
||||
|
||||
#if USE_FP_SHADOW && USE_SHADOW_PCF
|
||||
PARAM shadowScale = program.local[7];
|
||||
#endif
|
||||
|
||||
TEMP lighting;
|
||||
|
||||
TEMP terrainTextureTransform;
|
||||
MOV terrainTextureTransform, textureTransform;
|
||||
MOV terrainTextureTransform.z, -textureTransform.y;
|
||||
MOV terrainTextureTransform.w, 0;
|
||||
|
||||
//// Compute position and normal:
|
||||
|
||||
ATTRIB position = vertex.position;
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
//// Compute lighting:
|
||||
|
||||
// Diffuse factor is precomputed in vertex attribute
|
||||
// Scale diffuse to allow overbrightness (since result.color will be clamped to [0, 1])
|
||||
//
|
||||
DP3 lighting, -sunDir, vertex.normal;
|
||||
MAX lighting, 0.0, lighting; // DP3_SAT isn't available here.
|
||||
MUL lighting, lighting, 0.5;
|
||||
// Apply light color
|
||||
MUL result.color, lighting, sunColor;
|
||||
|
||||
//// Texture coordinates:
|
||||
|
||||
#if DECAL
|
||||
MOV result.texcoord[0], vertex.texcoord[0];
|
||||
#else
|
||||
// Compute texcoords from position and terrain-texture-dependent transform.
|
||||
// textureTransform is stored as [c, -s, s, 0],
|
||||
// and we want texcoord = (x*c + z*-s, x*-s + z*-c, 0, 1)
|
||||
DP3 result.texcoord[0].x, terrainTextureTransform.xyww, position.xzww;
|
||||
DP3 result.texcoord[0].y, -terrainTextureTransform.zxww, position.xzww;
|
||||
MOV result.texcoord[0].z, 0;
|
||||
MOV result.texcoord[0].w, 1;
|
||||
#endif
|
||||
|
||||
#if BLEND
|
||||
MOV result.texcoord[1], vertex.texcoord[1];
|
||||
#endif
|
||||
|
||||
#if USE_SHADOW
|
||||
#if USE_FP_SHADOW && USE_SHADOW_PCF
|
||||
TEMP shadowtc;
|
||||
DP4 shadowtc.x, shadowTransform[0], position;
|
||||
DP4 shadowtc.y, shadowTransform[1], position;
|
||||
MUL result.texcoord[2].xy, shadowtc, shadowScale;
|
||||
#else
|
||||
DP4 result.texcoord[2].x, shadowTransform[0], position;
|
||||
DP4 result.texcoord[2].y, shadowTransform[1], position;
|
||||
#endif
|
||||
DP4 result.texcoord[2].z, shadowTransform[2], position;
|
||||
DP4 result.texcoord[2].w, shadowTransform[3], position;
|
||||
#endif
|
||||
|
||||
MAD result.texcoord[3], position.xzzz, losTransform.x, losTransform.y;
|
||||
|
||||
END
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<define name="DECAL" value="1"/>
|
||||
|
||||
<vertex file="arb/terrain_common.vp">
|
||||
<uniform name="sunColor" loc="0" type="vec3"/>
|
||||
<uniform name="textureTransform" loc="1" type="vec2"/>
|
||||
<uniform name="losTransform" loc="2" type="vec2"/>
|
||||
<uniform name="shadowTransform" loc="3" type="mat4"/>
|
||||
<uniform name="shadowScale" loc="7" type="vec4"/>
|
||||
<uniform name="sunDir" loc="8" type="vec3"/>
|
||||
<uniform name="transform" loc="9" type="mat4"/>
|
||||
<stream name="pos"/>
|
||||
<stream name="normal"/>
|
||||
<stream name="uv0"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/terrain_common.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D"/>
|
||||
<uniform name="shadowTex" loc="2" type="sampler2DShadow"/>
|
||||
<uniform name="losTex" loc="3" type="sampler2D"/>
|
||||
|
||||
<uniform name="ambient" loc="0" type="vec3"/>
|
||||
<uniform name="shadingColor" loc="1" type="vec3"/>
|
||||
<uniform name="shadowScale" loc="2" type="vec4"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
|
||||
PARAM color = program.local[2];
|
||||
|
||||
ATTRIB v_coords = fragment.texcoord[0];
|
||||
ATTRIB v_losCoords = fragment.texcoord[1];
|
||||
|
||||
TEMP diffuse;
|
||||
TEX diffuse, v_coords, texture[0], 2D;
|
||||
MUL diffuse, diffuse, color;
|
||||
|
||||
TEMP los;
|
||||
TEX los, v_losCoords, texture[1], 2D;
|
||||
SUB los.r, los.r, 0.03;
|
||||
MUL los.r, los.r, 0.97;
|
||||
MUL diffuse, diffuse, los.r;
|
||||
|
||||
MOV result.color, diffuse;
|
||||
END
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
ATTRIB position = vertex.position;
|
||||
|
||||
PARAM transform[4] = { program.local[0..3] };
|
||||
PARAM losTransform = program.local[4];
|
||||
PARAM time = program.local[5];
|
||||
|
||||
OUTPUT v_coords = result.texcoord[0];
|
||||
OUTPUT v_losCoords = result.texcoord[1];
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
TEMP tx;
|
||||
MUL tx, time, -0.01235; // 1.0 / 81.0
|
||||
FRC tx, tx;
|
||||
TEMP tz;
|
||||
MUL tz, time, -0.02941; // 1.0 / 34.0
|
||||
FRC tz, tz;
|
||||
TEMP offset;
|
||||
MOV offset.x, tx;
|
||||
MOV offset.z, tz;
|
||||
|
||||
TEMP coords;
|
||||
// Divide by period 16 and add offset.
|
||||
MAD coords, position, 0.0625, offset;
|
||||
ADD coords, coords, offset;
|
||||
MOV v_coords, coords.xzxz;
|
||||
|
||||
TEMP losCoords;
|
||||
MOV losCoords, position.xzxz;
|
||||
MUL losCoords, losCoords, losTransform.xxxx;
|
||||
ADD losCoords, losCoords, losTransform.yyyy;
|
||||
MOV v_losCoords, losCoords.xyxy;
|
||||
|
||||
END
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/water_simple.vp">
|
||||
<stream name="pos"/>
|
||||
<uniform name="transform" loc="0" type="mat4"/>
|
||||
<uniform name="losTransform" loc="4" type="vec2"/>
|
||||
<uniform name="time" loc="5" type="float"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/water_simple.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D"/>
|
||||
<uniform name="losTex" loc="1" type="sampler2D"/>
|
||||
<uniform name="color" loc="2" type="vec4"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="canvas2d">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="debug_overlay"/>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
<effect>
|
||||
<technique>
|
||||
<define name="DEBUG_TEXTURED" value="1"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="debug_overlay">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="dummy"/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="foreground_overlay"/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="los_interp"/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="minimap">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<define name="MINIMAP_LOS" value="1"/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="overlayline"/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="overlay_solid"/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="particle">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="particle">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="particle">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="particle">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<require context="MODE_WIREFRAME"/>
|
||||
|
|
@ -11,7 +10,6 @@
|
|||
</technique>
|
||||
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="particle_solid">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="particle">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="sky">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="solid"/>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
<effect>
|
||||
<technique>
|
||||
<require context="PASS_REFLECTIONS"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="terrain_base">
|
||||
|
|
@ -11,7 +10,6 @@
|
|||
</technique>
|
||||
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<require context="MODE_WIREFRAME"/>
|
||||
|
|
@ -21,7 +19,6 @@
|
|||
</technique>
|
||||
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="terrain_base"/>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
<effect>
|
||||
<technique>
|
||||
<require context="PASS_REFLECTIONS"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="terrain_blend">
|
||||
|
|
@ -13,7 +12,6 @@
|
|||
</technique>
|
||||
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<require context="MODE_WIREFRAME"/>
|
||||
|
|
@ -25,7 +23,6 @@
|
|||
</technique>
|
||||
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="terrain_blend">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
<effect>
|
||||
<technique>
|
||||
<require context="PASS_REFLECTIONS"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="terrain_decal">
|
||||
|
|
@ -13,7 +12,6 @@
|
|||
</technique>
|
||||
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<require context="MODE_WIREFRAME"/>
|
||||
|
|
@ -25,7 +23,6 @@
|
|||
</technique>
|
||||
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="terrain_decal">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
<effect>
|
||||
<technique>
|
||||
<require context="PASS_SHADOWS || MODE_SILHOUETTEOCCLUDER"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="dummy">
|
||||
|
|
@ -17,7 +16,6 @@
|
|||
</technique>
|
||||
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<require context="MODE_WIREFRAME"/>
|
||||
|
|
@ -27,7 +25,6 @@
|
|||
</technique>
|
||||
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="dummy"/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<effect>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<require context="MODE_WIREFRAME"/>
|
||||
|
|
@ -12,7 +11,6 @@
|
|||
</technique>
|
||||
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="water_simple">
|
||||
|
|
|
|||
|
|
@ -1,159 +0,0 @@
|
|||
!!ARBfp1.0
|
||||
#if USE_FP_SHADOW
|
||||
OPTION ARB_fragment_program_shadow;
|
||||
#endif
|
||||
|
||||
ATTRIB v_tex = fragment.texcoord[0];
|
||||
ATTRIB v_shadow = fragment.texcoord[1];
|
||||
ATTRIB v_los = fragment.texcoord[2];
|
||||
|
||||
#if USE_OBJECTCOLOR
|
||||
PARAM objectColor = program.local[0];
|
||||
#else
|
||||
#if USE_PLAYERCOLOR
|
||||
PARAM playerColor = program.local[0];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
PARAM shadingColor = program.local[1];
|
||||
PARAM ambient = program.local[2];
|
||||
|
||||
#if USE_FP_SHADOW && USE_SHADOW_PCF
|
||||
PARAM shadowScale = program.local[3];
|
||||
TEMP offset, size, weight, depthSample;
|
||||
#endif
|
||||
|
||||
#if USE_SPECULAR
|
||||
ATTRIB v_normal = fragment.texcoord[3];
|
||||
ATTRIB v_half = fragment.texcoord[4];
|
||||
PARAM specularPower = program.local[4];
|
||||
PARAM specularColor = program.local[5];
|
||||
PARAM sunColor = program.local[6];
|
||||
#endif
|
||||
|
||||
TEMP tex;
|
||||
TEMP texdiffuse;
|
||||
TEMP sundiffuse;
|
||||
TEMP temp;
|
||||
TEMP color;
|
||||
TEMP shadow;
|
||||
|
||||
TEX tex, v_tex, texture[0], 2D;
|
||||
|
||||
// Alpha-test as early as possible
|
||||
#ifdef REQUIRE_ALPHA_GEQUAL
|
||||
SUB temp.x, tex.a, REQUIRE_ALPHA_GEQUAL;
|
||||
KIL temp.x; // discard if < 0.0
|
||||
#endif
|
||||
|
||||
#if USE_TRANSPARENT
|
||||
MOV result.color.a, tex;
|
||||
#endif
|
||||
|
||||
// Apply coloring based on texture alpha
|
||||
#if USE_OBJECTCOLOR
|
||||
LRP temp.rgb, objectColor, 1.0, tex.a;
|
||||
MUL texdiffuse.rgb, tex, temp;
|
||||
#else
|
||||
#if USE_PLAYERCOLOR
|
||||
LRP temp.rgb, playerColor, 1.0, tex.a;
|
||||
MUL texdiffuse.rgb, tex, temp;
|
||||
#else
|
||||
MOV texdiffuse.rgb, tex;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if USE_SPECULAR
|
||||
// specular = sunColor * specularColor * pow(max(0.0, dot(normalize(v_normal), v_half)), specularPower);
|
||||
TEMP specular;
|
||||
TEMP normal;
|
||||
MUL specular.rgb, specularColor, sunColor;
|
||||
DP3 normal.w, v_normal, v_normal;
|
||||
RSQ normal.w, normal.w;
|
||||
MUL normal.xyz, v_normal, normal.w;
|
||||
DP3_SAT temp.y, normal, v_half;
|
||||
// temp^p = (2^lg2(temp))^p = 2^(lg2(temp)*p)
|
||||
LG2 temp.y, temp.y;
|
||||
MUL temp.y, temp.y, specularPower.x;
|
||||
EX2 temp.y, temp.y;
|
||||
// TODO: why not just use POW here? (should test performance first)
|
||||
MUL specular.rgb, specular, temp.y;
|
||||
#endif
|
||||
|
||||
// color = (texdiffuse * sundiffuse + specular) * get_shadow() + texdiffuse * ambient;
|
||||
// (sundiffuse is 2*fragment.color due to clamp-avoidance in the vertex program)
|
||||
#if USE_SHADOW && !DISABLE_RECEIVE_SHADOWS
|
||||
TEMP shadowBias;
|
||||
TEMP biasedShdw;
|
||||
MOV shadowBias.x, 0.003;
|
||||
MOV biasedShdw, v_shadow;
|
||||
SUB biasedShdw.z, v_shadow.z, shadowBias.x;
|
||||
#if USE_FP_SHADOW
|
||||
#if USE_SHADOW_PCF
|
||||
SUB offset.xy, v_shadow, 0.5;
|
||||
FRC offset.xy, offset;
|
||||
ADD size.xy, offset, 1.0;
|
||||
SUB size.zw, 2.0, offset.xyxy;
|
||||
|
||||
MAD offset.xy, -0.5, offset, v_shadow;
|
||||
MOV offset.z, biasedShdw.z;
|
||||
ADD weight, { 1.0, 1.0, -0.5, -0.5 }, offset.xyxy;
|
||||
MUL weight, weight, shadowScale.zwzw;
|
||||
|
||||
MOV offset.xy, weight.zwww;
|
||||
TEX depthSample.r, offset, texture[1], SHADOW2D;
|
||||
MOV temp.x, depthSample.r;
|
||||
MOV offset.x, weight.x;
|
||||
TEX depthSample.r, offset, texture[1], SHADOW2D;
|
||||
MOV temp.y, depthSample.r;
|
||||
MOV offset.xy, weight.zyyy;
|
||||
TEX depthSample.r, offset, texture[1], SHADOW2D;
|
||||
MOV temp.z, depthSample.r;
|
||||
MOV offset.x, weight.x;
|
||||
TEX depthSample.r, offset, texture[1], SHADOW2D;
|
||||
MOV temp.w, depthSample.r;
|
||||
|
||||
MUL size, size.zxzx, size.wwyy;
|
||||
DP4 shadow.x, temp, size;
|
||||
MUL shadow.x, shadow.x, 0.111111;
|
||||
#else
|
||||
TEX shadow.x, biasedShdw, texture[1], SHADOW2D;
|
||||
#endif
|
||||
#else
|
||||
TEX tex, v_shadow, texture[1], 2D;
|
||||
MOV_SAT temp.z, biasedShdw.z;
|
||||
SGE shadow.x, tex.x, temp.z;
|
||||
#endif
|
||||
|
||||
MUL sundiffuse.rgb, fragment.color, 2.0;
|
||||
|
||||
#if USE_SPECULAR
|
||||
MAD color.rgb, texdiffuse, sundiffuse, specular;
|
||||
MUL temp.rgb, texdiffuse, ambient;
|
||||
MAD color.rgb, color, shadow.x, temp;
|
||||
#else
|
||||
MAD temp.rgb, sundiffuse, shadow.x, ambient;
|
||||
MUL color.rgb, texdiffuse, temp;
|
||||
#endif
|
||||
|
||||
#else
|
||||
#if USE_SPECULAR
|
||||
MAD temp.rgb, fragment.color, 2.0, ambient;
|
||||
MAD color.rgb, texdiffuse, temp, specular;
|
||||
#else
|
||||
MAD temp.rgb, fragment.color, 2.0, ambient;
|
||||
MUL color.rgb, texdiffuse, temp;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !IGNORE_LOS
|
||||
// Multiply everything by the LOS texture
|
||||
TEX tex.r, v_los, texture[2], 2D;
|
||||
SUB tex.r, tex.r, 0.03;
|
||||
MUL tex.r, tex.r, 0.97;
|
||||
MUL color.rgb, color, tex.r;
|
||||
#endif
|
||||
|
||||
MUL result.color.rgb, color, shadingColor;
|
||||
|
||||
END
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
|
||||
PARAM cameraPos = program.local[0];
|
||||
PARAM sunDir = program.local[1];
|
||||
PARAM sunColor = program.local[2];
|
||||
PARAM losTransform = program.local[3];
|
||||
PARAM shadowTransform[4] = { program.local[4..7] };
|
||||
#if USE_INSTANCING
|
||||
PARAM instancingTransform[4] = { program.local[8..11] };
|
||||
#endif
|
||||
PARAM transform[4] = { program.local[16..19] };
|
||||
|
||||
#if USE_FP_SHADOW && USE_SHADOW_PCF
|
||||
PARAM shadowScale = program.local[12];
|
||||
#endif
|
||||
|
||||
TEMP temp;
|
||||
TEMP lighting;
|
||||
|
||||
OUTPUT v_tex = result.texcoord[0];
|
||||
OUTPUT v_shadow = result.texcoord[1];
|
||||
OUTPUT v_los = result.texcoord[2];
|
||||
#if USE_SPECULAR
|
||||
OUTPUT v_normal = result.texcoord[3];
|
||||
OUTPUT v_half = result.texcoord[4];
|
||||
#endif
|
||||
|
||||
//// Compute position and normal:
|
||||
|
||||
#if USE_INSTANCING
|
||||
TEMP position;
|
||||
TEMP normal;
|
||||
DP4 position.x, instancingTransform[0], vertex.position;
|
||||
DP4 position.y, instancingTransform[1], vertex.position;
|
||||
DP4 position.z, instancingTransform[2], vertex.position;
|
||||
MOV position.w, 1.0;
|
||||
DP3 normal.x, instancingTransform[0], vertex.normal;
|
||||
DP3 normal.y, instancingTransform[1], vertex.normal;
|
||||
DP3 normal.z, instancingTransform[2], vertex.normal;
|
||||
#else
|
||||
ATTRIB position = vertex.position;
|
||||
ATTRIB normal = vertex.normal;
|
||||
#endif
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
//// Compute lighting:
|
||||
|
||||
// Diffuse factor
|
||||
DP3 lighting, normal, -sunDir;
|
||||
MAX lighting, 0.0, lighting;
|
||||
// Scale diffuse to allow overbrightness (since result.color will be clamped to [0, 1])
|
||||
MUL lighting, lighting, 0.5;
|
||||
// Apply light color
|
||||
MUL result.color, lighting, sunColor;
|
||||
|
||||
#if USE_SPECULAR
|
||||
// eyeVec = normalize(cameraPos - position);
|
||||
TEMP eyeVec;
|
||||
SUB eyeVec.xyz, cameraPos, position;
|
||||
DP3 eyeVec.w, eyeVec, eyeVec;
|
||||
RSQ eyeVec.w, eyeVec.w;
|
||||
MUL eyeVec.xyz, eyeVec, eyeVec.w;
|
||||
|
||||
// v_half = normalize(-sunDir + eyeVec);
|
||||
TEMP half;
|
||||
SUB half.xyz, eyeVec, sunDir;
|
||||
DP3 half.w, half, half;
|
||||
RSQ half.w, half.w;
|
||||
MUL v_half.xyz, half, half.w;
|
||||
|
||||
MOV v_normal, normal;
|
||||
#endif
|
||||
|
||||
//// Texture coordinates:
|
||||
|
||||
MOV v_tex, vertex.texcoord[0];
|
||||
|
||||
#if USE_SHADOW
|
||||
#if USE_FP_SHADOW && USE_SHADOW_PCF
|
||||
TEMP shadowtc;
|
||||
DP4 shadowtc.x, shadowTransform[0], position;
|
||||
DP4 shadowtc.y, shadowTransform[1], position;
|
||||
MUL v_shadow.xy, shadowtc, shadowScale;
|
||||
#else
|
||||
DP4 v_shadow.x, shadowTransform[0], position;
|
||||
DP4 v_shadow.y, shadowTransform[1], position;
|
||||
#endif
|
||||
DP4 v_shadow.z, shadowTransform[2], position;
|
||||
DP4 v_shadow.w, shadowTransform[3], position;
|
||||
#endif
|
||||
|
||||
MAD v_los, position.xzzz, losTransform.x, losTransform.y;
|
||||
|
||||
END
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/model_common.vp">
|
||||
<uniform name="cameraPos" loc="0" type="vec3"/>
|
||||
<uniform name="sunDir" loc="1" type="vec3"/>
|
||||
<uniform name="sunColor" loc="2" type="vec3"/>
|
||||
<uniform name="losTransform" loc="3" type="vec2"/>
|
||||
<uniform name="shadowTransform" loc="4" type="mat4"/>
|
||||
<uniform if="USE_INSTANCING" name="instancingTransform" loc="8" type="mat4"/>
|
||||
<uniform name="shadowScale" loc="12" type="vec4"/>
|
||||
<uniform name="transform" loc="16" type="mat4"/>
|
||||
<stream name="pos"/>
|
||||
<stream name="normal"/>
|
||||
<stream name="uv0"/>
|
||||
<stream name="uv1" if="USE_AO"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/model_common.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D"/>
|
||||
<uniform name="shadowTex" loc="1" type="sampler2DShadow"/>
|
||||
<uniform name="losTex" loc="2" type="sampler2D"/>
|
||||
|
||||
<uniform if="USE_OBJECTCOLOR" name="objectColor" loc="0" type="vec3"/>
|
||||
<uniform if="USE_PLAYERCOLOR" name="playerColor" loc="0" type="vec3"/>
|
||||
<uniform name="shadingColor" loc="1" type="vec3"/>
|
||||
<uniform name="ambient" loc="2" type="vec3"/>
|
||||
<uniform name="shadowScale" loc="3" type="vec4"/>
|
||||
<uniform name="specularPower" loc="4" type="float"/>
|
||||
<uniform name="specularColor" loc="5" type="vec3"/>
|
||||
<uniform name="sunColor" loc="6" type="vec3"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
!!ARBvp1.0
|
||||
#ifdef USE_INSTANCING
|
||||
PARAM instancingTransform[4] = { program.local[0..3] };
|
||||
TEMP position;
|
||||
DP4 position.x, instancingTransform[0], vertex.position;
|
||||
DP4 position.y, instancingTransform[1], vertex.position;
|
||||
DP4 position.z, instancingTransform[2], vertex.position;
|
||||
MOV position.w, 1.0;
|
||||
#else
|
||||
ATTRIB position = vertex.position;
|
||||
#endif
|
||||
|
||||
PARAM transform[4] = { program.local[4..7] };
|
||||
|
||||
DP4 result.position.x, transform[0], position;
|
||||
DP4 result.position.y, transform[1], position;
|
||||
DP4 result.position.z, transform[2], position;
|
||||
DP4 result.position.w, transform[3], position;
|
||||
|
||||
MOV result.color, vertex.color;
|
||||
|
||||
END
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/model_solid.vp">
|
||||
<uniform if="USE_INSTANCING" name="instancingTransform" loc="0" type="mat4"/>
|
||||
<uniform name="transform" loc="4" type="mat4"/>
|
||||
<stream name="pos"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/solid.fp"/>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/model_solid.vp">
|
||||
<uniform if="USE_INSTANCING" name="instancingTransform" loc="0" type="mat4"/>
|
||||
<uniform name="transform" loc="4" type="mat4"/>
|
||||
<stream name="pos"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/solid_color.fp">
|
||||
<uniform name="playerColor" loc="0" type="vec3"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<program type="arb">
|
||||
|
||||
<vertex file="arb/solid_tex.vp">
|
||||
<uniform if="USE_INSTANCING" name="instancingTransform" loc="0" type="mat4"/>
|
||||
<uniform name="transform" loc="4" type="mat4"/>
|
||||
<stream name="pos"/>
|
||||
<stream name="uv0"/>
|
||||
</vertex>
|
||||
|
||||
<fragment file="arb/solid_tex.fp">
|
||||
<uniform name="baseTex" loc="0" type="sampler2D"/>
|
||||
</fragment>
|
||||
|
||||
</program>
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
<effect>
|
||||
<technique>
|
||||
<require context="PASS_REFLECTIONS"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_common">
|
||||
|
|
@ -12,7 +11,6 @@
|
|||
|
||||
<technique>
|
||||
<require context="MODE_SHADOWCAST || MODE_SILHOUETTEOCCLUDER"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_solid">
|
||||
|
|
@ -22,7 +20,6 @@
|
|||
|
||||
<technique>
|
||||
<require context="MODE_WIREFRAME"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_common">
|
||||
|
|
@ -32,7 +29,6 @@
|
|||
|
||||
<technique>
|
||||
<require context="MODE_WIREFRAME_SOLID"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_solid_player">
|
||||
|
|
@ -42,7 +38,6 @@
|
|||
|
||||
<technique>
|
||||
<require context="MODE_SILHOUETTEDISPLAY"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_solid_player">
|
||||
|
|
@ -53,7 +48,6 @@
|
|||
</technique>
|
||||
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_common"/>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
<technique>
|
||||
<require context="MODE_SHADOWCAST || MODE_SILHOUETTEOCCLUDER"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_solid_tex">
|
||||
|
|
@ -21,7 +20,6 @@
|
|||
-->
|
||||
<technique>
|
||||
<require context="MODE_SILHOUETTEDISPLAY"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_solid_player">
|
||||
|
|
@ -32,7 +30,6 @@
|
|||
|
||||
<technique>
|
||||
<require context="MODE_WIREFRAME_SOLID"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_solid_player">
|
||||
|
|
@ -42,7 +39,6 @@
|
|||
|
||||
<technique>
|
||||
<require context="MODE_WIREFRAME"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_common">
|
||||
|
|
@ -57,7 +53,6 @@
|
|||
<technique>
|
||||
<require context="PASS_REFLECTIONS"/>
|
||||
<require context="ALPHABLEND_PASS_OPAQUE"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_common">
|
||||
|
|
@ -70,7 +65,6 @@
|
|||
<technique>
|
||||
<require context="PASS_REFLECTIONS"/>
|
||||
<require context="ALPHABLEND_PASS_BLEND"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_common">
|
||||
|
|
@ -84,7 +78,6 @@
|
|||
|
||||
<technique>
|
||||
<require context="ALPHABLEND_PASS_OPAQUE"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_common">
|
||||
|
|
@ -95,7 +88,6 @@
|
|||
|
||||
<technique>
|
||||
<require context="ALPHABLEND_PASS_BLEND"/>
|
||||
<require shaders="arb"/>
|
||||
<require shaders="glsl"/>
|
||||
<require shaders="spirv"/>
|
||||
<pass shader="model_common">
|
||||
|
|
|
|||
|
|
@ -14,7 +14,4 @@
|
|||
<depth func="less" mask="true"/>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
</technique>
|
||||
</effect>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,4 @@
|
|||
<depth func="lequal" mask="true"/>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique>
|
||||
<require shaders="arb"/>
|
||||
</technique>
|
||||
</effect>
|
||||
|
|
|
|||
Loading…
Reference in a new issue