Fix black halo around lights by removing depth write
This commit is contained in:
parent
8c6af01348
commit
7cba9da8a1
1 changed files with 99 additions and 89 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/surface-lights</name>
|
<name>Effects/surface-lights</name>
|
||||||
<parameters>
|
<parameters>
|
||||||
<!-- min-size, max-size, size, attenuation, cull-face parameters filled in by C++ code -->
|
<!-- min-size, max-size, size, attenuation, cull-face parameters filled in by C++ code -->
|
||||||
<texture n="0">
|
<texture n="0">
|
||||||
<type>light-sprite</type>
|
<type>light-sprite</type>
|
||||||
|
@ -12,9 +12,9 @@
|
||||||
<avisibility><use>/environment/visibility-m</use></avisibility>
|
<avisibility><use>/environment/visibility-m</use></avisibility>
|
||||||
<lthickness><use>/environment/ground-haze-thickness-m</use></lthickness>
|
<lthickness><use>/environment/ground-haze-thickness-m</use></lthickness>
|
||||||
<eye_alt><use>/sim/rendering/eye-altitude-m</use></eye_alt>
|
<eye_alt><use>/sim/rendering/eye-altitude-m</use></eye_alt>
|
||||||
</parameters>
|
</parameters>
|
||||||
|
|
||||||
<technique n="10">
|
<technique n="10">
|
||||||
<!-- ALS -->
|
<!-- ALS -->
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
<and>
|
<and>
|
||||||
<extension-supported>GL_ARB_point_sprite</extension-supported>
|
<extension-supported>GL_ARB_point_sprite</extension-supported>
|
||||||
<extension-supported>GL_ARB_point_parameters</extension-supported>
|
<extension-supported>GL_ARB_point_parameters</extension-supported>
|
||||||
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
<extension-supported>GL_ARB_shader_objects</extension-supported>
|
||||||
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
<extension-supported>GL_ARB_shading_language_100</extension-supported>
|
||||||
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
<extension-supported>GL_ARB_vertex_shader</extension-supported>
|
||||||
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
<extension-supported>GL_ARB_fragment_shader</extension-supported>
|
||||||
|
@ -36,22 +36,22 @@
|
||||||
</or>
|
</or>
|
||||||
</and>
|
</and>
|
||||||
</predicate>
|
</predicate>
|
||||||
<pass>
|
<pass>
|
||||||
<render-bin>
|
<render-bin>
|
||||||
<bin-number>8</bin-number>
|
<bin-number>8</bin-number>
|
||||||
<bin-name>DepthSortedBin</bin-name>
|
<bin-name>DepthSortedBin</bin-name>
|
||||||
</render-bin>
|
</render-bin>
|
||||||
<lighting>false</lighting>
|
<lighting>false</lighting>
|
||||||
<blend>
|
<blend>
|
||||||
<source>src-alpha</source>
|
<source>src-alpha</source>
|
||||||
<destination>one-minus-src-alpha</destination>
|
<destination>one-minus-src-alpha</destination>
|
||||||
</blend>
|
</blend>
|
||||||
<alpha-test>
|
<alpha-test>
|
||||||
<comparison>gequal</comparison>
|
<comparison>gequal</comparison>
|
||||||
<reference type="float">0.1</reference>
|
<reference type="float">0.1</reference>
|
||||||
</alpha-test>
|
</alpha-test>
|
||||||
<cull-face><use>directional</use></cull-face>
|
<cull-face><use>directional</use></cull-face>
|
||||||
<polygon-mode>
|
<polygon-mode>
|
||||||
<front>point</front>
|
<front>point</front>
|
||||||
<back>point</back>
|
<back>point</back>
|
||||||
</polygon-mode>
|
</polygon-mode>
|
||||||
|
@ -73,8 +73,8 @@
|
||||||
<fragment-shader>Shaders/surface-light-lightfield.frag</fragment-shader>
|
<fragment-shader>Shaders/surface-light-lightfield.frag</fragment-shader>
|
||||||
</program>
|
</program>
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>size</name>
|
<name>size</name>
|
||||||
<type>float</type>
|
<type>float</type>
|
||||||
<value><use>size</use></value>
|
<value><use>size</use></value>
|
||||||
</uniform>
|
</uniform>
|
||||||
<uniform>
|
<uniform>
|
||||||
|
@ -102,12 +102,11 @@
|
||||||
<type>sampler-2d</type>
|
<type>sampler-2d</type>
|
||||||
<value type="int">0</value>
|
<value type="int">0</value>
|
||||||
</uniform>
|
</uniform>
|
||||||
<vertex-program-point-size>true</vertex-program-point-size>
|
<vertex-program-point-size>true</vertex-program-point-size>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
|
<technique n="17">
|
||||||
<technique n="17">
|
|
||||||
<!-- Combined technique -->
|
<!-- Combined technique -->
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
|
@ -124,22 +123,25 @@
|
||||||
</or>
|
</or>
|
||||||
</and>
|
</and>
|
||||||
</predicate>
|
</predicate>
|
||||||
<pass>
|
<pass>
|
||||||
<render-bin>
|
<render-bin>
|
||||||
<bin-number>8</bin-number>
|
<bin-number>8</bin-number>
|
||||||
<bin-name>DepthSortedBin</bin-name>
|
<bin-name>DepthSortedBin</bin-name>
|
||||||
</render-bin>
|
</render-bin>
|
||||||
<lighting>false</lighting>
|
<lighting>false</lighting>
|
||||||
<blend>
|
<depth>
|
||||||
<source>src-alpha</source>
|
<write-mask>false</write-mask>
|
||||||
<destination>one-minus-src-alpha</destination>
|
</depth>
|
||||||
</blend>
|
<blend>
|
||||||
<alpha-test>
|
<source>src-alpha</source>
|
||||||
<comparison>gequal</comparison>
|
<destination>one-minus-src-alpha</destination>
|
||||||
<reference type="float">0.1</reference>
|
</blend>
|
||||||
</alpha-test>
|
<alpha-test>
|
||||||
<cull-face><use>directional</use></cull-face>
|
<comparison>gequal</comparison>
|
||||||
<polygon-mode>
|
<reference type="float">0.1</reference>
|
||||||
|
</alpha-test>
|
||||||
|
<cull-face><use>directional</use></cull-face>
|
||||||
|
<polygon-mode>
|
||||||
<front>point</front>
|
<front>point</front>
|
||||||
<back>point</back>
|
<back>point</back>
|
||||||
</polygon-mode>
|
</polygon-mode>
|
||||||
|
@ -156,11 +158,10 @@
|
||||||
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
||||||
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
||||||
</texture-unit>
|
</texture-unit>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
|
<technique n="18">
|
||||||
<technique n="18">
|
|
||||||
<!-- Sprite technique -->
|
<!-- Sprite technique -->
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
|
@ -174,18 +175,21 @@
|
||||||
</or>
|
</or>
|
||||||
</and>
|
</and>
|
||||||
</predicate>
|
</predicate>
|
||||||
<pass>
|
<pass>
|
||||||
<render-bin>
|
<render-bin>
|
||||||
<bin-number>8</bin-number>
|
<bin-number>8</bin-number>
|
||||||
<bin-name>DepthSortedBin</bin-name>
|
<bin-name>DepthSortedBin</bin-name>
|
||||||
</render-bin>
|
</render-bin>
|
||||||
<lighting>false</lighting>
|
<lighting>false</lighting>
|
||||||
<blend>
|
<depth>
|
||||||
<source>src-alpha</source>
|
<write-mask>false</write-mask>
|
||||||
<destination>one-minus-src-alpha</destination>
|
</depth>
|
||||||
</blend>
|
<blend>
|
||||||
<cull-face><use>directional</use></cull-face>
|
<source>src-alpha</source>
|
||||||
<polygon-mode>
|
<destination>one-minus-src-alpha</destination>
|
||||||
|
</blend>
|
||||||
|
<cull-face><use>directional</use></cull-face>
|
||||||
|
<polygon-mode>
|
||||||
<front>point</front>
|
<front>point</front>
|
||||||
<back>point</back>
|
<back>point</back>
|
||||||
</polygon-mode>
|
</polygon-mode>
|
||||||
|
@ -196,10 +200,10 @@
|
||||||
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
<wrap-s><use>texture[0]/wrap-s</use></wrap-s>
|
||||||
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
<wrap-t><use>texture[0]/wrap-t</use></wrap-t>
|
||||||
</texture-unit>
|
</texture-unit>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
<technique n="19">
|
<technique n="19">
|
||||||
<!-- Attenuation technique -->
|
<!-- Attenuation technique -->
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
|
@ -212,47 +216,53 @@
|
||||||
</or>
|
</or>
|
||||||
</and>
|
</and>
|
||||||
</predicate>
|
</predicate>
|
||||||
<pass>
|
<pass>
|
||||||
<point>
|
<point>
|
||||||
<min-size><use>min-size</use></min-size>
|
<min-size><use>min-size</use></min-size>
|
||||||
<max-size><use>max-size</use></max-size>
|
<max-size><use>max-size</use></max-size>
|
||||||
<size><use>size</use></size>
|
<size><use>size</use></size>
|
||||||
<attenuation><use>attenuation</use></attenuation>
|
<attenuation><use>attenuation</use></attenuation>
|
||||||
</point>
|
</point>
|
||||||
<render-bin>
|
<render-bin>
|
||||||
<bin-number>8</bin-number>
|
<bin-number>8</bin-number>
|
||||||
<bin-name>DepthSortedBin</bin-name>
|
<bin-name>DepthSortedBin</bin-name>
|
||||||
</render-bin>
|
</render-bin>
|
||||||
<blend>
|
<depth>
|
||||||
<source>src-alpha</source>
|
<write-mask>false</write-mask>
|
||||||
<destination>one-minus-src-alpha</destination>
|
</depth>
|
||||||
</blend>
|
<blend>
|
||||||
<lighting>false</lighting>
|
<source>src-alpha</source>
|
||||||
<cull-face><use>directional</use></cull-face>
|
<destination>one-minus-src-alpha</destination>
|
||||||
<polygon-mode>
|
</blend>
|
||||||
|
<lighting>false</lighting>
|
||||||
|
<cull-face><use>directional</use></cull-face>
|
||||||
|
<polygon-mode>
|
||||||
<front>point</front>
|
<front>point</front>
|
||||||
<back>point</back>
|
<back>point</back>
|
||||||
</polygon-mode>
|
</polygon-mode>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
|
|
||||||
<technique n="20">
|
<technique n="20">
|
||||||
<!-- Basic technique -->
|
<!-- Basic technique -->
|
||||||
<pass>
|
<pass>
|
||||||
<render-bin>
|
<render-bin>
|
||||||
<bin-number>8</bin-number>
|
<bin-number>8</bin-number>
|
||||||
<bin-name>DepthSortedBin</bin-name>
|
<bin-name>DepthSortedBin</bin-name>
|
||||||
</render-bin>
|
</render-bin>
|
||||||
<lighting>false</lighting>
|
<lighting>false</lighting>
|
||||||
<blend>
|
<depth>
|
||||||
<source>src-alpha</source>
|
<write-mask>false</write-mask>
|
||||||
<destination>one-minus-src-alpha</destination>
|
</depth>
|
||||||
</blend>
|
<blend>
|
||||||
<cull-face><use>directional</use></cull-face>
|
<source>src-alpha</source>
|
||||||
<polygon-mode>
|
<destination>one-minus-src-alpha</destination>
|
||||||
|
</blend>
|
||||||
|
<cull-face><use>directional</use></cull-face>
|
||||||
|
<polygon-mode>
|
||||||
<front>point</front>
|
<front>point</front>
|
||||||
<back>point</back>
|
<back>point</back>
|
||||||
</polygon-mode>
|
</polygon-mode>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
Loading…
Reference in a new issue