(Default2DPipeline: Has Lights, Post-ProcessingEffects, etc.) (Basic2DPipeline: Simple Color and Texture stuff, thats it)
34 lines
No EOL
603 B
GLSL
34 lines
No EOL
603 B
GLSL
#version 330
|
|
|
|
//# region vertex
|
|
|
|
//# import SM_base_vertex_basic
|
|
void ApplyTexModifier();
|
|
void CheckVertexColor();
|
|
void ApplyModelTransformation();
|
|
|
|
void vmain() {
|
|
ApplyTexModifier();
|
|
CheckVertexColor();
|
|
ApplyModelTransformation();
|
|
}
|
|
|
|
//# region fragment
|
|
in vec2 vTexture;
|
|
in vec4 vColor;
|
|
|
|
uniform bool occlude;
|
|
|
|
uniform vec4 Tint;
|
|
uniform bool UseTexture;
|
|
uniform sampler2D Texture;
|
|
|
|
layout(location = 0) out vec4 color;
|
|
layout(location = 1) out vec4 occluder;
|
|
|
|
void fmain() {
|
|
color = vColor * Tint;
|
|
if (UseTexture) color *= texture(Texture, vTexture);
|
|
|
|
occluder = vec4(occlude,0,0,1);
|
|
} |