diff --git a/Effects/display.eff b/Effects/display.eff
index fb7c22650..b8e0d5956 100644
--- a/Effects/display.eff
+++ b/Effects/display.eff
@@ -4,8 +4,17 @@
-
+
+
+
+
+
+
+
+
+
+
@@ -16,77 +25,69 @@
0
buffer
- depth
+ lighting
1
buffer
- normal
+ bloom-3
+
2
buffer
- diffuse
+
3
buffer
- spec-emis
+
4
buffer
- lighting
+
5
buffer
- bloom-3
-
-
- 6
- buffer
- ao-3
+
+
Shaders/fullscreen.vert
Shaders/display.frag
- depth_tex
+ lighting_tex
sampler-2d
0
- normal_tex
+ bloom_tex
sampler-2d
1
- color_tex
+ bufferNW_tex
sampler-2d
2
- specular_tex
+ bufferNE_tex
sampler-2d
3
- lighting_tex
+ bufferSW_tex
sampler-2d
4
- bloom_tex
+ bufferSE_tex
sampler-2d
5
-
- ao_tex
- sampler-2d
- 6
-
exposure
float
@@ -97,16 +98,38 @@
bool
+
- ambientOcclusion
+ bufferNW_enabled
bool
-
+
+
+ bufferNE_enabled
+ bool
+
+
+
+ bufferSW_enabled
+ bool
+
+
+
+ bufferSE_enabled
+ bool
+
+
+
bloomEnabled
bool
+
+ bloomBuffers
+ bool
+
+
diff --git a/Shaders/display.frag b/Shaders/display.frag
index 3d4db7c2c..ae68b2262 100644
--- a/Shaders/display.frag
+++ b/Shaders/display.frag
@@ -1,15 +1,21 @@
-uniform sampler2D depth_tex;
-uniform sampler2D normal_tex;
-uniform sampler2D color_tex;
-uniform sampler2D specular_tex;
uniform sampler2D lighting_tex;
uniform sampler2D bloom_tex;
-uniform sampler2D ao_tex;
+
+uniform sampler2D bufferNW_tex;
+uniform sampler2D bufferNE_tex;
+uniform sampler2D bufferSW_tex;
+uniform sampler2D bufferSE_tex;
+
uniform float exposure;
uniform bool showBuffers;
-uniform bool fg_DepthInColor;
-uniform bool ambientOcclusion;
+
uniform bool bloomEnabled;
+uniform bool bloomBuffers;
+
+uniform bool bufferNW_enabled;
+uniform bool bufferNE_enabled;
+uniform bool bufferSW_enabled;
+uniform bool bufferSE_enabled;
vec3 HDR(vec3 L) {
L = L * exposure;
@@ -23,25 +29,23 @@ void main() {
vec2 coords = gl_TexCoord[0].xy;
vec4 color;
if (showBuffers) {
- if (coords.x < 0.2 && coords.y < 0.2) {
- color = texture2D( normal_tex, coords * 5.0 );
- } else if (coords.x >= 0.8 && coords.y >= 0.8) {
- color = texture2D( specular_tex, (coords - vec2( 0.8, 0.8 )) * 5.0 );
- } else if (coords.x >= 0.8 && coords.y < 0.2) {
- color = texture2D( color_tex, (coords - vec2( 0.8, 0.0 )) * 5.0 );
- } else if (coords.x < 0.2 && coords.y >= 0.8 && fg_DepthInColor) {
- color = texture2D( depth_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 );
- } else if (coords.x < 0.2 && coords.y >= 0.8 && bloomEnabled) {
- color = texture2D( bloom_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 );
+ if (coords.x < 0.2 && coords.y < 0.2 && bufferSW_enabled) {
+ color = texture2D( bufferSW_tex, coords * 5.0 );
+ } else if (coords.x >= 0.8 && coords.y >= 0.8 && bufferNE_enabled) {
+ color = texture2D( bufferNE_tex, (coords - vec2( 0.8, 0.8 )) * 5.0 );
+ } else if (coords.x >= 0.8 && coords.y < 0.2 && bufferSE_enabled) {
+ color = texture2D( bufferSE_tex, (coords - vec2( 0.8, 0.0 )) * 5.0 );
+ } else if (coords.x < 0.2 && coords.y >= 0.8 && bufferNW_enabled) {
+ color = texture2D( bufferNW_tex, (coords - vec2( 0.0, 0.8 )) * 5.0 );
} else {
color = texture2D( lighting_tex, coords );
- if (bloomEnabled)
+ if (bloomEnabled && bloomBuffers)
color = color + texture2D( bloom_tex, coords );
//color = vec4( HDR( color.rgb ), 1.0 );
}
} else {
color = texture2D( lighting_tex, coords );
- if (bloomEnabled)
+ if (bloomEnabled && bloomBuffers)
color = color + texture2D( bloom_tex, coords );
//color = vec4( HDR( color.rgb ), 1.0 );
}
diff --git a/Translations/en/menu.xml b/Translations/en/menu.xml
index fc7429a64..d6ee002d8 100644
--- a/Translations/en/menu.xml
+++ b/Translations/en/menu.xml
@@ -99,8 +99,8 @@
Logging
Local Weather (Test)
Print Visible Scene Info
- Hide/Show Ambient occlusion
Hide/Show Rendering Buffers
+ Select Rendering Buffers
Help
diff --git a/gui/dialogs/rembrandt-buffers.xml b/gui/dialogs/rembrandt-buffers.xml
new file mode 100644
index 000000000..a8abe9cad
--- /dev/null
+++ b/gui/dialogs/rembrandt-buffers.xml
@@ -0,0 +1,275 @@
+
+
+
+ rembrandt-buffers
+ false
+ vbox
+ 20
+
+
+ hbox
+
+ 1
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+ table
+
+ left
+
+ buffer-nw-enabled
+ 0
+ 0
+ 2
+ /sim/rendering/rembrandt/debug-buffer[0]/enabled
+
+ dialog-apply
+ buffer-nw-enabled
+
+
+
+
+
+ right
+ 1
+ 0
+
+ /sim/rendering/rembrandt/debug-buffer[0]/enabled
+
+
+
+ left
+ buffer-nw-name
+ 1
+ 1
+ /sim/rendering/rembrandt/debug-buffer[0]/name
+ real-depth
+ depth
+ normal
+ diffuse
+ spec-emis
+ ao-1
+ ao-2
+ ao-3
+ bloom-1
+ bloom-2
+ bloom-3
+ lighting
+
+ dialog-apply
+ buffer-nw-name
+
+
+ /sim/rendering/rembrandt/debug-buffer[0]/enabled
+
+
+
+
+ 0
+ 2
+ 2
+
+
+
+ 2
+ 0
+ 2
+
+
+
+ left
+
+ buffer-ne-enabled
+ 0
+ 3
+ 2
+ /sim/rendering/rembrandt/debug-buffer[1]/enabled
+
+ dialog-apply
+ buffer-ne-enabled
+
+
+
+
+
+ right
+ 1
+ 3
+
+ /sim/rendering/rembrandt/debug-buffer[1]/enabled
+
+
+
+ left
+ buffer-ne-name
+ 1
+ 4
+ /sim/rendering/rembrandt/debug-buffer[1]/name
+ real-depth
+ depth
+ normal
+ diffuse
+ spec-emis
+ ao-1
+ ao-2
+ ao-3
+ bloom-1
+ bloom-2
+ bloom-3
+ lighting
+
+ dialog-apply
+ buffer-ne-name
+
+
+ /sim/rendering/rembrandt/debug-buffer[1]/enabled
+
+
+
+
+ left
+
+ buffer-sw-enabled
+ 3
+ 0
+ 2
+ /sim/rendering/rembrandt/debug-buffer[2]/enabled
+
+ dialog-apply
+ buffer-sw-enabled
+
+
+
+
+
+ right
+ 4
+ 0
+
+ /sim/rendering/rembrandt/debug-buffer[2]/enabled
+
+
+
+ left
+ buffer-sw-name
+ 4
+ 1
+ /sim/rendering/rembrandt/debug-buffer[2]/name
+ real-depth
+ depth
+ normal
+ diffuse
+ spec-emis
+ ao-1
+ ao-2
+ ao-3
+ bloom-1
+ bloom-2
+ bloom-3
+ lighting
+
+ dialog-apply
+ buffer-sw-name
+
+
+ /sim/rendering/rembrandt/debug-buffer[2]/enabled
+
+
+
+
+ 3
+ 2
+ 2
+
+
+
+ 2
+ 3
+ 2
+
+
+
+ left
+
+ buffer-se-enabled
+ 3
+ 3
+ 2
+ /sim/rendering/rembrandt/debug-buffer[3]/enabled
+
+ dialog-apply
+ buffer-se-enabled
+
+
+
+
+
+ right
+ 4
+ 3
+
+ /sim/rendering/rembrandt/debug-buffer[3]/enabled
+
+
+
+ left
+ buffer-se-name
+ 4
+ 4
+ /sim/rendering/rembrandt/debug-buffer[3]/name
+ real-depth
+ depth
+ normal
+ diffuse
+ spec-emis
+ ao-1
+ ao-2
+ ao-3
+ bloom-1
+ bloom-2
+ bloom-3
+ lighting
+
+ dialog-apply
+ buffer-se-name
+
+
+ /sim/rendering/rembrandt/debug-buffer[3]/enabled
+
+
+
+
+
+
+
+
+
diff --git a/gui/menubar.xml b/gui/menubar.xml
index 28cfdf706..011cbdf48 100644
--- a/gui/menubar.xml
+++ b/gui/menubar.xml
@@ -667,6 +667,14 @@
false
+ -
+ rembrandt-buffers-choice
+
+ dialog-show
+ rembrandt-buffers
+
+
+