#include <iostream>
#include <fstream>
#include <sstream>
#include "../engine/exception.hpp"
Go to the source code of this file.
|
| #define | CANGINE_DEFAULT_VERT_SRC R"(#version 330 corelayout (location = 0) in vec3 aPos;layout (location = 1) in vec4 aColor;layout (location = 2) in vec2 uv;out vec4 ColorOut;out vec2 vUv;void main(){ gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0); ColorOut = aColor; vUv = uv;})" |
| |
| #define | CANGINE_DEFAULT_FRAG_SRC R"(#version 330 coreout vec4 FragColor;in vec4 ColorOut;in vec2 vUv;uniform sampler2D uTexture;uniform bool uUseTexture;uniform bool uMono;void main(){ if (uUseTexture) { if (uMono) { float alpha = texture(uTexture, vUv).r; FragColor = vec4(ColorOut.rgb, alpha * ColorOut.a); } else { vec4 t = texture(uTexture, vUv) * ColorOut; FragColor = t; } } else { FragColor = ColorOut; }})" |
| |
◆ CANGINE_DEFAULT_FRAG_SRC
| #define CANGINE_DEFAULT_FRAG_SRC R"(#version 330 coreout vec4 FragColor;in vec4 ColorOut;in vec2 vUv;uniform sampler2D uTexture;uniform bool uUseTexture;uniform bool uMono;void main(){ if (uUseTexture) { if (uMono) { float alpha = texture(uTexture, vUv).r; FragColor = vec4(ColorOut.rgb, alpha * ColorOut.a); } else { vec4 t = texture(uTexture, vUv) * ColorOut; FragColor = t; } } else { FragColor = ColorOut; }})" |
◆ CANGINE_DEFAULT_VERT_SRC
| #define CANGINE_DEFAULT_VERT_SRC R"(#version 330 corelayout (location = 0) in vec3 aPos;layout (location = 1) in vec4 aColor;layout (location = 2) in vec2 uv;out vec4 ColorOut;out vec2 vUv;void main(){ gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0); ColorOut = aColor; vUv = uv;})" |