mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Merged merge request !24
This commit is contained in:
commit
111407c282
2 changed files with 19 additions and 8 deletions
|
@ -78,6 +78,7 @@
|
||||||
Feature #4404: Editor: All EnumDelegate fields should have their items sorted alphabetically
|
Feature #4404: Editor: All EnumDelegate fields should have their items sorted alphabetically
|
||||||
Feature #4444: Per-group KF-animation files support
|
Feature #4444: Per-group KF-animation files support
|
||||||
Feature #4466: Editor: Add option to ignore "Base" records when running verifier
|
Feature #4466: Editor: Add option to ignore "Base" records when running verifier
|
||||||
|
Feature #4488: Make water shader rougher during rain
|
||||||
Feature #4012: Editor: Write a log file if OpenCS crashes
|
Feature #4012: Editor: Write a log file if OpenCS crashes
|
||||||
Feature #4509: Show count of enchanted items in stack in the spells list
|
Feature #4509: Show count of enchanted items in stack in the spells list
|
||||||
Feature #4512: Editor: Use markers for lights and creatures levelled lists
|
Feature #4512: Editor: Use markers for lights and creatures levelled lists
|
||||||
|
|
|
@ -13,14 +13,19 @@ const float BIG_WAVES_Y = 0.1;
|
||||||
|
|
||||||
const float MID_WAVES_X = 0.1; // strength of middle sized waves
|
const float MID_WAVES_X = 0.1; // strength of middle sized waves
|
||||||
const float MID_WAVES_Y = 0.1;
|
const float MID_WAVES_Y = 0.1;
|
||||||
|
const float MID_WAVES_RAIN_X = 0.2;
|
||||||
|
const float MID_WAVES_RAIN_Y = 0.2;
|
||||||
|
|
||||||
const float SMALL_WAVES_X = 0.1; // strength of small waves
|
const float SMALL_WAVES_X = 0.1; // strength of small waves
|
||||||
const float SMALL_WAVES_Y = 0.1;
|
const float SMALL_WAVES_Y = 0.1;
|
||||||
|
const float SMALL_WAVES_RAIN_X = 0.3;
|
||||||
|
const float SMALL_WAVES_RAIN_Y = 0.3;
|
||||||
|
|
||||||
const float WAVE_CHOPPYNESS = 0.05; // wave choppyness
|
const float WAVE_CHOPPYNESS = 0.05; // wave choppyness
|
||||||
const float WAVE_SCALE = 75.0; // overall wave scale
|
const float WAVE_SCALE = 75.0; // overall wave scale
|
||||||
|
|
||||||
const float BUMP = 0.5; // overall water surface bumpiness
|
const float BUMP = 0.5; // overall water surface bumpiness
|
||||||
|
const float BUMP_RAIN = 2.5;
|
||||||
const float REFL_BUMP = 0.10; // reflection distortion amount
|
const float REFL_BUMP = 0.10; // reflection distortion amount
|
||||||
const float REFR_BUMP = 0.07; // refraction distortion amount
|
const float REFR_BUMP = 0.07; // refraction distortion amount
|
||||||
|
|
||||||
|
@ -183,22 +188,27 @@ void main(void)
|
||||||
|
|
||||||
vec3 rippleAdd = rainRipple.xyz * rainRipple.w * 10.0;
|
vec3 rippleAdd = rainRipple.xyz * rainRipple.w * 10.0;
|
||||||
|
|
||||||
vec3 normal = (normal0 * BIG_WAVES_X + normal1 * BIG_WAVES_Y +
|
vec2 bigWaves = vec2(BIG_WAVES_X,BIG_WAVES_Y);
|
||||||
normal2 * MID_WAVES_X + normal3 * MID_WAVES_Y +
|
vec2 midWaves = mix(vec2(MID_WAVES_X,MID_WAVES_Y),vec2(MID_WAVES_RAIN_X,MID_WAVES_RAIN_Y),rainIntensity);
|
||||||
normal4 * SMALL_WAVES_X + normal5 * SMALL_WAVES_Y +
|
vec2 smallWaves = mix(vec2(SMALL_WAVES_X,SMALL_WAVES_Y),vec2(SMALL_WAVES_RAIN_X,SMALL_WAVES_RAIN_Y),rainIntensity);
|
||||||
|
float bump = mix(BUMP,BUMP_RAIN,rainIntensity);
|
||||||
|
|
||||||
|
vec3 normal = (normal0 * bigWaves.x + normal1 * bigWaves.y +
|
||||||
|
normal2 * midWaves.x + normal3 * midWaves.y +
|
||||||
|
normal4 * smallWaves.x + normal5 * smallWaves.y +
|
||||||
rippleAdd);
|
rippleAdd);
|
||||||
|
|
||||||
normal = normalize(vec3(normal.x * BUMP, normal.y * BUMP, normal.z));
|
normal = normalize(vec3(normal.x * bump, normal.y * bump, normal.z));
|
||||||
|
|
||||||
normal = vec3(-normal.x, -normal.y, normal.z);
|
normal = vec3(-normal.x, -normal.y, normal.z);
|
||||||
|
|
||||||
// normal for sunlight scattering
|
// normal for sunlight scattering
|
||||||
vec3 lNormal = (normal0 * BIG_WAVES_X*0.5 + normal1 * BIG_WAVES_Y*0.5 +
|
vec3 lNormal = (normal0 * bigWaves.x * 0.5 + normal1 * bigWaves.y * 0.5 +
|
||||||
normal2 * MID_WAVES_X*0.2 + normal3 * MID_WAVES_Y*0.2 +
|
normal2 * midWaves.x * 0.2 + normal3 * midWaves.y * 0.2 +
|
||||||
normal4 * SMALL_WAVES_X*0.1 + normal5 * SMALL_WAVES_Y*0.1 +
|
normal4 * smallWaves.x * 0.1 + normal5 * smallWaves.y * 0.1 +
|
||||||
rippleAdd).xyz;
|
rippleAdd).xyz;
|
||||||
|
|
||||||
lNormal = normalize(vec3(lNormal.x * BUMP, lNormal.y * BUMP, lNormal.z));
|
lNormal = normalize(vec3(lNormal.x * bump, lNormal.y * bump, lNormal.z));
|
||||||
lNormal = vec3(-lNormal.x, -lNormal.y, lNormal.z);
|
lNormal = vec3(-lNormal.x, -lNormal.y, lNormal.z);
|
||||||
|
|
||||||
vec3 lVec = normalize((gl_ModelViewMatrixInverse * vec4(gl_LightSource[0].position.xyz, 0.0)).xyz);
|
vec3 lVec = normalize((gl_ModelViewMatrixInverse * vec4(gl_LightSource[0].position.xyz, 0.0)).xyz);
|
||||||
|
|
Loading…
Reference in a new issue