7b0211031a
Previously we did not take into account the atmospheric transmittance to render the stars, leading to stars being incorrectly rendered in low visibility conditions. Also place the stars in the correct render bin.
72 lines
2 KiB
XML
72 lines
2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<PropertyList>
|
|
<name>Effects/stars</name>
|
|
|
|
<parameters>
|
|
<max-radiance type="float">50.0</max-radiance>
|
|
</parameters>
|
|
|
|
<!-- Fixed-pipeline fallback -->
|
|
<technique n="11">
|
|
<pass>
|
|
<!--
|
|
An empty pass should be fine as we are filling the stateset manually
|
|
in simgear/scene/sky/stars.cxx
|
|
-->
|
|
</pass>
|
|
</technique>
|
|
|
|
<technique n="129">
|
|
<scheme>hdr-forward</scheme>
|
|
<pass>
|
|
<!-- Disable depth testing -->
|
|
<depth>
|
|
<enabled>false</enabled>
|
|
</depth>
|
|
<!-- Only render the stars on top of the skydome -->
|
|
<stencil>
|
|
<function>equal</function>
|
|
<value>0</value>
|
|
</stencil>
|
|
<!-- Make sure we render after the skydome -->
|
|
<render-bin>
|
|
<bin-number>-9</bin-number>
|
|
<bin-name>RenderBin</bin-name>
|
|
</render-bin>
|
|
<cull-face>off</cull-face>
|
|
<!-- Additive blending to add the sky in-scattering from the skydome -->
|
|
<blend>
|
|
<active>true</active>
|
|
<source>one</source>
|
|
<destination>one</destination>
|
|
</blend>
|
|
<program>
|
|
<vertex-shader>Shaders/HDR/stars.vert</vertex-shader>
|
|
<fragment-shader>Shaders/HDR/stars.frag</fragment-shader>
|
|
<fragment-shader>Shaders/HDR/exposure.glsl</fragment-shader>
|
|
</program>
|
|
<uniform>
|
|
<name>max_radiance</name>
|
|
<type>float</type>
|
|
<value><use>max-radiance</use></value>
|
|
</uniform>
|
|
<uniform>
|
|
<name>transmittance_tex</name>
|
|
<type>sampler-2d</type>
|
|
<value type="int">12</value>
|
|
</uniform>
|
|
<!-- exposure.glsl -->
|
|
<uniform>
|
|
<name>lum_tex</name>
|
|
<type>sampler-2d</type>
|
|
<value type="int">14</value>
|
|
</uniform>
|
|
<uniform>
|
|
<name>exposure_compensation</name>
|
|
<type>float</type>
|
|
<value><use>exposure-compensation</use></value>
|
|
</uniform>
|
|
</pass>
|
|
</technique>
|
|
</PropertyList>
|