Shader working.
This commit is contained in:
@@ -1,18 +1,11 @@
|
||||
#include "entity.glsl"
|
||||
#include "../fragments/header.glsl"
|
||||
|
||||
// Inputs from vertex shader
|
||||
in vec2 v_TextureCoord;
|
||||
flat in int v_Entity;
|
||||
|
||||
// Frag pixel color
|
||||
out vec4 FragColor;
|
||||
|
||||
void main() {
|
||||
Entity e = entities[v_Entity];
|
||||
vec4 textureColor = tilesetGetColor(e.tileset, v_TextureCoord);
|
||||
|
||||
// We remove the pink color as transparent
|
||||
if(textureColor.r == 1.0 && textureColor.g == 0.0 && textureColor.b == 1.0) {
|
||||
discard;
|
||||
}
|
||||
|
||||
FragColor = textureColor;
|
||||
FragColor = vec4(1, 1, 1, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user