Correct atmospheric scattering for trees, where we were applying ambient lighting twice, making them too dark, and not using an alpha test.
Also fix the tropical trees, where only half the texture was defined.
This commit is contained in:
parent
8174ea8593
commit
ab21e069f7
4 changed files with 9 additions and 1 deletions
|
@ -68,6 +68,10 @@
|
|||
<source>src-alpha</source>
|
||||
<destination>one-minus-src-alpha</destination>
|
||||
</blend>
|
||||
<alpha-test>
|
||||
<comparison>gequal</comparison>
|
||||
<reference type="float">0.1</reference>
|
||||
</alpha-test>
|
||||
<texture-unit>
|
||||
<unit>0</unit>
|
||||
<type>2d</type>
|
||||
|
@ -107,6 +111,10 @@
|
|||
<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>
|
||||
</texture-unit>
|
||||
<alpha-test>
|
||||
<comparison>gequal</comparison>
|
||||
<reference type="float">0.1</reference>
|
||||
</alpha-test>
|
||||
<program>
|
||||
<vertex-shader>Shaders/tree-haze.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/tree-haze.frag</fragment-shader>
|
||||
|
|
|
@ -95,7 +95,7 @@ void main()
|
|||
|
||||
vec4 diffuse_color = gl_FrontMaterial.diffuse * max(0.1, n);
|
||||
//diffuse_color.a = 1.0;
|
||||
vec4 ambient_color = gl_FrontLightModelProduct.sceneColor + gl_LightSource[0].ambient * gl_FrontMaterial.ambient;
|
||||
vec4 ambient_color = gl_FrontMaterial.ambient;
|
||||
|
||||
// here start computations for the haze layer
|
||||
// we need several geometrical quantities
|
||||
|
|
BIN
Textures/Trees/tropical-summer.dds
Normal file
BIN
Textures/Trees/tropical-summer.dds
Normal file
Binary file not shown.
BIN
Textures/Trees/tropical-summer.png
Normal file
BIN
Textures/Trees/tropical-summer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
Loading…
Reference in a new issue