Merge /u/dirteat/flightgear_redcut/ branch next into next
https://sourceforge.net/p/flightgear/fgdata/merge-requests/206/
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 2.7 MiB |
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.3 MiB |
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.4 MiB |
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.6 MiB |
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.4 MiB |
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.3 MiB |
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 2.4 MiB |
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 2.4 MiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.8 MiB |
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 2.3 MiB |
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 313 KiB |
Before Width: | Height: | Size: 959 KiB After Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 718 KiB After Width: | Height: | Size: 941 KiB |
Before Width: | Height: | Size: 736 KiB After Width: | Height: | Size: 948 KiB |
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 2.6 MiB |
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.8 MiB |
Before Width: | Height: | Size: 5.5 MiB After Width: | Height: | Size: 5.5 MiB |
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 3.5 MiB |
Before Width: | Height: | Size: 492 KiB After Width: | Height: | Size: 502 KiB |
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
|
@ -61,8 +61,9 @@ void main()
|
||||||
float hmap = 1.0 - nmap.a;
|
float hmap = 1.0 - nmap.a;
|
||||||
nmap = texture2D(normal_texture, gl_TexCoord[0].st - 0.0005 * grad_dir * hmap * 2.0 * parallaxFactor);
|
nmap = texture2D(normal_texture, gl_TexCoord[0].st - 0.0005 * grad_dir * hmap * 2.0 * parallaxFactor);
|
||||||
|
|
||||||
// sanity processing for normal map when alpha is close to zero
|
|
||||||
nmap.rgb = normalize(nmap.rgb);
|
// nmap.rgb should not be normalized, it adversely modifies N = 2 nmap - 1
|
||||||
|
// nmap.rgb = normalize(nmap.rgb);
|
||||||
//if (nmap.b < 0.0) {nmap.b = -nmap.b;}
|
//if (nmap.b < 0.0) {nmap.b = -nmap.b;}
|
||||||
|
|
||||||
vec3 N = nmap.rgb * 2.0 - 1.0;
|
vec3 N = nmap.rgb * 2.0 - 1.0;
|
||||||
|
@ -125,8 +126,8 @@ void main()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// strictly positive produces visible hard cut
|
||||||
if (NdotL > 0.0) {
|
if (NdotL >= 0.0) {
|
||||||
color += diff_term * NdotL * (1.0-shadowTexel.a);
|
color += diff_term * NdotL * (1.0-shadowTexel.a);
|
||||||
NdotHV = max(dot(n, halfVector), 0.0);
|
NdotHV = max(dot(n, halfVector), 0.0);
|
||||||
if (gl_FrontMaterial.shininess > 0.0)
|
if (gl_FrontMaterial.shininess > 0.0)
|
||||||
|
|
|
@ -95,8 +95,8 @@ void main()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// strictly positive produces visible hard cut
|
||||||
if (NdotL > 0.0) {
|
if (NdotL >= 0.0) {
|
||||||
color += diff_term * NdotL * (1.0-shadowTexel.a);
|
color += diff_term * NdotL * (1.0-shadowTexel.a);
|
||||||
NdotHV = max(dot(n, halfVector), 0.0);
|
NdotHV = max(dot(n, halfVector), 0.0);
|
||||||
if (gl_FrontMaterial.shininess > 0.0)
|
if (gl_FrontMaterial.shininess > 0.0)
|
||||||
|
|