Code cleanup, simplification
This commit is contained in:
parent
3dd195fe35
commit
b92e210bbe
8 changed files with 285 additions and 396 deletions
|
|
@ -2,11 +2,6 @@
|
|||
|
||||
layout (location = 0) out vec2 outUV;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ layout (binding = 0) uniform UBO {
|
|||
mat4 projection;
|
||||
mat4 modelview;
|
||||
mat4 inverseModelview;
|
||||
float exposure;
|
||||
} ubo;
|
||||
|
||||
layout (location = 0) in vec3 inUVW;
|
||||
|
|
@ -22,10 +23,6 @@ layout (constant_id = 0) const int type = 0;
|
|||
#define PI 3.1415926
|
||||
#define TwoPI (2.0 * PI)
|
||||
|
||||
layout (binding = 2) uniform Exposure {
|
||||
float exposure;
|
||||
} exposure;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 color;
|
||||
|
|
@ -86,7 +83,7 @@ void main()
|
|||
|
||||
|
||||
// Color with manual exposure into attachment 0
|
||||
outColor0.rgb = vec3(1.0) - exp(-color.rgb * exposure.exposure);
|
||||
outColor0.rgb = vec3(1.0) - exp(-color.rgb * ubo.exposure);
|
||||
|
||||
// Bright parts for bloom into attachment 1
|
||||
float l = dot(outColor0.rgb, vec3(0.2126, 0.7152, 0.0722));
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -9,6 +9,7 @@ layout (binding = 0) uniform UBO {
|
|||
mat4 projection;
|
||||
mat4 modelview;
|
||||
mat4 inverseModelview;
|
||||
float exposure;
|
||||
} ubo;
|
||||
|
||||
layout (location = 0) out vec3 outUVW;
|
||||
|
|
@ -17,11 +18,6 @@ layout (location = 2) out vec3 outNormal;
|
|||
layout (location = 3) out vec3 outViewVec;
|
||||
layout (location = 4) out vec3 outLightVec;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
outUVW = inPos;
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue