mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
- moved documentation out of the Source folder and added surface shader sources.
This commit is contained in:
parent
b83349fe6b
commit
0ee80628a2
8 changed files with 92 additions and 71 deletions
20
wadsrc/static/demolition/shaders/glsl/glsurface.fp
Normal file
20
wadsrc/static/demolition/shaders/glsl/glsurface.fp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#version 110
|
||||
|
||||
//s_texture points to an indexed color texture
|
||||
uniform sampler2D s_texture;
|
||||
//s_palette is the palette texture
|
||||
uniform sampler2D s_palette;
|
||||
|
||||
varying vec2 v_texCoord;
|
||||
|
||||
const float c_paletteScale = 255.0/256.0;
|
||||
const float c_paletteOffset = 0.5/256.0;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 color = texture2D(s_texture, v_texCoord.xy);
|
||||
color.r = c_paletteOffset + c_paletteScale*color.r;
|
||||
color.rgb = texture2D(s_palette, color.rg).rgb;
|
||||
|
||||
gl_FragColor = color;
|
||||
}
|
1
wadsrc/static/demolition/shaders/glsl/glsurface.vp
Normal file
1
wadsrc/static/demolition/shaders/glsl/glsurface.vp
Normal file
|
@ -0,0 +1 @@
|
|||
#version 110
attribute vec4 i_vertPos;
attribute vec2 i_texCoord;
varying vec2 v_texCoord;
void main()
{
gl_Position = i_vertPos;
v_texCoord = i_texCoord;
}
|
Loading…
Reference in a new issue