mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
- set up the texture matrix.
This commit is contained in:
parent
1407c18f8b
commit
179076c4b1
2 changed files with 8 additions and 3 deletions
|
@ -165,9 +165,15 @@ bool PolymostShader::Load(const char * name, const char * vert_prog, const char
|
|||
GlowMatrix.Init(hShader, "u_glowMatrix");
|
||||
TextureMatrix.Init(hShader, "u_textureMatrix");
|
||||
|
||||
|
||||
|
||||
glUseProgram(hShader);
|
||||
|
||||
VSMatrix identity(0);
|
||||
TextureMatrix.Set(identity.get());
|
||||
DetailMatrix.Set(identity.get());
|
||||
GlowMatrix.Set(identity.get());
|
||||
|
||||
int SamplerLoc;
|
||||
SamplerLoc = glGetUniformLocation(hShader, "s_texture");
|
||||
glUniform1i(SamplerLoc, 0);
|
||||
|
|
|
@ -13,6 +13,7 @@ uniform mat4 u_modelMatrix;
|
|||
uniform mat4 u_projectionMatrix;
|
||||
uniform mat4 u_detailMatrix;
|
||||
uniform mat4 u_glowMatrix;
|
||||
uniform mat4 u_textureMatrix;
|
||||
|
||||
in vec4 i_vertPos;
|
||||
in vec4 i_texCoord;
|
||||
|
@ -30,9 +31,7 @@ void main()
|
|||
|
||||
eyeCoordPosition.xyz /= eyeCoordPosition.w;
|
||||
|
||||
v_texCoord = i_texCoord;
|
||||
//gl_TexCoord[0] = mix(gl_TexCoord[0].xyzw, gl_TexCoord[0].yxzw, u_usePalette); WTF is this???
|
||||
|
||||
v_texCoord = u_textureMatrix * i_texCoord;
|
||||
v_detailCoord = u_detailMatrix * i_texCoord;
|
||||
v_glowCoord = u_glowMatrix * i_texCoord;
|
||||
|
||||
|
|
Loading…
Reference in a new issue