mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 21:55:52 +02:00
Archive commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// VERTEX
|
||||
|
||||
attribute vec2 position;
|
||||
attribute vec2 texcoords;
|
||||
attribute vec4 vertexColor;
|
||||
|
||||
uniform mat4 transform;
|
||||
uniform vec4 lighting;
|
||||
|
||||
varying vec2 textureCoord;
|
||||
varying vec4 vColor;
|
||||
|
||||
void main() {
|
||||
textureCoord = texcoords;
|
||||
vColor = vertexColor * lighting;
|
||||
gl_Position = transform * vec4(position, 0, 1);
|
||||
}
|
||||
|
||||
// FRAGMENT
|
||||
|
||||
precision mediump float;
|
||||
|
||||
uniform sampler2D sampler1;
|
||||
uniform float textureSize;
|
||||
|
||||
varying vec2 textureCoord;
|
||||
varying vec4 vColor;
|
||||
|
||||
void main() {
|
||||
gl_FragColor = texture2D(sampler1, textureCoord / textureSize) * vColor;
|
||||
}
|
||||
Reference in New Issue
Block a user