Is there anyway we can contact Phal to help with godrays working or a new water shader? His MGE stuff is very beautiful!
If the authors of MGE shaders give permission, converting shaders is real easy. In fact just changing three words is enough to convert all mge shaders to obge. The problem is variables for them:
Here is the code for finding sun position.
variables
float3 suncol;float3 eyevec;float3 eyepos;float3 sunpos;float sunvis;float waterlevel;float fogrange;
static const float3 sundir = -normalize(sunpos);static const float2 texproj = 0.5f * float2( 1 , - rcpres.y / rcpres.x ) / tan(radians(fov * 0.5));static const float d = dot(eyevec,sunpos);static const float3 sunview_v = mul(sunpos/d, mview);static const float2 sunview = (0.5).xx + sunview_v.xy * texproj;
This is the third iteration and most accurate one. First iteration was using a less accurate but working one with eyevec and sunpos only.
First iteration. Only sunpos and eyevec.
static const float3 sundir = -normalize(sunpos);static float t = tan(radians(fov * 0.5));static const float3 t1 = normalize(cross(eyevec,float3(0,0,1)));static const float3 t2 = normalize(cross(eyevec,t1));static const float2 proj = float2(dot(sundir,t1),dot(sundir,t2));static const float d = sqrt(1-(proj.x*proj.x)-(proj.y*proj.y));static const float2 sunview = float2(0.5,0.5) - 0.5f * float2( proj.x/d , proj.y/d * rcpres.y / rcpres.x )/t;
PS. What can you do with shaders is amazing. Just found a new way to use depth.
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/splashshader/Morrowind-MGE-Vivec1.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/splashshader/Morrowind-MGE-alit2.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/splashshader/Morrowind-MGE-deskdetail.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/splashshader/Morrowind-MGE-dremora.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/splashshader/Morrowind-MGE-guar4.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/splashshader/Morrowind-MGE-jiub2.jpg
More:http://s51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/splashshader/
That was an extension of toon shader:
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/cel%20shader/Morrowind-MGE-boatontheriver.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/cel%20shader/Morrowind-MGE-darkness2.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/cel%20shader/Morrowind-MGE-libraryclose.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/cel%20shader/Morrowind-MGE-Okami.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/cel%20shader/Morrowind-MGE-mushrooms.jpg
More:http://s51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/cel%20shader/
Bonus:
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/sc06/Morrowind-MGE-rivershot.jpg
More: http://s51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/sc06/