A home for quality shaders and shader development for http://www.gamesas.com/topic/1461152-shelter-from-magnus-blaze-13-mge-xe/.
http://www.gamesas.com/topic/1462188-mge-xe-shaders-library-and-development/.
Shader Index
Post-process shaders
These are installed to the Data Files/shaders/XEshaders directory.
-Name -----------Author ------------Sample ------------------Download ------------
HDR . . . . . . . . . . . . . seventyfour . . . . . . . . http://i.imgur.com/gl6NKh.jpg / http://imgur.com/a/w5PFX#0 . . . . . . . . . . . http://www.mediafire.com/download.php?01t6rve6xzt1h20
FXAA . . . . . . . . . . . . J. Bottcher . . . . . . . . . . http://i.cubeupload.com/SpacMR.jpg / http://i.cubeupload.com/b0291P.jpg . . . . . . . . . . . . . . . . http://www.gamesas.com/topic/1462188-mge-xe-shaders-library-and-development/page-4#entry23601028
Film grain . . . . . . . . wrinklyninja . . . . . . . . http://i.imgur.com/5b5CZES.jpg . . . . . . . . . . . . . . . . . . http://www.gamesas.com/topic/1462188-mge-xe-shaders-library-and-development/?p=22727586
Accepting submissions...
Please submit sample screenshots with your shaders.
Shader Development
The shader implementation in MGE XE is significantly different than MGE for performance reasons.
Differences from MGE:
"lastframe" is not available, as it causes performance loss with SLI/Crossfire.
"thisframe" is not available, you should always use "lastshader" in the first pass to chain shaders properly.
clip() is not a viable means of preserving the source texture any more (it requires an inefficient copy), you must return the unmodified source colour.
Loading external textures is different, instead of texname strings use:
texture texAnyName < string src="http://forums.bethsoft.com/topic/1586358-mge-xe-shaders-library-and-development-2/texturefile.dds"; >;
Available variables:
texture: lastshader, lastpass, depthframe, watertexture
float: fov, time, waterlevel, sunvis, fogstart, fogrange
float2: rcpres
float3: eyevec, eyepos, sunvec, suncol, sunamb, sunpos, fogcol
float4: HDR
matrix: mview, mproj
bool: isInterior, isUnderwater
Lots more info on variables when I have time. Yes, this needs work. Please wait.
To make a shader that MGE XE will load and verify you will need one thing, a technique with a compatible MGEinterface annotation and one or more pixel shader passes:
technique T0 < string MGEinterface="MGE XE 0"; >
{
pass { PixelShader = compile ps_3_0 pass1(); }
pass { PixelShader = compile ps_3_0 pass2(); }
}