wooo stuff yay
This commit is contained in:
parent
b0bf45a8a5
commit
d1bb9d8c67
91 changed files with 17403 additions and 42 deletions
26
games/forespend/res/shaders/tilaes.fs
Normal file
26
games/forespend/res/shaders/tilaes.fs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#version 330 core
|
||||
uniform int size; // 1024 for example
|
||||
|
||||
// You’ll need a function that returns tile ID at (x, z)
|
||||
int tileAt(int x, int z) {
|
||||
// Your procedural logic here, e.g.:
|
||||
// return (x + z) % 256;
|
||||
// Replace with your actual tilegen
|
||||
return (x + z) % 256;
|
||||
}
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
void main() {
|
||||
ivec2 pix = ivec2(gl_FragCoord.xy) - ivec2(0, 0); // pixel coords
|
||||
|
||||
int x = pix.x;
|
||||
int zBase = pix.y * 4;
|
||||
|
||||
int t0 = tileAt(x, zBase);
|
||||
int t1 = tileAt(x, zBase + 1);
|
||||
int t2 = tileAt(x, zBase + 2);
|
||||
int t3 = tileAt(x, zBase + 3);
|
||||
|
||||
FragColor = vec4(t0, t1, t2, t3) / 255.0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue