mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-02-15 14:45:12 +01:00
29 lines
705 B
Text
29 lines
705 B
Text
![]() |
//
|
||
|
// Simple passthrough vertex shader
|
||
|
//
|
||
|
attribute vec3 in_Position; // (x,y,z)
|
||
|
attribute vec2 in_TextureCoord; // (u,v)
|
||
|
|
||
|
varying vec2 v_vTexcoord;
|
||
|
|
||
|
void main() {
|
||
|
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||
|
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||
|
|
||
|
v_vTexcoord = in_TextureCoord;
|
||
|
}
|
||
|
|
||
|
//######################_==_YOYO_SHADER_MARKER_==_######################@~
|
||
|
//
|
||
|
// Simple passthrough fragment shader
|
||
|
//
|
||
|
varying vec2 v_vTexcoord;
|
||
|
|
||
|
uniform vec2 UVscale;
|
||
|
uniform vec2 UVshift;
|
||
|
|
||
|
void main() {
|
||
|
gl_FragColor = texture2D( gm_BaseTexture, 1. - fract((v_vTexcoord + UVshift) * UVscale) );
|
||
|
}
|
||
|
|