Fixed forward rendering for transparensy
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#version 430
|
||||
|
||||
layout(binding=0) uniform sampler2D texture0;
|
||||
|
||||
in VertexData {
|
||||
vec3 Position;
|
||||
vec3 Normal;
|
||||
vec2 TextureCoord;
|
||||
} Input;
|
||||
|
||||
out vec4 fragmentColor;
|
||||
|
||||
void main() {
|
||||
// Texture
|
||||
vec4 texel = texture(texture0, Input.TextureCoord);
|
||||
|
||||
fragmentColor = texel;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#version 430
|
||||
|
||||
uniform mat4 MVP;
|
||||
uniform mat4 M;
|
||||
uniform mat4 V;
|
||||
uniform mat4 P;
|
||||
|
||||
layout (location = 0) in vec3 Position;
|
||||
layout (location = 1) in vec3 Normal;
|
||||
layout (location = 2) in vec2 TextureCoord;
|
||||
|
||||
out VertexData {
|
||||
vec3 Position;
|
||||
vec3 Normal;
|
||||
vec2 TextureCoord;
|
||||
} Output;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = MVP * vec4(Position, 1.0);
|
||||
|
||||
Output.Position = Position;
|
||||
Output.Normal = Normal;
|
||||
Output.TextureCoord = TextureCoord;
|
||||
}
|
||||
Reference in New Issue
Block a user