Show bloom buffer
This commit is contained in:
parent
8fa093ce76
commit
41ff7da797
2 changed files with 12 additions and 2 deletions
|
@ -43,6 +43,11 @@
|
||||||
<type>buffer</type>
|
<type>buffer</type>
|
||||||
<name>bloom-3</name>
|
<name>bloom-3</name>
|
||||||
</texture-unit>
|
</texture-unit>
|
||||||
|
<texture-unit>
|
||||||
|
<unit>6</unit>
|
||||||
|
<type>buffer</type>
|
||||||
|
<name>ao-3</name>
|
||||||
|
</texture-unit>
|
||||||
<program>
|
<program>
|
||||||
<vertex-shader>Shaders/fullscreen.vert</vertex-shader>
|
<vertex-shader>Shaders/fullscreen.vert</vertex-shader>
|
||||||
<fragment-shader>Shaders/display.frag</fragment-shader>
|
<fragment-shader>Shaders/display.frag</fragment-shader>
|
||||||
|
@ -77,6 +82,11 @@
|
||||||
<type>sampler-2d</type>
|
<type>sampler-2d</type>
|
||||||
<value type="int">5</value>
|
<value type="int">5</value>
|
||||||
</uniform>
|
</uniform>
|
||||||
|
<uniform>
|
||||||
|
<name>ao_tex</name>
|
||||||
|
<type>sampler-2d</type>
|
||||||
|
<value type="int">6</value>
|
||||||
|
</uniform>
|
||||||
<uniform>
|
<uniform>
|
||||||
<name>exposure</name>
|
<name>exposure</name>
|
||||||
<type>float</type>
|
<type>float</type>
|
||||||
|
|
|
@ -31,8 +31,8 @@ void main() {
|
||||||
color = texture2D( color_tex, (coords - vec2( 0.8, 0.0 )) * 5.0 );
|
color = texture2D( color_tex, (coords - vec2( 0.8, 0.0 )) * 5.0 );
|
||||||
} else if (coords.x < 0.2 && coords.y >= 0.8 && fg_DepthInColor) {
|
} else if (coords.x < 0.2 && coords.y >= 0.8 && fg_DepthInColor) {
|
||||||
color = texture2D( depth_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 );
|
color = texture2D( depth_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 );
|
||||||
} else if (coords.x < 0.2 && coords.y >= 0.8 && ambientOcclusion) {
|
} else if (coords.x < 0.2 && coords.y >= 0.8 && bloomEnabled) {
|
||||||
color = texture2D( ao_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 );
|
color = texture2D( bloom_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 );
|
||||||
} else {
|
} else {
|
||||||
color = texture2D( lighting_tex, coords );
|
color = texture2D( lighting_tex, coords );
|
||||||
if (bloomEnabled)
|
if (bloomEnabled)
|
||||||
|
|
Loading…
Reference in a new issue