Changed rendering order back for orbits and other improvements.

This commit is contained in:
Jonathas Costa
2019-08-01 12:20:36 -04:00
parent 482631aa54
commit 3a0b5f0c15
6 changed files with 22 additions and 21 deletions
+9 -3
View File
@@ -26,7 +26,8 @@
#include <#{fragmentPath}>
#define exposure #{rendererData.hdrExposure}
#define deltaError 0.013
#define DeltaError 0.013f
#define MaxValueColorBuffer 1E10
layout(location = 0) out vec4 _out_color_;
layout(location = 1) out vec4 gPosition;
@@ -34,8 +35,13 @@ layout(location = 2) out vec4 gNormal;
layout(location = 3) out vec4 filterBuffer;
void main() {
Fragment f = getFragment();
_out_color_ = vec4((log2(vec3(1.0) - (f.color.rgb - vec3(deltaError)))/(-exposure)), f.color.a);
Fragment f = getFragment();
_out_color_ = vec4((log2(vec3(1.0) - (f.color.rgb - vec3(DeltaError)))/(-exposure)), f.color.a);
_out_color_.x = isnan(_out_color_.x) ? MaxValueColorBuffer : _out_color_.x;
_out_color_.y = isnan(_out_color_.y) ? MaxValueColorBuffer : _out_color_.y;
_out_color_.z = isnan(_out_color_.z) ? MaxValueColorBuffer : _out_color_.z;
gPosition = f.gPosition;
gNormal = f.gNormal;