mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-15 09:34:18 +02:00
#23 fix water surface mask near by ceiling, add blue tint for inventory background
This commit is contained in:
@@ -497,7 +497,11 @@ struct WaterCache {
|
|||||||
int xt = int(r.info.x + x * 1024 - rt.info.x) / 1024;
|
int xt = int(r.info.x + x * 1024 - rt.info.x) / 1024;
|
||||||
int zt = int(r.info.z + z * 1024 - rt.info.z) / 1024;
|
int zt = int(r.info.z + z * 1024 - rt.info.z) / 1024;
|
||||||
TR::Room::Sector &st = rt.sectors[xt * rt.zSectors + zt];
|
TR::Room::Sector &st = rt.sectors[xt * rt.zSectors + zt];
|
||||||
hasWater = s.ceiling > st.ceiling; // TODO fix for LEVEL10A, use slant
|
hasWater = s.ceiling > st.ceiling;
|
||||||
|
if (s.ceiling == st.ceiling) {
|
||||||
|
vec3 p = vec3(float(r.info.x + x * 1024 + 512), float(posY), float(r.info.z + z * 1024 + 512));
|
||||||
|
hasWater = (s.ceiling * 256 - level->getCeiling(&s, p)) > 8.0f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m[(x - minX) + w * (z - minZ)] = hasWater ? 0xF800 : 0;
|
m[(x - minX) + w * (z - minZ)] = hasWater ? 0xF800 : 0;
|
||||||
|
@@ -39,7 +39,7 @@ uniform vec4 uParam;
|
|||||||
vec4 grayscale() { // uParam (factor, unused, unused, unused)
|
vec4 grayscale() { // uParam (factor, unused, unused, unused)
|
||||||
vec4 color = texture2D(sDiffuse, vTexCoord);
|
vec4 color = texture2D(sDiffuse, vTexCoord);
|
||||||
vec3 gray = vec3(dot(color, vec4(0.299, 0.587, 0.114, 0.0)));
|
vec3 gray = vec3(dot(color, vec4(0.299, 0.587, 0.114, 0.0)));
|
||||||
return vec4(mix(color.xyz, gray, uParam.x), color.w);
|
return vec4(mix(color.xyz, gray, uParam.w) * uParam.xyz, color.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 blur() { // uParam (dirX, dirY, 1 / textureSize, unused)
|
vec4 blur() { // uParam (dirX, dirY, 1 / textureSize, unused)
|
||||||
|
Reference in New Issue
Block a user