mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-18 10:11:50 +00:00
2cbe211e7c
The EDuke32 and RedNukem frontends are working, Blood isn't yet. Notes: many of the CMake variables and its output still refer to zdoom. Before changing that I wanted to make sure to be able to commit something that works. support code for Windows XP has been entirely removed. On Windows this will only target Vista and up. the crc32.h header had to be renamed to deconflict from zlib. several Windows API calls were changed to call the A-versions directly. Weirdly enough there were places that defined their parameters as T types but in a non-working way. removed some remaining editor files and support for the native software rendering only Windows backend. in a few simple cases, replaced 'char' with 'uint8_t'. The code as-is depends on chars being unsigned which is non-portable. This needs to be carefully reviewed.
35 lines
1 KiB
C++
35 lines
1 KiB
C++
char const *polymost1Vert = R"shader(
|
|
#version 110
|
|
|
|
varying vec4 v_color;
|
|
varying float v_distance;
|
|
|
|
//u_texturePosSize is the texture position & size packaged into a single vec4 as {pos.x, pos.y, size.x, size.y}
|
|
uniform vec4 u_texturePosSize;
|
|
uniform float u_usePalette;
|
|
uniform mat4 u_rotMatrix;
|
|
|
|
const float c_zero = 0.0;
|
|
const float c_one = 1.0;
|
|
|
|
void main()
|
|
{
|
|
vec4 vertex = u_rotMatrix * gl_Vertex;
|
|
vec4 eyeCoordPosition = gl_ModelViewMatrix * vertex;
|
|
gl_Position = gl_ModelViewProjectionMatrix * vertex;
|
|
|
|
eyeCoordPosition.xyz /= eyeCoordPosition.w;
|
|
|
|
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
|
gl_TexCoord[0] = mix(gl_TexCoord[0].xyzw, gl_TexCoord[0].yxzw, u_usePalette);
|
|
|
|
gl_TexCoord[3] = gl_TextureMatrix[3] * gl_MultiTexCoord3;
|
|
gl_TexCoord[4] = gl_TextureMatrix[4] * gl_MultiTexCoord4;
|
|
|
|
gl_FogFragCoord = abs(eyeCoordPosition.z);
|
|
//gl_FogFragCoord = clamp((gl_Fog.end-abs(eyeCoordPosition.z))*gl_Fog.scale, c_zero, c_one);
|
|
|
|
v_color = gl_Color;
|
|
v_distance = gl_Vertex.z;
|
|
}
|
|
)shader";
|