Updated bloom example shaders
This commit is contained in:
parent
bfd0a2e0b4
commit
927660680d
10 changed files with 19 additions and 23 deletions
|
|
@ -11,7 +11,8 @@ layout (location = 3) in vec3 inNormal;
|
|||
layout (binding = 0) uniform UBO
|
||||
{
|
||||
mat4 projection;
|
||||
mat4 modelview;
|
||||
mat4 view;
|
||||
mat4 model;
|
||||
} ubo;
|
||||
|
||||
layout (location = 0) out vec3 outNormal;
|
||||
|
|
@ -30,11 +31,11 @@ void main()
|
|||
outNormal = inNormal;
|
||||
outColor = inColor;
|
||||
outUV = inUV;
|
||||
gl_Position = ubo.projection * ubo.modelview * inPos;
|
||||
gl_Position = ubo.projection * ubo.view * ubo.model * inPos;
|
||||
|
||||
vec3 lightPos = vec3(-5.0, -5.0, 0.0);
|
||||
vec4 pos = ubo.modelview * inPos;
|
||||
outNormal = mat3(ubo.modelview) * inNormal;
|
||||
outLightVec = lightPos - pos.xyz;
|
||||
outViewVec = -pos.xyz;
|
||||
vec4 pos = ubo.view * ubo.model * inPos;
|
||||
outNormal = mat3(ubo.view * ubo.model) * inNormal;
|
||||
outLightVec = lightPos - pos.xyz;
|
||||
outViewVec = -pos.xyz;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue