Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Maybe change Tile layer shader from index to xy #22

Open
justgook opened this issue Jul 3, 2019 · 0 comments
Open

Maybe change Tile layer shader from index to xy #22

justgook opened this issue Jul 3, 2019 · 0 comments
Labels
Engine enhancement New feature or request
Milestone

Comments

@justgook
Copy link
Owner

justgook commented Jul 3, 2019

And 255*255 is kind of enough for single tile set (if not it can use to other channels)

//Fragment shader
#version 110
uniform sampler2D ColorTable;     //256 x 1 pixels
uniform sampler2D MyIndexTexture;
varying vec2 TexCoord0;

void main()
{
  //What color do we want to index?
  vec4 myindex = texture2D(MyIndexTexture, TexCoord0);
  //Do a dependency texture read
  vec4 texel = texture2D(ColorTable, myindex.xy);
  gl_FragColor = texel;   //Output the color
}```
@justgook justgook added enhancement New feature or request Engine labels Jul 3, 2019
@justgook justgook added this to the 2.0.0 milestone Jul 3, 2019
@justgook justgook added this to To do in Abstract Game Engine via automation Jul 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Engine enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant