- Changed location of Compositor pipelines.
- 1-bit transparency for shadow mapping. - Several effects ported to the Compositor. - Miscellaneous fixes to Compositor Effects.
This commit is contained in:
parent
d3e3c55fd6
commit
dd2ac0a32e
17 changed files with 73 additions and 17 deletions
|
@ -7,10 +7,13 @@
|
||||||
<lighting>false</lighting>
|
<lighting>false</lighting>
|
||||||
<color-mask type="vec4d">0 0 0 0</color-mask>
|
<color-mask type="vec4d">0 0 0 0</color-mask>
|
||||||
<cull-face>back</cull-face>
|
<cull-face>back</cull-face>
|
||||||
<program>
|
<blend>
|
||||||
<vertex-shader>Shaders/Default/trivial.vert</vertex-shader>
|
<active>false</active>
|
||||||
<fragment-shader>Shaders/Default/trivial.frag</fragment-shader>
|
</blend>
|
||||||
</program>
|
<alpha-test>
|
||||||
|
<comparison>greater</comparison>
|
||||||
|
<reference type="float">0.5</reference>
|
||||||
|
</alpha-test>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
</PropertyList>
|
</PropertyList>
|
||||||
|
|
5
Compositor/Effects/bumpspec.eff
Normal file
5
Compositor/Effects/bumpspec.eff
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PropertyList>
|
||||||
|
<name>Effects/bumpspec</name>
|
||||||
|
<inherits-from>Effects/model-default</inherits-from>
|
||||||
|
</PropertyList>
|
|
@ -216,7 +216,7 @@
|
||||||
<program>
|
<program>
|
||||||
<vertex-shader n="1">Shaders/Default/forest.vert</vertex-shader>
|
<vertex-shader n="1">Shaders/Default/forest.vert</vertex-shader>
|
||||||
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
<fragment-shader n="0">Shaders/Default/include_fog.frag</fragment-shader>
|
||||||
<fragment-shader n="1">Shaders/forest.frag.frag</fragment-shader>
|
<fragment-shader n="1">Shaders/Default/forest.frag</fragment-shader>
|
||||||
<attribute>
|
<attribute>
|
||||||
<name>tangent</name>
|
<name>tangent</name>
|
||||||
<index>6</index>
|
<index>6</index>
|
||||||
|
|
4
Compositor/Effects/light-cone.eff
Normal file
4
Compositor/Effects/light-cone.eff
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PropertyList>
|
||||||
|
<name>Effects/light-cone</name>
|
||||||
|
</PropertyList>
|
4
Compositor/Effects/light-point.eff
Normal file
4
Compositor/Effects/light-point.eff
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PropertyList>
|
||||||
|
<name>Effects/light-point</name>
|
||||||
|
</PropertyList>
|
4
Compositor/Effects/light-spot.eff
Normal file
4
Compositor/Effects/light-spot.eff
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PropertyList>
|
||||||
|
<name>Effects/light-spot</name>
|
||||||
|
</PropertyList>
|
|
@ -6,7 +6,6 @@ and fallback to plain transparency when the model shader is disabled.
|
||||||
<PropertyList>
|
<PropertyList>
|
||||||
<name>Effects/model-combined-transparent</name>
|
<name>Effects/model-combined-transparent</name>
|
||||||
<inherits-from>Effects/model-combined</inherits-from>
|
<inherits-from>Effects/model-combined</inherits-from>
|
||||||
<!-- Rembrandt rendering -->
|
|
||||||
<technique n="6">
|
<technique n="6">
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
|
|
|
@ -843,7 +843,7 @@ please see Docs/README.model-combined.eff for documentation
|
||||||
</uniform>
|
</uniform>
|
||||||
</pass>
|
</pass>
|
||||||
</technique>
|
</technique>
|
||||||
<technique n="18">
|
<technique n="4">
|
||||||
<scheme>als-lighting</scheme>
|
<scheme>als-lighting</scheme>
|
||||||
<predicate>
|
<predicate>
|
||||||
<and>
|
<and>
|
||||||
|
|
5
Compositor/Effects/reflect.eff
Normal file
5
Compositor/Effects/reflect.eff
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PropertyList>
|
||||||
|
<name>Effects/reflect</name>
|
||||||
|
<inherits-from>Effects/model-default</inherits-from>
|
||||||
|
</PropertyList>
|
4
Compositor/Effects/shadow-vol.eff
Normal file
4
Compositor/Effects/shadow-vol.eff
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PropertyList>
|
||||||
|
<name>Effects/shadow-vol</name>
|
||||||
|
</PropertyList>
|
4
Compositor/Effects/shadow.eff
Normal file
4
Compositor/Effects/shadow.eff
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PropertyList>
|
||||||
|
<name>Effects/shadow</name>
|
||||||
|
</PropertyList>
|
|
@ -38,7 +38,7 @@ layout (std140) uniform SpotLightBlock {
|
||||||
|
|
||||||
vec3 addColors(vec3 a, vec3 b)
|
vec3 addColors(vec3 a, vec3 b)
|
||||||
{
|
{
|
||||||
return 0.14 * log(exp(a/0.14) + exp(b/0.14));
|
return 0.14 * log(exp(a/0.14) + exp(b/0.14) - vec3(1.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// @param p Fragment position in view space.
|
// @param p Fragment position in view space.
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#version 120
|
#version 120
|
||||||
|
|
||||||
|
uniform bool shadows_enabled;
|
||||||
|
|
||||||
uniform mat4 fg_LightMatrix_csm0;
|
uniform mat4 fg_LightMatrix_csm0;
|
||||||
uniform mat4 fg_LightMatrix_csm1;
|
uniform mat4 fg_LightMatrix_csm1;
|
||||||
uniform mat4 fg_LightMatrix_csm2;
|
uniform mat4 fg_LightMatrix_csm2;
|
||||||
|
@ -10,6 +12,9 @@ varying vec4 lightSpacePos[4];
|
||||||
|
|
||||||
void setupShadows(vec4 eyeSpacePos)
|
void setupShadows(vec4 eyeSpacePos)
|
||||||
{
|
{
|
||||||
|
if (!shadows_enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
float normalOffset = 0.005;
|
float normalOffset = 0.005;
|
||||||
|
|
||||||
float costheta = clamp(dot(gl_Normal, gl_LightSource[0].position.xyz), 0.0, 1.0);
|
float costheta = clamp(dot(gl_Normal, gl_LightSource[0].position.xyz), 0.0, 1.0);
|
||||||
|
@ -31,8 +36,8 @@ void setupShadows(vec4 eyeSpacePos)
|
||||||
lightSpacePos[3] = fg_LightMatrix_csm3 * eyeSpacePos;
|
lightSpacePos[3] = fg_LightMatrix_csm3 * eyeSpacePos;
|
||||||
|
|
||||||
// Offset only in UV space
|
// Offset only in UV space
|
||||||
lightSpacePos[0].xy = offsets[0].xy;
|
// lightSpacePos[0].xy = offsets[0].xy;
|
||||||
lightSpacePos[1].xy = offsets[1].xy;
|
// lightSpacePos[1].xy = offsets[1].xy;
|
||||||
lightSpacePos[2].xy = offsets[2].xy;
|
// lightSpacePos[2].xy = offsets[2].xy;
|
||||||
lightSpacePos[3].xy = offsets[3].xy;
|
// lightSpacePos[3].xy = offsets[3].xy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,13 @@
|
||||||
<height>screen</height>
|
<height>screen</height>
|
||||||
<format>rgba8</format>
|
<format>rgba8</format>
|
||||||
</buffer>
|
</buffer>
|
||||||
|
<buffer>
|
||||||
|
<name>depth</name>
|
||||||
|
<type>2d</type>
|
||||||
|
<width>screen</width>
|
||||||
|
<height>screen</height>
|
||||||
|
<format>depth32f</format>
|
||||||
|
</buffer>
|
||||||
<buffer>
|
<buffer>
|
||||||
<name>sun-shadowmap-atlas</name>
|
<name>sun-shadowmap-atlas</name>
|
||||||
<type>2d</type>
|
<type>2d</type>
|
||||||
|
@ -27,7 +34,7 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- Shadow mapping pre-passes -->
|
<!-- Shadow mapping pre-passes -->
|
||||||
<pass include="csm.xml">
|
<pass include="ALS/csm.xml">
|
||||||
<name>csm0</name>
|
<name>csm0</name>
|
||||||
<near-m>0.1</near-m>
|
<near-m>0.1</near-m>
|
||||||
<far-m>3.0</far-m>
|
<far-m>3.0</far-m>
|
||||||
|
@ -38,7 +45,7 @@
|
||||||
<height>0.5</height>
|
<height>0.5</height>
|
||||||
</viewport>
|
</viewport>
|
||||||
</pass>
|
</pass>
|
||||||
<pass include="csm.xml">
|
<pass include="ALS/csm.xml">
|
||||||
<name>csm1</name>
|
<name>csm1</name>
|
||||||
<near-m>3.0</near-m>
|
<near-m>3.0</near-m>
|
||||||
<far-m>50.0</far-m>
|
<far-m>50.0</far-m>
|
||||||
|
@ -49,7 +56,7 @@
|
||||||
<height>0.5</height>
|
<height>0.5</height>
|
||||||
</viewport>
|
</viewport>
|
||||||
</pass>
|
</pass>
|
||||||
<pass include="csm.xml">
|
<pass include="ALS/csm.xml">
|
||||||
<name>csm2</name>
|
<name>csm2</name>
|
||||||
<near-m>50.0</near-m>
|
<near-m>50.0</near-m>
|
||||||
<far-m>150.0</far-m>
|
<far-m>150.0</far-m>
|
||||||
|
@ -60,7 +67,7 @@
|
||||||
<height>0.5</height>
|
<height>0.5</height>
|
||||||
</viewport>
|
</viewport>
|
||||||
</pass>
|
</pass>
|
||||||
<pass include="csm.xml">
|
<pass include="ALS/csm.xml">
|
||||||
<name>csm3</name>
|
<name>csm3</name>
|
||||||
<near-m>150.0</near-m>
|
<near-m>150.0</near-m>
|
||||||
<far-m>1500.0</far-m>
|
<far-m>1500.0</far-m>
|
||||||
|
@ -98,6 +105,12 @@
|
||||||
<component>color0</component>
|
<component>color0</component>
|
||||||
<multisample-samples>4</multisample-samples>
|
<multisample-samples>4</multisample-samples>
|
||||||
<multisample-color-samples>4</multisample-color-samples>
|
<multisample-color-samples>4</multisample-color-samples>
|
||||||
|
</attachment>
|
||||||
|
<attachment>
|
||||||
|
<buffer>depth</buffer>
|
||||||
|
<component>depth</component>
|
||||||
|
<multisample-samples>4</multisample-samples>
|
||||||
|
<multisample-color-samples>4</multisample-color-samples>
|
||||||
</attachment>
|
</attachment>
|
||||||
</pass>
|
</pass>
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
This Compositor is used by default when none has been specified in the
|
This Compositor is used by default when none has been specified in the
|
||||||
CameraGroup settings.
|
CameraGroup settings.
|
||||||
-->
|
-->
|
||||||
<PropertyList include="LowSpec/low-spec.xml"/>
|
<PropertyList include="low-spec.xml"/>
|
||||||
|
|
|
@ -53,6 +53,12 @@ Started September 2000 by David Megginson, david@megginson.com
|
||||||
<rendering>
|
<rendering>
|
||||||
<initialized type="bool">false</initialized>
|
<initialized type="bool">false</initialized>
|
||||||
<materials-file>Materials/regions/materials.xml</materials-file>
|
<materials-file>Materials/regions/materials.xml</materials-file>
|
||||||
|
<als>
|
||||||
|
<shadows>
|
||||||
|
<enabled type="bool" userarchive="y">false</enabled>
|
||||||
|
<sun-atlas-size type="int" userarchive="y">1024</sun-atlas-size>
|
||||||
|
</shadows>
|
||||||
|
</als>
|
||||||
<rembrandt>
|
<rembrandt>
|
||||||
<enabled type="bool">false</enabled>
|
<enabled type="bool">false</enabled>
|
||||||
<renderer>default-pipeline</renderer>
|
<renderer>default-pipeline</renderer>
|
||||||
|
|
Loading…
Reference in a new issue