OctaCore/config/glsl/edit.cfg

62 lines
1.3 KiB
INI

////////////////////////////////////////////////
//
// miscellaneous edit shaders
//
////////////////////////////////////////////////
shader 0 "blendbrush" [
in vec4 vvertex, vcolor;
uniform mat4 camprojmatrix;
uniform vec4 texgenS, texgenT;
uniform float ldrscale;
out vec4 color;
out vec2 texcoord0;
void main(void)
{
gl_Position = camprojmatrix * vvertex;
color = vec4(ldrscale * vcolor.rgb, vcolor.a);
texcoord0 = vec2(dot(texgenS, vvertex), dot(texgenT, vvertex));
}
] [
uniform sampler2D tex0;
in vec4 color;
in vec2 texcoord0;
layout(location = 0) out vec4 fragcolor;
void main(void)
{
fragcolor = texture(tex0, texcoord0).r * color;
}
]
lazyshader 0 "prefab" [
in vec4 vvertex, vcolor;
in vec3 vnormal;
uniform mat4 prefabmatrix;
uniform mat3 prefabworld;
out vec3 nvec;
out vec4 color;
@(msaainterpvert)
void main(void)
{
gl_Position = prefabmatrix * vvertex;
color = vcolor;
nvec = prefabworld * vnormal;
@(msaapackvert)
}
] [
in vec3 nvec;
in vec4 color;
@(msaainterpfrag)
void main(void)
{
gcolor.rgb = color.rgb;
gcolor.a = 0.0;
vec3 normal = normalize(nvec);
@(gnormpackdef normal packnorm)
@(msaapackfrag)
}
]