Merge remote-tracking branch 'lazaroth/Tweaks'

celladd
Marc Zinnschlag 10 years ago
commit 8292b22e2f

@ -4,7 +4,7 @@
#define SIMPLE_WATER @shGlobalSettingBool(simple_water)
#if SIMPLE_WATER
// --------------------------------------- SIMPLE WATER ---------------------------------------------------
// --------------------------------------- SIMPLE WATER ---------------------------------------------------
#define FOG @shGlobalSettingBool(fog)
@ -42,7 +42,7 @@
{
shOutputColour(0).xyz = shSample(animatedTexture, UV * float2(15.0, 15.0)).xyz * float3(1.0, 1.0, 1.0);
shOutputColour(0).w = 0.7;
#if FOG
float fogValue = shSaturate((depth - fogParams.y) * fogParams.w);
shOutputColour(0).xyz = shLerp (shOutputColour(0).xyz, fogColor, fogValue);
@ -71,7 +71,7 @@
SH_BEGIN_PROGRAM
shUniform(float4x4, wvp) @shAutoConstant(wvp, worldviewproj_matrix)
shOutput(float3, screenCoordsPassthrough)
shOutput(float4, position)
shOutput(float, depthPassthrough)
@ -96,25 +96,25 @@
SH_START_PROGRAM
{
shOutputPosition = shMatrixMult(wvp, shInputPosition);
#if !SH_GLSL
float4x4 scalemat = float4x4( 0.5, 0.0, 0.0, 0.5,
0.0, -0.5, 0.0, 0.5,
0.0, 0.0, 0.5, 0.5,
0.0, 0.0, 0.0, 1.0 );
#else
mat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0,
#else
mat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0,
0.0, -0.5, 0.0, 0.0,
0.0, 0.0, 0.5, 0.0,
0.5, 0.5, 0.5, 1.0);
#endif
float4 texcoordProj = shMatrixMult(scalemat, shOutputPosition);
screenCoordsPassthrough = float3(texcoordProj.x, texcoordProj.y, texcoordProj.w);
position = shInputPosition;
depthPassthrough = shOutputPosition.z;
@ -135,29 +135,28 @@
#define VISIBILITY 1500.0 // how far you can look through water
#define BIG_WAVES_X 0.3 // strength of big waves
#define BIG_WAVES_Y 0.3
#define MID_WAVES_X 0.3 // strength of middle sized waves
#define MID_WAVES_Y 0.15
#define SMALL_WAVES_X 0.15 // strength of small waves
#define SMALL_WAVES_Y 0.1
#define WAVE_CHOPPYNESS 0.15 // wave choppyness
#define WAVE_SCALE 75.0 // overall wave scale
#define BIG_WAVES_X 0.1 // strength of big waves
#define BIG_WAVES_Y 0.1
#define MID_WAVES_X 0.1 // strength of middle sized waves
#define MID_WAVES_Y 0.1
#define SMALL_WAVES_X 0.1 // strength of small waves
#define SMALL_WAVES_Y 0.1
#define BUMP 1.5 // overall water surface bumpiness
#define REFL_BUMP 0.08 // reflection distortion amount
#define WAVE_CHOPPYNESS 0.05 // wave choppyness
#define WAVE_SCALE 75.0 // overall wave scale
#define BUMP 0.5 // overall water surface bumpiness
#define REFL_BUMP 0.15 // reflection distortion amount
#define REFR_BUMP 0.06 // refraction distortion amount
#define SCATTER_AMOUNT 0.3 // amount of sunlight scattering
#define SCATTER_COLOUR float3(0.0,1.0,0.95) // colour of sunlight scattering
#define SUN_EXT float3(0.45, 0.55, 0.68) //sunlight extinction
#define SPEC_HARDNESS 256.0 // specular highlights hardness
#define SUN_EXT float3(0.45, 0.55, 0.68) //sunlight extinction
#define SPEC_HARDNESS 256.0 // specular highlights hardness
// ---------------------------------------------------------------
@ -192,9 +191,9 @@
shUniform(float3, rippleCenter) @shSharedParameter(rippleCenter, rippleCenter)
shUniform(float, rippleAreaLength) @shSharedParameter(rippleAreaLength, rippleAreaLength)
#endif
shUniform(float, far) @shAutoConstant(far, far_clip_distance)
shSampler2D(reflectionMap)
#if REFRACTION
shSampler2D(refractionMap)
@ -207,23 +206,23 @@
#if RIPPLES
shSampler2D(rippleNormalMap)
#endif
shUniform(float3, windDir_windSpeed) @shSharedParameter(windDir_windSpeed)
#define WIND_SPEED windDir_windSpeed.z
#define WIND_DIR windDir_windSpeed.xy
shUniform(float, waterTimer) @shSharedParameter(waterTimer)
shUniform(float2, waterSunFade_sunHeight) @shSharedParameter(waterSunFade_sunHeight)
shUniform(float4, sunPosition) @shAutoConstant(sunPosition, light_position, 0)
shUniform(float4, sunSpecular) @shAutoConstant(sunSpecular, light_specular_colour, 0)
shUniform(float, renderTargetFlipping) @shAutoConstant(renderTargetFlipping, render_target_flipping)
shUniform(float3, fogColor) @shAutoConstant(fogColor, fog_colour)
shUniform(float4, fogParams) @shAutoConstant(fogParams, fog_params)
shUniform(float4, cameraPos) @shAutoConstant(cameraPos, camera_position_object_space)
@ -244,7 +243,7 @@
#if SHADOWS || SHADOWS_PSSM
shUniform(float4, shadowFar_fadeStart) @shSharedParameter(shadowFar_fadeStart)
#endif
SH_START_PROGRAM
{
@ -279,19 +278,19 @@
float3 normal0 = 2.0 * shSample(normalMap, nCoord + float2(-waterTimer*0.015,-waterTimer*0.005)).rgb - 1.0;
nCoord = UV * (WAVE_SCALE * 0.1) + WIND_DIR * waterTimer * (WIND_SPEED*0.08)-(normal0.xy/normal0.zz)*WAVE_CHOPPYNESS;
float3 normal1 = 2.0 * shSample(normalMap, nCoord + float2(+waterTimer*0.020,+waterTimer*0.015)).rgb - 1.0;
nCoord = UV * (WAVE_SCALE * 0.25) + WIND_DIR * waterTimer * (WIND_SPEED*0.07)-(normal1.xy/normal1.zz)*WAVE_CHOPPYNESS;
float3 normal2 = 2.0 * shSample(normalMap, nCoord + float2(-waterTimer*0.04,-waterTimer*0.03)).rgb - 1.0;
nCoord = UV * (WAVE_SCALE * 0.5) + WIND_DIR * waterTimer * (WIND_SPEED*0.09)-(normal2.xy/normal2.z)*WAVE_CHOPPYNESS;
float3 normal3 = 2.0 * shSample(normalMap, nCoord + float2(+waterTimer*0.03,+waterTimer*0.04)).rgb - 1.0;
nCoord = UV * (WAVE_SCALE* 1.0) + WIND_DIR * waterTimer * (WIND_SPEED*0.4)-(normal3.xy/normal3.zz)*WAVE_CHOPPYNESS;
float3 normal4 = 2.0 * shSample(normalMap, nCoord + float2(-waterTimer*0.02,+waterTimer*0.1)).rgb - 1.0;
float3 normal4 = 2.0 * shSample(normalMap, nCoord + float2(-waterTimer*0.02,+waterTimer*0.1)).rgb - 1.0;
nCoord = UV * (WAVE_SCALE * 2.0) + WIND_DIR * waterTimer * (WIND_SPEED*0.7)-(normal4.xy/normal4.zz)*WAVE_CHOPPYNESS;
float3 normal5 = 2.0 * shSample(normalMap, nCoord + float2(+waterTimer*0.1,-waterTimer*0.06)).rgb - 1.0;
float3 normal = (normal0 * BIG_WAVES_X + normal1 * BIG_WAVES_Y +
normal2 * MID_WAVES_X + normal3 * MID_WAVES_Y +
normal4 * SMALL_WAVES_X + normal5 * SMALL_WAVES_Y);
@ -304,25 +303,25 @@
normal = normalize(float3(normal.x * BUMP + normal_ripple.x, normal.y * BUMP + normal_ripple.y, normal.z));
normal = float3(normal.x, normal.y, -normal.z);
// normal for sunlight scattering
// normal for sunlight scattering
float3 lNormal = (normal0 * BIG_WAVES_X*0.5 + normal1 * BIG_WAVES_Y*0.5 +
normal2 * MID_WAVES_X*0.2 + normal3 * MID_WAVES_Y*0.2 +
normal4 * SMALL_WAVES_X*0.1 + normal5 * SMALL_WAVES_Y*0.1).xyz;
lNormal = normalize(float3(lNormal.x * BUMP, lNormal.y * BUMP, lNormal.z));
lNormal = float3(lNormal.x, lNormal.y, -lNormal.z);
float3 lVec = normalize(sunPosition.xyz);
float3 vVec = normalize(position.xyz - cameraPos.xyz);
float isUnderwater = (cameraPos.z > 0.0) ? 0.0 : 1.0;
// sunlight scattering
float3 pNormal = float3(0,0,1);
float3 lR = reflect(lVec, lNormal);
float3 llR = reflect(lVec, pNormal);
float s = shSaturate(dot(lR, vVec)*2.0-1.2);
float lightScatter = shadow * shSaturate(dot(-lVec,lNormal)*0.7+0.3) * s * SCATTER_AMOUNT * waterSunFade_sunHeight.x * shSaturate(1.0-exp(-waterSunFade_sunHeight.y));
float3 scatterColour = shLerp(float3(SCATTER_COLOUR)*float3(1.0,0.4,0.0), SCATTER_COLOUR, shSaturate(1.0-exp(-waterSunFade_sunHeight.y*SUN_EXT)));
@ -330,12 +329,12 @@
// fresnel
float ior = (cameraPos.z>0.0)?(1.333/1.0):(1.0/1.333); //air to water; water to air
float fresnel = fresnel_dielectric(-vVec, normal, ior);
fresnel = shSaturate(fresnel);
// reflection
float3 reflection = shSample(reflectionMap, screenCoords+(normal.xy*REFL_BUMP)).rgb;
// refraction
float3 R = reflect(vVec, normal);

@ -117,7 +117,7 @@
</Widget>
</Widget>
<Widget type="HBox" position="0 340 560 60">
<Widget type="HBox" position="0 340 558 60">
<Property key="Padding" value="16"/>
<Widget type="AutoSizedButton" skin="MW_Button" name="TypeButton">
@ -141,8 +141,6 @@
<Property key="Caption" value="0"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="BuyButton">
<Property key="Caption" value="#{sBuy}"/>
</Widget>

@ -4,7 +4,6 @@
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 418 248" name="_Main">
<Property key="Visible" value="false"/>
<Widget type="TextBox" skin="SandText" position="8 18 418 24" align="Right Top">
<Property key="TextAlign" value="Left"/>
<Property key="Caption" value="#{sRepairServiceTitle}"/>
@ -20,10 +19,10 @@
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="10 210 300 24" name="PlayerGold" align="Right Top">
<Widget type="TextBox" skin="SandText" position="10 206 300 24" name="PlayerGold" align="Right Top">
<Property key="TextAlign" value="Left"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="343 210 60 24" name="OkButton" align="Right Top">
<Widget type="AutoSizedButton" skin="MW_Button" position="343 210 56 24" name="OkButton" align="Right Top">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="#{sOK}"/>
</Widget>

@ -1,17 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 220 194" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 220 192" name="_Main">
<Widget type="TextBox" skin="NormalText" position="0 6 220 24">
<Widget type="TextBox" skin="NormalText" position="0 4 220 24">
<Property key="Caption" value="#{sPersuasionMenuTitle}"/>
<Property key="TextAlign" value="Center"/>
</Widget>
<Widget type="TextBox" skin="SandText" position="8 156 208 24" name="GoldLabel">
<Property key="TextAlign" value="Left VCenter"/>
</Widget>
<Widget type="Widget" skin="MW_Box" position="8 32 196 115">
<Widget type="AutoSizedButton" skin="SandTextButton" position="4 0 0 18" name="AdmireButton">
<Property key="Caption" value="#{sAdmire}"/>
@ -39,7 +35,11 @@
</Widget>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="204 156 0 24" name="CancelButton">
<Widget type="TextBox" skin="SandText" position="8 152 208 24" name="GoldLabel">
<Property key="TextAlign" value="Left VCenter"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="204 154 0 24" name="CancelButton">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="#{sCancel}"/>
</Widget>

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 450 300" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 450 306" name="_Main">
<Property key="Visible" value="false"/>
<Widget type="TextBox" skin="SandText" position="8 10 450 18" align="Right Top">
<Property key="TextAlign" value="Left"/>
<Property key="Caption" value="#{sSpellServiceTitle}"/>
@ -14,14 +13,12 @@
<Property key="Caption" value="#{sServiceSpellsTitle}"/>
</Widget>
<Widget type="Widget" skin="MW_Box" position="6 31 430 225" align="Left Stretch">
<Widget type="ScrollView" skin="MW_ScrollView" position="4 4 422 217" align="Left Top Stretch" name="SpellsView">
<Property key="CanvasAlign" value="Left"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="8 255 24 24" name="PlayerGold" align="Right Top">
<Property key="TextAlign" value="Right"/>
</Widget>

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 560 400" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 560 394" name="_Main">
<Widget type="HBox" position="12 12 250 30">
<Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="#{sName}"/>
<UserString key="ToolTipType" value="Layout"/>
@ -16,9 +15,7 @@
<UserString key="HStretch" value="true"/>
</Widget>
<Widget type="Widget">
</Widget>
<Widget type="Widget"/>
</Widget>
<Widget type="TextBox" skin="NormalText" position="280 0 300 24">
@ -33,7 +30,6 @@
<Property key="NeedMouse" value="false"/>
</Widget>
<Widget type="TextBox" skin="NormalText" position="280 24 300 24">
<Property key="Caption" value="#{sSpellmakingMenu1}"/>
<Property key="TextAlign" value="Left HCenter"/>
@ -46,7 +42,6 @@
<Property key="NeedMouse" value="false"/>
</Widget>
<!-- Available effects -->
<Widget type="TextBox" skin="NormalText" position="12 48 300 24">
<Property key="Caption" value="#{sMagicEffects}"/>
@ -70,7 +65,7 @@
</Widget>
</Widget>
<Widget type="HBox" position="0 340 560 60">
<Widget type="HBox" position="0 336 558 60">
<Property key="Padding" value="16"/>
<Widget type="Widget" position="0 0 0 0">

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 450 300" name="_Main">
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 450 304" name="_Main">
<Property key="Visible" value="false"/>
<Widget type="TextBox" skin="SandText" position="8 10 24 24" name="Select" align="Right Top">
<Property key="TextAlign" value="Right"/>
<Property key="Caption" value="#{sTravelServiceTitle}"/>
@ -21,11 +20,10 @@
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="8 255 24 24" name="PlayerGold" align="Right Top">
<Property key="TextAlign" value="Right"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="375 260 60 24" name="CancelButton" align="Right Top">
<Widget type="AutoSizedButton" skin="MW_Button" position="375 261 60 24" name="CancelButton" align="Right Top">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="#{sCancel}"/>
</Widget>

@ -173,9 +173,9 @@ device =
# Volumes. master volume affects all other volumes.
master volume = 1.0
sfx volume = 1.0
music volume = 0.4
footsteps volume = 0.15
voice volume = 1.0
music volume = 0.5
footsteps volume = 0.2
voice volume = 0.8
[Input]

Loading…
Cancel
Save