- 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>
|
||||
<color-mask type="vec4d">0 0 0 0</color-mask>
|
||||
<cull-face>back</cull-face>
|
||||
<program>
|
||||
<vertex-shader>Shaders/Default/trivial.vert</vertex-shader>
|
||||
<fragment-shader>Shaders/Default/trivial.frag</fragment-shader>
|
||||
</program>
|
||||
<blend>
|
||||
<active>false</active>
|
||||
</blend>
|
||||
<alpha-test>
|
||||
<comparison>greater</comparison>
|
||||
<reference type="float">0.5</reference>
|
||||
</alpha-test>
|
||||
</pass>
|
||||
</technique>
|
||||
</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>
|
||||
<vertex-shader n="1">Shaders/Default/forest.vert</vertex-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>
|
||||
<name>tangent</name>
|
||||
<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>
|
||||
<name>Effects/model-combined-transparent</name>
|
||||
<inherits-from>Effects/model-combined</inherits-from>
|
||||
<!-- Rembrandt rendering -->
|
||||
<technique n="6">
|
||||
<predicate>
|
||||
<and>
|
||||
|
|
|
@ -843,7 +843,7 @@ please see Docs/README.model-combined.eff for documentation
|
|||
</uniform>
|
||||
</pass>
|
||||
</technique>
|
||||
<technique n="18">
|
||||
<technique n="4">
|
||||
<scheme>als-lighting</scheme>
|
||||
<predicate>
|
||||
<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)
|
||||
{
|
||||
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.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#version 120
|
||||
|
||||
uniform bool shadows_enabled;
|
||||
|
||||
uniform mat4 fg_LightMatrix_csm0;
|
||||
uniform mat4 fg_LightMatrix_csm1;
|
||||
uniform mat4 fg_LightMatrix_csm2;
|
||||
|
@ -10,6 +12,9 @@ varying vec4 lightSpacePos[4];
|
|||
|
||||
void setupShadows(vec4 eyeSpacePos)
|
||||
{
|
||||
if (!shadows_enabled)
|
||||
return;
|
||||
|
||||
float normalOffset = 0.005;
|
||||
|
||||
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;
|
||||
|
||||
// Offset only in UV space
|
||||
lightSpacePos[0].xy = offsets[0].xy;
|
||||
lightSpacePos[1].xy = offsets[1].xy;
|
||||
lightSpacePos[2].xy = offsets[2].xy;
|
||||
lightSpacePos[3].xy = offsets[3].xy;
|
||||
// lightSpacePos[0].xy = offsets[0].xy;
|
||||
// lightSpacePos[1].xy = offsets[1].xy;
|
||||
// lightSpacePos[2].xy = offsets[2].xy;
|
||||
// lightSpacePos[3].xy = offsets[3].xy;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,13 @@
|
|||
<height>screen</height>
|
||||
<format>rgba8</format>
|
||||
</buffer>
|
||||
<buffer>
|
||||
<name>depth</name>
|
||||
<type>2d</type>
|
||||
<width>screen</width>
|
||||
<height>screen</height>
|
||||
<format>depth32f</format>
|
||||
</buffer>
|
||||
<buffer>
|
||||
<name>sun-shadowmap-atlas</name>
|
||||
<type>2d</type>
|
||||
|
@ -27,7 +34,7 @@
|
|||
|
||||
|
||||
<!-- Shadow mapping pre-passes -->
|
||||
<pass include="csm.xml">
|
||||
<pass include="ALS/csm.xml">
|
||||
<name>csm0</name>
|
||||
<near-m>0.1</near-m>
|
||||
<far-m>3.0</far-m>
|
||||
|
@ -38,7 +45,7 @@
|
|||
<height>0.5</height>
|
||||
</viewport>
|
||||
</pass>
|
||||
<pass include="csm.xml">
|
||||
<pass include="ALS/csm.xml">
|
||||
<name>csm1</name>
|
||||
<near-m>3.0</near-m>
|
||||
<far-m>50.0</far-m>
|
||||
|
@ -49,7 +56,7 @@
|
|||
<height>0.5</height>
|
||||
</viewport>
|
||||
</pass>
|
||||
<pass include="csm.xml">
|
||||
<pass include="ALS/csm.xml">
|
||||
<name>csm2</name>
|
||||
<near-m>50.0</near-m>
|
||||
<far-m>150.0</far-m>
|
||||
|
@ -60,7 +67,7 @@
|
|||
<height>0.5</height>
|
||||
</viewport>
|
||||
</pass>
|
||||
<pass include="csm.xml">
|
||||
<pass include="ALS/csm.xml">
|
||||
<name>csm3</name>
|
||||
<near-m>150.0</near-m>
|
||||
<far-m>1500.0</far-m>
|
||||
|
@ -98,6 +105,12 @@
|
|||
<component>color0</component>
|
||||
<multisample-samples>4</multisample-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>
|
||||
</pass>
|
||||
|
|
@ -4,4 +4,4 @@
|
|||
This Compositor is used by default when none has been specified in the
|
||||
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>
|
||||
<initialized type="bool">false</initialized>
|
||||
<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>
|
||||
<enabled type="bool">false</enabled>
|
||||
<renderer>default-pipeline</renderer>
|
||||
|
|
Loading…
Reference in a new issue