mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- all shaders now compile in core profile.
This commit is contained in:
parent
eedc5a69be
commit
6046b11b4f
5 changed files with 10 additions and 5 deletions
|
@ -88,7 +88,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
//
|
||||
|
||||
FString vp_comb = "#version 130\n";
|
||||
if (gl.glslversion >= 3.3f) vp_comb = "#version 330 compatibility\n"; // I can't shut up the deprecation warnings in GLSL 1.3 so if available use a version with compatibility profile.
|
||||
if (gl.glslversion >= 3.3f) vp_comb = "#version 330 core\n"; // I can't shut up the deprecation warnings in GLSL 1.3 so if available use a version with compatibility profile.
|
||||
// todo when using shader storage buffers, add
|
||||
// "#version 400 compatibility\n#extension GL_ARB_shader_storage_buffer_object : require\n" instead.
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ uniform sampler2D tex;
|
|||
uniform sampler2D texture2;
|
||||
in vec4 vTexCoord;
|
||||
in vec4 vColor;
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@ -10,5 +11,5 @@ void main()
|
|||
vec4 t1 = texture2D(texture2, vTexCoord.xy);
|
||||
vec4 t2 = texture2D(tex, vec2(vTexCoord.x, 1.0-vTexCoord.y));
|
||||
|
||||
gl_FragColor = frag * vec4(t1.r, t1.g, t1.b, t2.a);
|
||||
FragColor = frag * vec4(t1.r, t1.g, t1.b, t2.a);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
in vec4 pixelpos;
|
||||
in vec2 glowdist;
|
||||
out vec4 FragColor;
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -30,6 +31,6 @@ void main()
|
|||
fogdist = max(16.0, distance(pixelpos.xyz, uCameraPos.xyz));
|
||||
}
|
||||
fogfactor = exp2 (uFogDensity * fogdist);
|
||||
gl_FragColor = vec4(uFogColor.rgb, 1.0 - fogfactor);
|
||||
FragColor = vec4(uFogColor.rgb, 1.0 - fogfactor);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ in vec2 glowdist;
|
|||
in vec4 vTexCoord;
|
||||
in vec4 vColor;
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
#ifdef SHADER_STORAGE_LIGHTS
|
||||
layout(std430, binding = 3) buffer ParameterBuffer
|
||||
{
|
||||
|
@ -326,6 +328,6 @@ void main()
|
|||
break;
|
||||
}
|
||||
}
|
||||
gl_FragColor = frag;
|
||||
FragColor = frag;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
in vec4 pixelpos;
|
||||
out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = vec4(1.0);
|
||||
FragColor = vec4(1.0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue