1
0
Fork 0

Fix black halo around lights by removing depth write

This commit is contained in:
Stuart Buchanan 2014-02-27 22:49:25 +00:00
parent 8c6af01348
commit 7cba9da8a1

View file

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