~ Changed Pipelines
(Default2DPipeline: Has Lights, Post-ProcessingEffects, etc.) (Basic2DPipeline: Simple Color and Texture stuff, thats it)
This commit is contained in:
parent
1ed03fec3f
commit
5d4b360b05
23 changed files with 243 additions and 59 deletions
28
SMCode/SM2D/Shader/ShaderFiles/basic.glsl
Normal file
28
SMCode/SM2D/Shader/ShaderFiles/basic.glsl
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#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 vec4 Tint;
|
||||
uniform bool UseTexture;
|
||||
uniform sampler2D Texture;
|
||||
|
||||
layout(location = 0) out vec4 color;
|
||||
|
||||
void fmain() {
|
||||
color = vColor * Tint;
|
||||
if (UseTexture) color *= texture(Texture, vTexture);
|
||||
}
|
||||
|
|
@ -17,13 +17,18 @@ void vmain() {
|
|||
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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue