mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-18 00:27:02 +08:00
Introduce user-controllable shader on/off, shadow mode (rotated Poisson disk, 3x3 grid, or off), light cull face, and discard transparent in depth pass. Expose all settings in new dev panel "shader" tab. Move ambient strength slider to the new tab.
16 lines
344 B
GLSL
16 lines
344 B
GLSL
#version 460
|
|
|
|
in vec2 tc;
|
|
flat in int tex_layer;
|
|
layout (binding = 1) uniform sampler2DArray samp;
|
|
|
|
uniform bool is_discard_tranparent;
|
|
|
|
void main() {
|
|
if (is_discard_tranparent) {
|
|
vec4 texColor = texture(samp, vec3(tc, tex_layer));
|
|
if (texColor.a < 0.8)
|
|
discard;
|
|
}
|
|
//gl_FragDepth = gl_FragCoord.z;
|
|
} |