Does anyone have a working example of a "fog" mask as might be used if you had heater vents blowing on a windshield?
I have tried to make this work on several different occasions and it simply won't work for me.
wlbragg wrote in Fri Apr 21, 2017 6:32 pm:The layout of the glass layers and their settings obviously affect the truths of the following statements.
I've got an inside glass and an outside glass as two objects; with opposite normal. If you do 2sided you'll see the inside reflection on the outside.
The shader doesn't consider the alpha channel as being a non-red color. I imagine this is my complete lack of understanding of the ins and outs of an image and the shaders use of it.
But notice it wont remove frost, only fog.
the primary function is to render damage on the glass, but with a different color, also dirt or an alternative more finely controlled frost pattern can be used.
<texture n="1">
<image>Aircraft/J3Cub/Models/glass-alpha.png</image>
<type>2d</type>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>interior-glass-reflection-front</name>
<inherits-from>Effects/glass</inherits-from>
<parameters>
<texture n="1">
<image>Aircraft/J3Cub/Models/glass-alpha.png</image>
<type>2d</type>
<filter>linear-mipmap-linear</filter>
<wrap-s>repeat</wrap-s>
<wrap-t>repeat</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<texture n="2">
<image>Aircraft/J3Cub/Models/Effects/interior/windshield.png</image>
<type>2d</type>
<filter>linear-mipmap-linear</filter>
<wrap-s>clamp</wrap-s>
<wrap-t>clamp</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<use-mask type="int">1</use-mask>
<overlay-color type="vec3d" n="0">1.0 1.0 1.0</overlay-color>
</parameters>
</PropertyList>
So if I inherit glass and use /environment/aircraft-effects/frost-level for other effect inheritances I get the default frost along with "overlay" frost that I want.
<frost-level><use>/environment/aircraft-effects/frost-level</use></frost-level>
<frost-level>0</frost-level>
<frost-level><use>/systems/environment/frost-level</use></frost-level>
Because I turn on <frost-level></frost-level> anywhere via nasal or in the effect definition itself, it gives me "generic" frost on the "interior-screen" object or any object that inherits glass, right?
<frost-level>0</frost-level>
<overlay-alpha><use>/environment/aircraft-effects/frost-level</use></overlay-alpha>
Users browsing this forum: No registered users and 1 guest